[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GnuCOBOL 3.1-rc1] testsuite: 696 failed

From: Edward Hart
Subject: Re: [GnuCOBOL 3.1-rc1] testsuite: 696 failed
Date: Sun, 9 Aug 2020 18:58:02 +0100

Hi Márcio,

Thanks for the report!

Would you be able to donate some time to debugging it? I'd be very grateful if you could; all you should need is to install the debugger GDB (if it isn't already on your system) and hopefully 20 minutes at most. Here's a step-by-step guide:
  1. In the GnuCOBOL source directory, run ./configure with the --enable-debug flag (and any other flags you needed for compilation).
  2. Run make.
  3. cd to ./tests
  4. Run ". atconfig && . atlocal" (to temporarily make the terminal command cobc point to the compiler that's just been built in the source directory).
  5. cd to ./testsuite.dir/0696.
  6. Edit prog.cob to insert ACCEPT OMITTED at the start of the procedure division.
  7. Run "cobc -x -g -debug ./prog.cob"
  8. Start the prog executable, but do not press enter to terminate the ACCEPT.
  9. In another terminal, attach the GDB debugger to prog: "sudo gdb -p $(pidof prog)" (sudo is needed (at least for me) because the program is paused and waiting for input, so the debugger needs access to system debugging symbols).
  10. You will be prompted with a list of debugging symbols GDB will load; we don't care about this. To continue, press "c".
  11. Enter "b fileio.c:3202". This will set a breakpoint in the function indexed_file_delete, specifically at the start of the loop which deletes all the files for a BDB INDEXED file.
  12. Enter "c" in GDB.
  13. Switch to the terminal with prog and press enter to allow it to run.
  14. Switch back to GDB. The breakpoint should have triggered.
  15. In GDB, enter "p filename" to print the contents of the variable filename. GDB should output something like '$1 = 0x555555573e10 "testfile"'
  16. Check that the testsuite.dir/0696/ directory now contains a file named testfile.
  17. In GDB, enter "p errno". GDB should show that errno is 0: '$2 = 0'.
  18. Step forward a line by entering "n". Step forward repeatedly until you have passed the line "unlink (file_open_buff)". Enter "p errno" again and confirm it is still zero.
  19. You can stop debugging here. Enter q to quit GDB.
If you are free to do this, let me know if the instructions work and what the output is for steps 15, 17 and 18.


On Sat, 8 Aug 2020 at 13:59, Márcio Conceição Goulart <marcio.goulart@gmail.com> wrote:
Hi there,

I installed GnuCOBOL 3.1 with zypper but I was getting strange compile time erros on a program that used to work fine with 2.1 version. So I decided to compile it from the sources.

I'm sending the testlog after an error on 'make check'. Despite having experience with COBOL, I only know the basics of C and I don't know the cause of the error and how to investigate it myself. It would be my pleasure to help somehow.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]