public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: NightStrike <nightstrike@gmail.com>
To: Kai Tietz <ktietz70@googlemail.com>
Cc: Alan Modra <amodra@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
		Binutils <binutils@sourceware.org>, gdb <gdb@sourceware.org>,
		Joel Brobecker <brobecker@adacore.com>,
	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header
Date: Mon, 21 Feb 2011 12:37:00 -0000	[thread overview]
Message-ID: <AANLkTimLzYJNAus+LA1Q2kwo8idN_N8EeDK7y0JWJ_jf@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=f1WRao3oZFBcDi_TB8Zxb1i9+x-hUkzDL+a3U@mail.gmail.com>

Ping

On Fri, Feb 18, 2011 at 4:50 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> 2011/2/17 Jakub Jelinek <jakub@redhat.com>:
>> On Thu, Feb 17, 2011 at 08:06:53PM +0100, Kai Tietz wrote:
>>> > I'd prefer if we could move those binutils specific internal implementation
>>> > details out of the dwarf2.h header, keep it really just for the stuff
>>> > defined in the standard, and add a new binutils specific header somewhere
>>> > else which would contain binutils specific details.
>>>
>>> Well, so we make dwarf2.h in include just host-specific and isn't able
>>> to cover things for foreign target, like 32-bit host can't use this
>>> header for 64-bit dwarf2 information. I am fine by this, but
>>> nevertheless is then the use of 'unsigned long' type within this
>>> header still an issue. Here should be used instead then 'intptr_t'. As
>>> on LLP64 unsigned long isn't wide-enough.
>>
>> I mean that none of the DWARF2_Internal types should be in the
>> include/dwarf2.h headers (that's implementation specific stuff),
>> and the DWARF2_External types are questionable too, to me they look
>> very much like implementation detail too.  E.g. DWARF2_External_LineInfo
>> type is dubious, because it might somehow describe version 2 or 3
>> .debug_line header, but version 4 looks differently, etc.
>> So IMHO the DWARF2_External stuff should be moved too.
>> And the guard should be probably renamed from _ELF_DWARF2_H to _DWARF2_H,
>> I don't see anything ELF specific in the header.
>>
>>        Jakub
>>
>
> So I reworked my patch as Jakub suggested and retested it for
> x86_64-w64-mingw32, i686-w64-mingw32, and x86_64-pc-linux-gnu for gcc,
> binutils, and gdb. Ok for apply?
>
> binutils, gdb, gcc
>
> ChangeLog include/
>
> 2011-02-18  Kai Tietz
>
>                 * dwarf2.h (_ELF_DWARF2_H): Renamed to
>                 _DWARF2_H.
>                 (DWARF2_External_LineInfo, DWARF2_Internal_LineInfo,
>                 DWARF2_External_PubNames, DWARF2_Internal_PubNames,
>                 DWARF2_External_CompUnit, DWARF2_Internal_CompUnit,
>                 DWARF2_External_ARange, DWARF2_Internal_ARange): Removed.
>
>
> ChangeLog binutils/
>
> 2011-02-18  Kai Tietz
>
>                 * dwarf.c (read_leb128): Use dw2_vma_t instead of
>                 long type.
>                 (process_extended_line_op): Use for adr bfd_vma
>                 type and print those typed values via BFD_VMA_FMT.
>                 (fetch_indirect_string): Adjust offset's type.
>                 (decode_location_expression): Adjust argument types
>                 and uvalue type.
>                 (read_and_display_attr_value): Likewise.
>                 (read_and_display_attr): Likewise.
>                 (decode_location_expression): Adjust printf format.
>                 (process_debug_info): Likewise.
>                 (display_debug_lines_raw): Likewise.
>                 (display_debug_lines_decoded): Likewise.
>                 (display_debug_pubnames): Likewise.
>                 (display_debug_loc): Likewise.
>                 (display_debug_aranges): Likewise.
>                 * dwarf.h (DWARF2_External_LineInfo,
>                 DWARF2_Internal_LineInfo, DWARF2_External_PubNames,
>                 DWARF2_Internal_PubNames, DWARF2_External_CompUnit,
>                 DWARF2_Internal_CompUnit, DWARF2_External_ARange,
>                 DWARF2_Internal_ARange): Added..
>                 (read_leb128): Adjust return type.
>
> Regards,
> Kai
>
> PS: A lot of those moved structures aren't used at all in binutils
> dwarf.c (which is the only consumer of some of those structures as a
> grep over binutils/gdb/gcc had shown). So maybe the unused could be
> removed in a second patch completely.
>

  reply	other threads:[~2011-02-21 12:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 14:21 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 [this message]
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                                   ` [RFA] Supplemtal patch for use " Pierre Muller
2011-03-25 18:04                                     ` 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=AANLkTimLzYJNAus+LA1Q2kwo8idN_N8EeDK7y0JWJ_jf@mail.gmail.com \
    --to=nightstrike@gmail.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=ktietz70@googlemail.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).