Quick take: debugging source vs. assembly programs with gdb #266
samiam95124
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Quick take: debugging source vs. assembly programs with gdb
The system I have been using for this is to use the -nmrkasslin option:
pc test -nmrkasslin
Which means to not generate line markers for gdb in the .s or assembly output from the compiler.
gdb gets confused when you give it source line equivalent markers. They work fine for Pascaline source, but then you can't
place breakpoints in the assembly or .s files, and stepping through them gets wonky.
If you are using gdb to step through source .pas files, no problem, you don't need that. Plus, you can use pint for that kind of source level debug. The assembly language option is mostly for me, since I need to step through assembly language lines to find issues. Figuring out what source line are on there is actually pretty simple. For example:
From this you know that you are on line 236889 to 236890 of the .s (assembly) file, that the .pas source line is 4800, and the intermediates in .p6 is at line 43558.
Beta Was this translation helpful? Give feedback.
All reactions