From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Nick Clifton'" <nickc@redhat.com>
Cc: "'Kai Tietz'" <ktietz70@googlemail.com>,
"'H.J. Lu'" <hjl.tools@gmail.com>,
"'Binutils'" <binutils@sourceware.org>
Subject: [RFA] Supplemtal patch for use only dwarf_vma types in dwarf code
Date: Fri, 25 Mar 2011 15:48:00 -0000 [thread overview]
Message-ID: <000a01cbeb04$0c0e6e60$242b4b20$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <4D8CB1F5.6020108@redhat.com>
> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-owner@sourceware.org]
De
> la part de Nick Clifton
> Envoyé : vendredi 25 mars 2011 16:17
> À : Pierre Muller
> Cc : 'Kai Tietz'; 'H.J. Lu'; 'Binutils'
> Objet : Re: [RFC-v2] Use only dwarf_vma types in dwarf code
>
> Hi Pierre,
>
> [only a month late...]
> Approved and applied - along with a little tidying up.
Thanks,
I have a few remaining changes to propose:
always in the spirit of the previous RFC,
use dwarf_vma whenever we are not sure that a 'long'
(which can be shorter than a pointer in byte size
on mingw64 system) is enough.
I have no real idea if those three cases are
really variables that can reach up to values that
do not fit in 4-bytes but it can not really hurt, can it?
Pierre Muller
ChangeLog entry:
2011-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
* dwarf.c (decode_location_expression): Use dwarf_vmatoa
function to display DW_OP_addr OP.
(process_debug_info): Use dwarf_vma type for local variables
length and type_offset.
Index: dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.86
diff -u -p -r1.86 dwarf.c
--- dwarf.c 25 Mar 2011 15:15:52 -0000 1.86
+++ dwarf.c 25 Mar 2011 15:39:49 -0000
@@ -674,8 +674,8 @@ decode_location_expression (unsigned cha
switch (op)
{
case DW_OP_addr:
- printf ("DW_OP_addr: %lx",
- (unsigned long) byte_get (data, pointer_size));
+ printf ("DW_OP_addr: %s",
+ dwarf_vmatoa("x", byte_get (data, pointer_size)));
data += pointer_size;
break;
case DW_OP_deref:
@@ -1926,7 +1926,7 @@ process_debug_info (struct dwarf_section
&& num_debug_info_entries == 0
&& ! do_types)
{
- unsigned long length;
+ dwarf_vma length;
/* First scan the section to get the number of comp units. */
for (section_begin = start, num_units = 0; section_begin < end;
@@ -2002,7 +2002,7 @@ process_debug_info (struct dwarf_section
int offset_size;
int initial_length_size;
unsigned char signature[8] = { 0 };
- unsigned long type_offset = 0;
+ dwarf_vma type_offset = 0;
hdrptr = start;
@@ -2084,7 +2084,8 @@ process_debug_info (struct dwarf_section
for (i = 0; i < 8; i++)
printf ("%02x", signature[i]);
printf ("\n");
- printf (_(" Type Offset: 0x%lx\n"), type_offset);
+ printf (_(" Type Offset: 0x%s\n"),
+ dwarf_vmatoa ("x", type_offset));
}
}
next prev parent reply other threads:[~2011-03-25 15:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 14:21 [RFC patch]: Adjust the use of 'long' type in dwarf2.h header Kai Tietz
2011-02-17 18:59 ` Kai Tietz
2011-02-17 19:03 ` Jakub Jelinek
2011-02-17 19:07 ` Kai Tietz
2011-02-17 19:17 ` Jakub Jelinek
2011-02-18 9:50 ` Kai Tietz
2011-02-21 12:37 ` NightStrike
2011-02-21 13:10 ` Pierre Muller
[not found] ` <-8460070221060995487@unknownmsgid>
2011-02-21 13:27 ` Kai Tietz
2011-02-21 13:46 ` Pierre Muller
[not found] ` <-6930711422310680743@unknownmsgid>
2011-02-21 14:30 ` Kai Tietz
2011-02-21 15:25 ` Kai Tietz
2011-02-21 15:43 ` Mark Kettenis
2011-02-21 15:53 ` Kai Tietz
2011-02-22 15:21 ` Nick Clifton
2011-02-23 8:59 ` Kai Tietz
2011-02-23 15:12 ` Pierre Muller
[not found] ` <-2339605939192327273@unknownmsgid>
2011-02-23 17:42 ` Kai Tietz
2011-02-23 21:55 ` Pierre Muller
[not found] ` <-3886800211494155692@unknownmsgid>
2011-02-23 22:51 ` H.J. Lu
2011-02-24 11:33 ` Pierre Muller
[not found] ` <1561346207520594884@unknownmsgid>
2011-02-24 13:50 ` H.J. Lu
2011-02-25 10:40 ` [RFC] Use only dwarf_vma types in dwarf code (was RE: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header) Pierre Muller
[not found] ` <5095785081977025060@unknownmsgid>
2011-02-25 12:23 ` Kai Tietz
2011-02-25 13:31 ` Pierre Muller
2011-02-25 13:35 ` [RFC-v2] Use only dwarf_vma types in dwarf code Pierre Muller
2011-03-25 15:16 ` Nick Clifton
2011-03-25 15:48 ` Pierre Muller [this message]
2011-03-25 18:04 ` [RFA] Supplemtal patch for use " Nick Clifton
2011-03-25 21:44 ` Pierre Muller
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='000a01cbeb04$0c0e6e60$242b4b20$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=ktietz70@googlemail.com \
--cc=nickc@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).