From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29519 invoked by alias); 22 Nov 2006 22:29:48 -0000 Received: (qmail 29508 invoked by uid 22791); 22 Nov 2006 22:29:47 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Nov 2006 22:29:43 +0000 Received: (qmail 22364 invoked from network); 22 Nov 2006 22:29:41 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 22 Nov 2006 22:29:41 -0000 To: "Gary Funck" Cc: Subject: Re: patch: improve decode-to-name of additional dwarf2/dwarf3 codes References: <200611222018.kAMKI9J1007420@intrepid.intrepid.com> From: Jim Blandy Date: Wed, 22 Nov 2006 22:29:00 -0000 In-Reply-To: <200611222018.kAMKI9J1007420@intrepid.intrepid.com> (Gary Funck's message of "Wed, 22 Nov 2006 13:46:36 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2006-11/txt/msg00274.txt.bz2 "Gary Funck" writes: > While debugging GDB, I noticed the routines in dwarf2read.c that > decode Dwarf2 and Dwarf3 codes into their corresponding string > names have not been updated to include the various encodings > that have been added over the past few years. This primarily > impacts the diagnostic output that assists when debugging GDB. > > Attached is a suggested patch (to gdb 6.5), which brings the > various *_name routines up to date with include/elf/dwarf2.h. > > There is a small problem in the decoding caused by the > following (in dwarf2.h): > > /* GNU extensions. */ > DW_OP_GNU_push_tls_address = 0xe0, > /* HP extensions. */ > DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. > */ > > I arbitrarily chose to decode 0xe0 as "DW_OP_GNU_push_tls_address". > Also, I preserved the "#ifdef MIPS" inside dwarf_attr_name(), but > it wasn't clear to me that it is needed. If it is, then for > consistency, perhaps ifdef's for HP, GNU, DWARF3, and other > extensions to Dwarf2 would also be required. > > ChangeLog: > > * dwarf2read.c (dwarf_attr_name dwarf_cfi_name dwarf_stack_op_name > dwarf_tag_name dwarf_type_encoding_name): decode additional Dwarf2 > and Dwarf3 codes into their corresponding string names. Hi, this looks good. Some minor comments: - In your ChangeLog entry, put commas between the function names. It's also standard now to enclose each full line in the list of function names in its own pair of parens, as was done here, in the 4th through 6th lines: * target.h (enum target_object): Add TARGET_OBJECT_FLASH. (target_write_with_progress): Update comment. (struct target_ops): Add to_flash_erase and to_flash_done. (target_flash_erase, target_flash_done, struct memory_write_request) (memory_write_request_s, enum flash_preserve_mode) (target_write_memory_blocks): New, including a vector type for memory_write_request_s. - DWARF is an acronym (Debug With Arbitrary Record Format), so it needs to be written in all caps. The version number isn't a part of the name; "DWARF 2" and "DWARF 3" is best. - Thanks for fixing the indentation, and making the comments end with a period and two spaces. Do you have a copyright assignment on file with the FSF? I know this change is mostly mechanical, but I think it's arguably copyrightable, and I'd like to stay out of gray areas when it comes to these intellectual property issues.