Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Sep 2007 11:59:14 +0400
From:      Dmitry Gorbik <e@recolon.ru>
To:        Ghirai <ghirai@ghirai.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gdb question
Message-ID:  <20070923115914.bf06378b.e@recolon.ru>
In-Reply-To: <20070923002923.92db3efd.ghirai@ghirai.com>
References:  <20070923002923.92db3efd.ghirai@ghirai.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 23 Sep 2007 00:29:23 +0000
Ghirai <ghirai@ghirai.com> wrote:

> Hello list,
> 
> I'm playing with a small nasm executable, is there any way
> i can get gdb to show me the deadlisting, and allow me to
> break at a certain offset, without any debugging symbols?
> 
> Since my code is raw assembly, seeing the sourcecode file
> or the deadlisting is the exact same.
> 
> Atm i'm doing like this, and it doesn't seem to work:
> 
> (gdb) file wp
> Reading symbols from wp...(no debugging symbols found)...done.
> (gdb) break 0x8048099
> No symbol table is loaded.  Use the "file" command.
> (gdb) run
> Starting program: wp 
> warning: shared library handler failed to enable breakpoint
> 
> Program exited with code 0267.
> 
> 
> Using gdbtui seems yield the exact same result.
> 
> What i really want is to see the deadlisting and be able to step through
> it, seeing what happens with the registers, stack, etc.
> 
> Can gdb do that?
> 
> And are there any other usermode debuggers i could use?
> 
> Thanks for reading.
> 
> -- 
> Regards,
> Ghirai.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

You can start gdb session like this:
$gdb program
break main
set disassembly-flavor intel
disassemble main

Now you can use "nexti" to run program till break & "next" will step one instruction (if there were no debugging symbols". That was tested on a program, compiled with nasm.

-- 
Dmitry Gorbik <e@recolon.ru>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070923115914.bf06378b.e>