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] |
On Fri, Jul 15, 2011 at 12:19 PM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > Hi, > > I always see some terrible C++ GDB bug so I fix in some hours and then find out > it works in GDB when one has `set language c++'. ?This usually happens with > artificial testcases like the one today: > ? ? ? ?http://sourceware.org/ml/gdb-patches/2011-07/msg00387.html was curious what it did with the attached objc++ version. which isn't really a supported language by any means. gdb considers it to be 'minimal'/doesn't recognize the CU language in the debuginfo. and it is difficult to say how meaningful it would be if it did. I imagine gdb wants DW_TAG_partial_unit/DW_AT_language when switching between c++/objective-c functions, I hadn't been able to coax this out of gcc anyhow the last line was a bit suprising. gcc -g -o objcxx objc++.mm -lobjc GNU gdb (GDB) Fedora (7.2-51.fc14) (gdb) set language c++ (gdb) whatis C::t No symbol "C" in current context. (gdb) set language objective-c (gdb) whatis C::t No symbol "C" in current context. (gdb) break main Breakpoint 1 at 0x400808: file objc++.mm, line 47. (gdb) r Breakpoint 1, main () at objc++.mm:47 47 Foo *foo = [[Foo alloc] init]; Warning: the current language does not match this frame. (gdb) whatis C::t type = t (gdb) show language The current source language is "objective-c". Warning: the current language does not match this frame. (gdb) set language c++ (gdb) whatis C::t A syntax error in expression, near `'.
Attachment:
objc++.mm
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |