This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/21549] c-typeprint.c:262: internal-error: void cp_type_print_method_args(type*, const char*, const char*, int, ui_file*, const type_print_options*): Assertion `TYPE_CODE (args[0].type) == TYPE_CODE_PTR' failed.
- From: "keiths at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 12 Jun 2017 22:01:03 +0000
- Subject: [Bug gdb/21549] c-typeprint.c:262: internal-error: void cp_type_print_method_args(type*, const char*, const char*, int, ui_file*, const type_print_options*): Assertion `TYPE_CODE (args[0].type) == TYPE_CODE_PTR' failed.
- Auto-submitted: auto-generated
- References: <bug-21549-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21549
--- Comment #10 from Keith Seitz <keiths at redhat dot com> ---
Looking at the DWARF and session information you've provided, I *think* GDB is
asserting on the following symbol:
_ZN5Shell6TinySh8cmd_helpERS0_iPPKc
That is: Shell::TinySh::cmd_help(Shell::TinySh&, int, char const**).
According to the debug info, "Shell" is a namespace. "TinySh" is a structure,
and cmd_help is a *method* of that structure:
<3><15dc>: Abbrev Number: 68 (DW_TAG_subprogram)
<15dd> DW_AT_external : 1
<15dd> DW_AT_name : (indirect string, offset: 0x1621): cmd_help
<15e1> DW_AT_decl_file : 20
<15e2> DW_AT_decl_line : 49
<15e3> DW_AT_linkage_name: (indirect string, offset: 0xa7b):
_ZN5Shell6Tin
ySh8cmd_helpERS0_iPPKc
<15e7> DW_AT_prototyped : 1
<15e7> DW_AT_accessibility: 3 (private)
<15e8> DW_AT_declaration : 1
<4><15e8>: Abbrev Number: 13 (DW_TAG_formal_parameter)
<15e9> DW_AT_type : <0x1691>
<4><15ed>: Abbrev Number: 13 (DW_TAG_formal_parameter)
<15ee> DW_AT_type : <0x4f>
<4><15f2>: Abbrev Number: 13 (DW_TAG_formal_parameter)
<15f3> DW_AT_type : <0x1697>
<4><15f7>: Abbrev Number: 0
The first parameter of this (private) method has type given by 0x1691, which is
a *reference* to TinySh, not a pointer. Not only that, but this first parameter
is also not marked artificial.
Can you provide the source declaration for Shell::TinySh::cmd_help?
>From what I can infer from this, GDB (erroneously) marks cmd_help as a
non-static member function, but it's really just a guess.
--
You are receiving this mail because:
You are on the CC list for the bug.