This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337 currently for trivia nonthreaded helloworld with no debug info up to -ggdb2 you will get: (gdb) p errno Cannot access memory at address 0x8 * with -ggdb3 "errno" gets resolved as _macro_ and the resulting "(*__errno_location ())" expression is always fine. * with -ggdb2 and less "errno" in fact does not exist anywhere as it was compiled to "(*__errno_location ())" and the macro definition is not present. Unfortunately gdb will find the TLS symbol and it will try to access it but as the program has been compiled without -lpthread the TLS base register (%gs on i386) is not setup and it will result in: Cannot access memory at address 0x8 IMO the right way is to ignore TLS symbols for inferiors without activated threading. Patch attached. Also attached suggestion patch how to deal with the most common "errno" symbol for the most common under-ggdb3 compiled programs. Regards, Jan
Attachment:
gdb-6.5-bz185337-tls-ignore-symbols-without-startup.patch
Description: Text document
Attachment:
gdb-6.5-bz185337-missing-errno-suggestion.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |