Menu

Debugging with GDB

GnuCOBOL
2022-04-12
2022-05-04
<< < 1 2 (Page 2 of 2)
  • Simon Sobisch

    Simon Sobisch - 2022-05-03

    What does not work with cbreak? Do you have a reproducer?
    In the meanwhile just use break with source and line number SOME.cob:1234 - that should always work.

     
    • Rich Di Iulio

      Rich Di Iulio - 2022-05-03

      Simon,

      CBreak does not really set the break point. When I use the run command, it justs continues the program to conclusion.

      Yes, that is what I have done, when a CBL-GDB command does not work, I revert to the standard gdb command.

       
      • Simon Sobisch

        Simon Sobisch - 2022-05-03

        Then check with info break what was generated - if anything, maybe you already spot an issue.

         
        • Rich Di Iulio

          Rich Di Iulio - 2022-05-03

          Attached are two screenshots; first is cbreak that does not work. The other is the break that works.

           
          • Simon Sobisch

            Simon Sobisch - 2022-05-03

            Ah, thats a version that doesn't understand the linespec. I can have a look tomorrow if I see it in my local version where the change for that is, so you can patch an also use linespec with cbreak.
            Note: it does make sense to also create linespec breakpoints with cbreak, as only its breakpoints can be post-adjusted with ccondition later to break depending on an expression.

            But in your case you'd do cbreak SALONSSAVY - which will break at the main ENTRY of the program (the first statement in the PROCEDURE DIVISION out of DECLARATIVES (that's what you already have) or cbreak section ini-processing - please see help cbreak.

             
            • Rich Di Iulio

              Rich Di Iulio - 2022-05-04

              Tonight I continued working on this. I had built GC312 32 and 64 for MinGW last week. I installed CBL-GDB4.28. I was able to debug my application by using all the commands for CBL-GDB.

              I decided to try using cobcd.py for version 4.28 on Linux. I was able to debug my application by using all the commands again.

               
              • pottmi

                pottmi - 2022-05-04

                I am hijacking this thread for one question...

                Is anyone on this thread able to demo debugging in about twelve hours?

                We are going to have a jitsi meeting about debugging. I suspect we will not have a speaker but I am still going to attempt to have the meeting as a practise run for jitsi.

                 

                Last edit: Simon Sobisch 2022-05-04
                • Rich Di Iulio

                  Rich Di Iulio - 2022-05-04

                  Unfortunately, I am not that speaker if you are looking to me. I am just getting my legs under me with debugging. Today is not good for me.

                  Rich Di Iulio

                   
<< < 1 2 (Page 2 of 2)

Log in to post a comment.