How to run Hercules under the gdb debugger #707
Labels
Discussion
Developers are invited to discuss a design change or solution to a coding problem.
L
Linux only issue, such as with tuntap networking that doesn't occur on Windows.
PREAMBLE:
The following might not be perfectly accurate (since I am NOT a Linux person!), but it seems to work for me.
Linux experts who are familiar with (skilled at) debugging programs under gdb are encouraged to provide thoughtful feedback, KEEPING IN MIND that my primary goal in creating this issue is to simply document how to get started with running Hercules under gdb. My goal is NOT to provide a comprehensive gdb debugging tutorial!
With that in mind, here is how I do it:
Debugging Hercules via GDB...
For various gdb commands, refer to:
(if anyone has a better reference, let me know!)
PROCEDURE
Tell gdb where Hercules binaries are located. Note that the below is required so that gdb can find and load Hercules's binaries:
export LD_LIBRARY_PATH=/home/<user>/hercules/hercules-0/.libs
Start gdb, telling it which program you want it to debug:
gdb /home/<user>/hercules/hercules-0/.libs/hercules
Once in gdb, ask gdb to start running Hercules:
run -f none > ~/hercules.log
(Note: the(gdb)
in the below example is gdb's command prompt, not part of any gdb command itself! Also ignore the line comments too, obviously!)export LD_LIBRARY_PATH=
(i.e. set back to nothing? i.e. to empty string?)THAT'S IT!
(The Linux geeks are probably laughing at me now!)
The text was updated successfully, but these errors were encountered: