From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43674 invoked by alias); 1 Aug 2017 20:21:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 43331 invoked by uid 89); 1 Aug 2017 20:21:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=contribution X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Aug 2017 20:20:58 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v71KKqwA031195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 1 Aug 2017 16:20:56 -0400 Received: by simark.ca (Postfix, from userid 112) id 0FAB81EA05; Tue, 1 Aug 2017 16:20:52 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id D86AF1E043; Tue, 1 Aug 2017 16:20:50 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 01 Aug 2017 20:21:00 -0000 From: Simon Marchi To: Leszek Swirski Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix dwarf2_string_attr for -gsplit-dwarf In-Reply-To: <20170801092030.70676-1-leszeks@google.com> References: <20170801092030.70676-1-leszeks@google.com> Message-ID: <257cba5bb5ca13e66d1e0cd01175aa37@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 1 Aug 2017 20:20:52 +0000 X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00017.txt.bz2 Hi Leszek, On 2017-08-01 11:20, Leszek Swirski via gdb-patches wrote: > The dwarf2_string_attr did not allow DW_FORM_GNU_str_index as a form > for > string types. This manifested as null strings in the namespace_name > lookup (replaced with "(anonymous namespace)") when debugging > Fission-compiled code. Thanks for the patch. I am not very knowledgeable in that area, but I looked at the problem for a while and I think the change is good. DW_STRING (attr) is set for attribute values of this form in read_attribute_value. Other functions like dwarf2_const_value_attr and dump_die_shallow read DW_STRING (attr) when dealing with an attribute of form DW_FORM_GNU_str_index as well. If you think this will be a one-time contribution, we can merge the patch for you, and there is no need for copyright assignment for a simple patch like that. However, if you'd like to contribute further to GDB, we can look into giving you write access, so you'll be able to push patches by yourself. Let me know which one you prefer. I just have some formatting comments about the patch itself. No need for a v2, especially if we push for you, but just so you are aware of the GNU/GDB coding standards. > gdb/doc/ChangeLog: The ChangeLog entry for this patch will go in the gdb/ChangeLog file. > > * dwarf2read.c: Fix dwarf2_string_attr to allow > DW_FORM_GNU_str_index The ChangeLog format has the function name in parentheses, for example: * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt. > --- > gdb/dwarf2read.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index 2c2ecda7fc..f5bed09116 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -17623,7 +17623,8 @@ dwarf2_string_attr (struct die_info *die, > unsigned int name, struct dwarf2_cu *c > if (attr != NULL) > { > if (attr->form == DW_FORM_strp || attr->form == > DW_FORM_line_strp > - || attr->form == DW_FORM_string || attr->form == > DW_FORM_GNU_strp_alt) > + || attr->form == DW_FORM_string || DW_FORM_GNU_str_index > + || attr->form == DW_FORM_GNU_strp_alt) The indentation for this line should be one tab + two spaces (like the previous line). Thanks, Simon