From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Kai Tietz'" <ktietz70@googlemail.com>
Cc: "'Binutils'" <binutils@sourceware.org>
Subject: RE: [RFC] Use only dwarf_vma types in dwarf code (was RE: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header)
Date: Fri, 25 Feb 2011 13:31:00 -0000 [thread overview]
Message-ID: <00d301cbd4f0$44540e30$ccfc2a90$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <AANLkTik9=KVF+gX9yR-=EtnHDnnOmWG2wGaKqbDXn9Os@mail.gmail.com>
> > + if (byte_size > 0 && byte_size <=8)
>
> Whitespace issue. should be ... && byte_size <= 8)
Indeed, I still make silly formatting errors, sorry.
> > + offset = 16 - 2 * byte_size;
> > + else
> > + error("Wrong size in print_dwarf_vma");
> > +
> > + fputs (buff + offset, stdout);
> > }
> >
> > +#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >=
> 2)
> > +#ifndef __MSVCRT__
> Please don't use here __MSVCRT__, instead use
> #if !defined (__MSVCRT__) && !defined (__MINGW32__)
>
> As __MSVCRT__ is just declared by VC, and __MINGW32__ for gcc. IMHO
> __MINGW32__ should be the only guard necessary here, as VC neither
> defines __STDC_VERSION__ > 199901L and it doesn't defines __GNUC__,
> too.
This is just a copy of what is already present
in dwarf_print_vma function a few lines above in the patched
file, so that we should fixed both occurrences
> > +#define DWARF_VMA_FMT "ll"
> > +#else
> > +#define DWARF_VMA_FMT "I64"
> > +#endif
> > +#else
> > +#define DWARF_VMA_FMT "l"
> > +#endif
> > +
>
> > -bfd_vma
> > +static char *
> > +dwarf_svmatoa (const char *fmtch, dwarf_signed_vma value)
>
> Why you are using here dwarf_svmatoa? It should be dwarf_vmatoa
> As the formatter is specified here as argument and in dwarf_vmatoa the
> formatter-buffer is constructed, I see no point in adding a signed
> variant.
I was worried about possible signed values in a signed type
that is shorter than dwarf_vma...
Suppose that you have a 32-bit integer that has a value of -5,
but this is probably due to my lack of knowledge of C integer
signed<->unsigned conversion rules...
I made a short check and it seems that indeed this is not necessary...
> This is just a first glance, and well, I can't approve this patch. But
> in general I appreachiate your modification.
Thanks for your appreciation!
I will send a modified version of the patch shortly.
Pierre
next prev parent reply other threads:[~2011-02-25 13:31 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 [this message]
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='00d301cbd4f0$44540e30$ccfc2a90$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=binutils@sourceware.org \
--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).