From: Jim Blandy <jimb@codesourcery.com>
To: "Gary Funck" <gary@intrepid.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: patch: improve decode-to-name of additional dwarf2/dwarf3 codes
Date: Wed, 22 Nov 2006 22:29:00 -0000 [thread overview]
Message-ID: <m3k61n5d3e.fsf@codesourcery.com> (raw)
In-Reply-To: <200611222018.kAMKI9J1007420@intrepid.intrepid.com> (Gary Funck's message of "Wed, 22 Nov 2006 13:46:36 -0800")
"Gary Funck" <gary@intrepid.com> 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.
next prev parent reply other threads:[~2006-11-22 22:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 21:46 Gary Funck
2006-11-22 22:29 ` Jim Blandy [this message]
2006-11-27 21:24 ` Jim Blandy
2006-11-28 15:37 ` Daniel Jacobowitz
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=m3k61n5d3e.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=gary@intrepid.com \
--cc=gdb-patches@sourceware.org \
/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