Re: Support for Assembly Language Debugging



Hello Xiaojun,

Ma Xiaojun <damage3025 gmail com> a écrit:

use the hello.asm in the following page:
http://www.tldp.org/HOWTO/Assembly-HOWTO/hello.html

And use:
nasm -f elf64 -g hello.asm
ld -o hello hello.o

Load "hello" into Nemiver, it just report program exited.
Using plain GDB, I can at least use "l" to see the assembly source.

Try:

nemiver --just-load hello

Then, set a breakpoint to the _start label by doing, e.g, ctrl-b and
then type '_start'.  Then 'run' the debugger by hitting F5.  It should
break on the _start label.  Then you can step in the asm instructions by
doing ctrl-i.

Here is the reason why you need to do use the --just-load command line
option:

By default, when you do nemiver <some-c-or-c++-program>, what it does is
that it loads the program, sets a breakpoint on the 'main' symbol and
then does a 'run'.

In your case here, there is no 'main' symbol; so no breakpoint is set in
the program; thus when the 'run' is issued, it makes the program execute
until the end.

the --just-load command line option, as it name implies loads the
program and does just that.  It doesn't set any breakpoint, and doesn't
'run' the inferior program being debugged.

I hope this helps.

-- 
                Dodji


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