From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: swagiaal@redhat.com (Sami Wagiaalla)
Cc: tromey@redhat.com (Tom Tromey), gdb-patches@sourceware.org
Subject: Re: [patch] Add support for imported declaration and correct search order
Date: Tue, 23 Mar 2010 21:35:00 -0000 [thread overview]
Message-ID: <201003232135.o2NLZWXB002778@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <4BA92962.6050206@redhat.com> from "Sami Wagiaalla" at Mar 23, 2010 04:49:38 PM
Sami Wagiaalla wrote:
> On 03/23/2010 04:31 PM, Ulrich Weigand wrote:
> > This test is now failing for me:
> >
> > print x
> > $5 = 55
> > (gdb) FAIL: gdb.cp/shadow.exp: Print imported namespace x
> >
> > (Same value as with GDB 7.1, except the test was KFAILed there ...)
> >
>
> I can try to reproduce it. Which compiler are you using ?
GCC 4.1 (the RHEL 5.4 system compiler).
> > Any suggestions where to look?
> >
>
> In lookup_symbol_aux_local the call to cp_lookup_symbol_imports is
> failing so the local variable in the outer block is being found. IIRC
> the import statement was not nested correctly with older compilers so
> that would be my first guess.
That might well be the case. Here's the debug info I'm seeing:
The section .debug_info contains:
Compilation Unit @ offset 0x0:
Length: 479
Version: 2
Abbrev Offset: 0
Pointer Size: 8
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
DW_AT_stmt_list : 0
DW_AT_producer : GNU C++ 4.1.2 20080704 (Red Hat 4.1.2-46)
DW_AT_language : 4 (C++)
DW_AT_name : /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.cp/shadow.cc
<1><76>: Abbrev Number: 2 (DW_TAG_class_type)
DW_AT_sibling : <bd>
DW_AT_name : B
DW_AT_byte_size : 4
DW_AT_decl_file : 1
DW_AT_decl_line : 10
<2><80>: Abbrev Number: 3 (DW_TAG_member)
DW_AT_name : x
DW_AT_decl_file : 1
DW_AT_decl_line : 12
DW_AT_type : <bd>
DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0)
<2><8c>: Abbrev Number: 4 (DW_TAG_subprogram)
DW_AT_external : 1
DW_AT_name : func
DW_AT_decl_file : 1
DW_AT_decl_line : 15
DW_AT_MIPS_linkage_name: _ZN1B4funcEv
DW_AT_type : <bd>
DW_AT_declaration : 1
<3><a7>: Abbrev Number: 5 (DW_TAG_formal_parameter)
DW_AT_type : <c4>
DW_AT_artificial : 1
<3><ad>: Abbrev Number: 6 (DW_TAG_imported_module)
DW_AT_decl_file : 1
DW_AT_decl_line : 29
DW_AT_import : <ca>
<3><b4>: Abbrev Number: 7 (DW_TAG_imported_declaration)
DW_AT_decl_file : 1
DW_AT_decl_line : 33
DW_AT_import : <d3>
<1><bd>: Abbrev Number: 8 (DW_TAG_base_type)
DW_AT_name : int
DW_AT_byte_size : 4
DW_AT_encoding : 5 (signed)
<1><c4>: Abbrev Number: 9 (DW_TAG_pointer_type)
DW_AT_byte_size : 8
DW_AT_type : <76>
<1><ca>: Abbrev Number: 10 (DW_TAG_namespace)
DW_AT_sibling : <f2>
DW_AT_name : A
DW_AT_decl_file : 1
DW_AT_decl_line : 2
<2><d3>: Abbrev Number: 11 (DW_TAG_variable)
DW_AT_name : x
DW_AT_decl_file : 1
DW_AT_decl_line : 3
DW_AT_MIPS_linkage_name: (indirect string, offset: 0x0): _ZN1A1xE
DW_AT_type : <bd>
DW_AT_external : 1
DW_AT_declaration : 1
<2><e2>: Abbrev Number: 11 (DW_TAG_variable)
DW_AT_name : x
DW_AT_decl_file : 1
DW_AT_decl_line : 3
DW_AT_MIPS_linkage_name: (indirect string, offset: 0x0): _ZN1A1xE
DW_AT_type : <bd>
DW_AT_external : 1
DW_AT_declaration : 1
<1><f2>: Abbrev Number: 12 (DW_TAG_subprogram)
DW_AT_sibling : <15a>
DW_AT_specification: <8c>
DW_AT_low_pc : 0x10000620
DW_AT_high_pc : 0x100006f0
DW_AT_frame_base : 0 (location list)
<2><10f>: Abbrev Number: 13 (DW_TAG_formal_parameter)
DW_AT_name : this
DW_AT_type : <15a>
DW_AT_artificial : 1
DW_AT_location : 2 byte block: 91 30 (DW_OP_fbreg: 48)
<2><11d>: Abbrev Number: 14 (DW_TAG_lexical_block)
DW_AT_low_pc : 0x10000658
DW_AT_high_pc : 0x100006d8
<3><12e>: Abbrev Number: 15 (DW_TAG_variable)
DW_AT_name : x
DW_AT_decl_file : 1
DW_AT_decl_line : 21
DW_AT_type : <bd>
DW_AT_location : 2 byte block: 91 64 (DW_OP_fbreg: -28)
<3><13a>: Abbrev Number: 14 (DW_TAG_lexical_block)
DW_AT_low_pc : 0x1000067c
DW_AT_high_pc : 0x100006d8
<4><14b>: Abbrev Number: 15 (DW_TAG_variable)
DW_AT_name : x
DW_AT_decl_file : 1
DW_AT_decl_line : 25
DW_AT_type : <bd>
DW_AT_location : 2 byte block: 91 60 (DW_OP_fbreg: -32)
<1><15a>: Abbrev Number: 16 (DW_TAG_const_type)
DW_AT_type : <c4>
<1><15f>: Abbrev Number: 17 (DW_TAG_subprogram)
DW_AT_sibling : <194>
DW_AT_external : 1
DW_AT_name : main
DW_AT_decl_file : 1
DW_AT_decl_line : 43
DW_AT_type : <bd>
DW_AT_low_pc : 0x100005d4
DW_AT_high_pc : 0x10000620
DW_AT_frame_base : 0x4d (location list)
<2><184>: Abbrev Number: 15 (DW_TAG_variable)
DW_AT_name : theB
DW_AT_decl_file : 1
DW_AT_decl_line : 45
DW_AT_type : <76>
DW_AT_location : 2 byte block: 91 60 (DW_OP_fbreg: -32)
<1><194>: Abbrev Number: 10 (DW_TAG_namespace)
DW_AT_sibling : <1b5>
DW_AT_name : ::
DW_AT_decl_file : 2
DW_AT_decl_line : 0
<2><19e>: Abbrev Number: 18 (DW_TAG_variable)
DW_AT_name : x
DW_AT_decl_file : 1
DW_AT_decl_line : 6
DW_AT_type : <bd>
DW_AT_external : 1
DW_AT_declaration : 1
<2><1a9>: Abbrev Number: 18 (DW_TAG_variable)
DW_AT_name : y
DW_AT_decl_file : 1
DW_AT_decl_line : 7
DW_AT_type : <bd>
DW_AT_external : 1
DW_AT_declaration : 1
<1><1b5>: Abbrev Number: 19 (DW_TAG_variable)
DW_AT_specification: <19e>
DW_AT_location : 9 byte block: 3 0 0 0 0 10 1 b 4 (DW_OP_addr: 10010b04)
<1><1c4>: Abbrev Number: 19 (DW_TAG_variable)
DW_AT_specification: <1a9>
DW_AT_location : 9 byte block: 3 0 0 0 0 10 1 c 7c (DW_OP_addr: 10010c7c)
<1><1d3>: Abbrev Number: 19 (DW_TAG_variable)
DW_AT_specification: <e2>
DW_AT_location : 9 byte block: 3 0 0 0 0 10 1 b 0 (DW_OP_addr: 10010b00)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2010-03-23 21:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 20:17 Sami Wagiaalla
2010-02-25 21:50 ` Tom Tromey
2010-02-25 22:42 ` Jan Kratochvil
2010-02-26 20:11 ` Tom Tromey
2010-03-03 21:46 ` Sami Wagiaalla
2010-03-03 22:00 ` Tom Tromey
2010-03-08 16:39 ` Sami Wagiaalla
2010-03-08 18:58 ` Tom Tromey
2010-03-09 18:21 ` Sami Wagiaalla
2010-03-09 18:27 ` Tom Tromey
2010-03-23 20:31 ` Ulrich Weigand
2010-03-23 20:51 ` Sami Wagiaalla
2010-03-23 21:35 ` Ulrich Weigand [this message]
2010-03-29 14:48 ` Sami Wagiaalla
2010-03-29 17:27 ` Tom Tromey
2010-03-29 17:23 ` Sami Wagiaalla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201003232135.o2NLZWXB002778@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=swagiaal@redhat.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox