Skip to contentSkip to conversation

Help w/ gdb

DISCUSSION Sean Chitwood 2 participants 2 messages Jan 18, 2000 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Ok, I'm assuming you mean to change the CFLAGS in the Makefile... correct? I'll do that tonight and hopefully let you know in th emorning....

Just for my edification, what is the difference between -g and -gdwarf-2... I have a bad feeling one produces elf binaries and one produces dwarf binaries.... Not that I would know the difference...

Quoted 13 lines · Kevin Buettner

One of the things you might try is to recompile using DWARF2 debugging symbols. Replace -g with -gdwarf-2.

I'm not necessarily suggesting that you start use dwarf2 debugging symbols instead of stabs, but this will tell me more about the problem. (If it works properly with dwarf2, then I have a patch for you which should make it behave properly with stabs.)

Thanks for the feedback.

Kevin

Sean aka Darkmane
+------------------------------
+ On October 16, 1999 A.D.
+ Sean Chitwood proudly proclaimed
+ his love for Melissa Webb
+ and made her his lifemate
+------------------------------

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 3 lines · Sean Chitwood

Ok, I'm assuming you mean to change the CFLAGS in the Makefile... correct? I'll do that tonight and hopefully let you know in th emorning....

Yes. (Or whatever variable your Makefile uses to set the -g debugging flag for the compiler.)

BTW, make sure you specify it as -gdwarf-2 and NOT -gdwarf2. Oddly enough, these mean completely different things. (The former says to use the DWARF2 format while the latter says to use the DWARF format at debugging level 2.)

Quoted 3 lines

Just for my edification, what is the difference between -g and -gdwarf-2... I have a bad feeling one produces elf binaries and one produces dwarf binaries.... Not that I would know the difference...

ELF binaries are created in both instances. It's the debugging format which will be different. Many platforms use the stabs debugging format by default -- I think this is the default format for linux/ppc. You can explicitly use a different format by using one of the other -g switches. (-gstabs, -gstabs+, -gdwarf, -gdwarf+, ...)

To be quite honest with you, I haven't checked recently to see which debug format linux/ppc uses by default or even if DWARF2 will work at all. But it is something to try. Even if DWARF2 isn't completely satisfactory for debugging (e.g, it could generate outrageously large symbolic information), if it addresses the specific problem that you reported, it'll let me know if it's worth it for you to try a patch which does a better job of resolving zero-valued N_FUN symbols for the stabs format.

I noted in another message that there's a patch at the end of

    http://sourceware.cygnus.com/ml/gdb/1999-q3/msg00325.html

that you could try, but I doubt that it will apply cleanly. (I think I have one that should apply cleanly though. But before I send it to you, I'd like to know the results of your DWARF2 tests.)

Kevin

Signature · 4 lines
Kevin Buettner
[email protected], [email protected]

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/