This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
GDB does not show variables in inlined function
- From: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- To: gcc at gcc dot gnu dot org, gdb at sources dot redhat dot com
- Date: Tue, 6 Jan 2004 15:49:50 +0100
- Subject: GDB does not show variables in inlined function
Hello,
when using current GCC mainline and a function gets inlined
(by -funit-at-a-time)
GDB can't show variables of inlined function
(No symbol "incoming" in current context.)
The relevant part of debug info:
without inlining:
.uleb128 0x25 # (DIE (0x458a) DW_TAG_variable)
.long .LASF986 # DW_AT_name: "incoming"
.byte 0x1 # DW_AT_decl_file
.value 0x3f32 # DW_AT_decl_line
.long 0x2d # DW_AT_type
.byte 0x1 # DW_AT_location
.byte 0x55 # DW_OP_reg5
with inlining:
.uleb128 0x2c # (DIE (0x2a5a) DW_TAG_variable)
.long 0x2af2 # DW_AT_abstract_origin
^^^^^^
.byte 0x1 # DW_AT_location
.byte 0x56 # DW_OP_reg6
...
.long 0x2d # DW_AT_type
.uleb128 0x24 # (DIE (0x2af2) DW_TAG_variable)
^^^^^^
.long .LASF850 # DW_AT_name: "incoming"
.byte 0x1 # DW_AT_decl_file
.value 0x3f32 # DW_AT_decl_line
.long 0x2d # DW_AT_type
The location seems not to be generated for the real variable record
(2nd part after ...) with inlining.
Should GCC generate the location for the second part (after ...) too,
should GDB be able to link the descriptions through the marked number
or something else?
Thanks.
Josef