From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2455 invoked by alias); 10 Sep 2012 13:18:57 -0000 Received: (qmail 2447 invoked by uid 22791); 10 Sep 2012 13:18:56 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Sep 2012 13:18:35 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8ADIXcC028508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Sep 2012 09:18:33 -0400 Received: from host2.jankratochvil.net (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8ADISfR025486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 10 Sep 2012 09:18:32 -0400 Date: Mon, 10 Sep 2012 13:18:00 -0000 From: Jan Kratochvil To: Yao Qi Cc: gdb@sourceware.org Subject: Re: Symbol can't be found unless type 'tab' Message-ID: <20120910131828.GA13062@host2.jankratochvil.net> References: <504DE251.1020702@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504DE251.1020702@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00018.txt.bz2 On Mon, 10 Sep 2012 14:51:29 +0200, Yao Qi wrote: > <1><2c>: Abbrev Number: 3 (DW_TAG_variable) > <2d> DW_AT_name : i > <2f> DW_AT_type : <0x23> > <33> DW_AT_location : 0x0 (location list) I guess because GDB does not like such complicated location expression for glboal variables. read_partial_die (const struct die_reader_specs *reader, case DW_AT_location: else if (attr_form_is_section_offset (&attr)) dwarf2_complex_location_expr_complaint (); + add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu) case DW_TAG_variable: if (pdi->d.locdesc) addr = decode_locdesc (pdi->d.locdesc, cu); There was a nice cleanup of it in: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF http://sourceware.org/ml/gdb-patches/2011-07/msg00762.html but I had to later revert it [commit] [patch#2] fetch result of locdesc expressions as integer (not address) http://sourceware.org/ml/gdb-patches/2011-10/msg00462.html due to all the hacks on hacks in GDB needing to be cleaned up first. Regards, jan