NASM Forum > Other Discussion

Is there anyone familiar with gdb ?

(1/3) > >>

puttyios:
How to use the mailing list at the GNU debugger site?

thanks!

Frank Kotler:
Poke around here:

http://www.gnu.org/software/gdb/mailing-lists/

I'm not very familiar with gdb. I can give ya a couple hints... add "-F dwarf" to Nasm's command line. Just "-g" will add debugging info, but in the default "stabs" format - gdb is happier with "dwarf", I'm told (to be honest, I don't notice much difference). If gcc is involved, just "-g" on gcc's command line. Don't use "-s" on ld's command line, if you're invoking ld yourself. If your entrypoint is "_start:", put a "nop" (or other single-byte instruction?) as the first instruction in your file - this gives gdb someplace to stop. Won't hurt to put a "nop" after "main", if that's what you're using - I'm not sure if it helps in that case...

You can make gdb somewhat more "asm friendly" by putting a suitable ".gdbinit" in your home directory, or in the current directory where you're working. I've got one that works for 32-bit code. I'll post it if you want it. Shortly before his death, Chuck Crayne  posted a ".gdbinit" good for both 64-bit and 32-bit code. I thought I'd saved it, but can't find it at the moment. I'll poke around the dusty old comp.lang.asm.x86 archives at google-groups and see if I can find it... or look yourself...

You may also want to know that Linux has (usually) got core-dumps turned off by default. To enable 'em, the command is "ulimit -c <size>", as I recall. I don't know how to use 'em.

I actually use a simpler(?) but less powerful(?) debugger - there are several. I can provide links, but your best bet is to learn to use gdb, if you've got the courage for it. Good luck!

Best,
Frank

puttyios:
very thank you!

I am doing some develop on linux , and  I  usually use it .

But I can not deal with some problem myself, so I want to discusse them with some gdb developers , and I  find the gdb mailing list at gnu website ,  the question which troubles me  is I can not send email to gdb@sourceware.org, Why?

Frank Kotler:
Well, if you were having a problem with a Nasm program, I'd ask, "exactly what did you do, and what happened?"

The usual scheme with mailing lists is to send mail with "subscribe" and nothing else as content - I don't think it'll hurt to use "subscribe" as both "subject:" and the only content. If you haven't tried that, try it and see what happens. If you've done that, well... what happened? As I mentioned, my main advice with gdb is, "Good Luck!"

Best,
Frank

puttyios:
thanks,  I have subscribed to the gdb mailing list before I post this topic.  in other words ,I have subscribe to the list ,but still can not send email to its address. thanks!

Navigation

[0] Message Index

[#] Next page

Go to full version