(Ubuntu 11.04)
I've just installed the debugger DDD, and I'm literally testing a 'hello world' program, but whilst breakpoints are being hit, the (next to) execute line is not highlighted, and when I click 'Next' the code runs to the end?
It sounds like you may not have compiled with debugging information - did you pass the -g flag to gcc?
Thanks for helping me. To be honest I'm following the Duntemann Step/Step TY Assembly book and I copied the compile line straight from the pdf which I'm pretty sure had the debug symbols switch set (its the Nasm compiler)
---------- Post updated at 09:38 AM ---------- Previous update was at 09:27 AM ----------
I just redid the compile in a different folder, this is the compile line i used:
nasm -f elf -g -F stabs eatsyscall.asm -o eatdemo.o
and definitely the same problem.
Could you post the code you're using?
I can if you think it'd help, but it really is just a 'hello world' app taken from the book and it is running ok.
I'm compiling with :
nasm -f elf -g -F stabs eatsyscall.asm -o eatdemo.o
and linking with
ld -o eatsyscall eatsyscall.o
I guess it must be something to do with the way I installed DDD, or a setting...maybe...
I'm starting to realise these assembly debuggers are becoming a thing of the past and they all seem to have been abandoned by their developers.
---------- Post updated at 01:21 PM ---------- Previous update was at 12:51 PM ----------
Do you think it might be something to do with the compiler (nasm) version?
nasm isn't a compiler, it's an assembler. I'm not positive how to make it generate appropriate debug info.
You're not trying to debug inside a system call, right?
thanks for both of your help. I fixed it! by compiling with dwarf instead of stabs (as it said in the help it contained more debug 'stuff') and now its showing the highlight and stepping.
Very useful to know. Thanks for posting the solution.