From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>, Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PUSHED] Fix go32-nat.c build fallout from to_detach constification.
Date: Wed, 15 Jan 2014 21:25:00 -0000 [thread overview]
Message-ID: <21206.64706.812098.20292@ruffy.mtv.corp.google.com> (raw)
In-Reply-To: <52D6C940.3040008@redhat.com>
Pedro Alves writes:
> On 01/15/2014 05:13 PM, Eli Zaretskii wrote:
>
> > /* The DWP file version is stored in the hash table. Oh well. */
> > if (dwp_file->cus->version != dwp_file->tus->version)
> > {
> > /* Technically speaking, we should try to limp along, but this is
> > pretty bizarre. */
> > error (_("Dwarf Error: DWP file CU version %d doesn't match" <<<<<<
> > " TU version %d [in DWP file %s]"), <<<<<<<<<<<<<<<<<<<<<<
> > dwp_file->cus->version, dwp_file->tus->version, dwp_name);
> >
> > So it really tries to format uint32_t values with %d.
>
> Wait, we've been through this before.
> See 21aa081e21da472e1e470d57770953c5e5c01477 (below).
> So, that should be adjusted to do pulongest instead.
Headaches indeed. Oh well.
I've pushed this to trunk and the 7.7 branch.
2014-01-15 Doug Evans <dje@google.com>
* dwarf2read.c (open_and_init_dwp_file): Use pulongest to print
uint32_t.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 90c60cd..71bbe96 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -10544,10 +10544,12 @@ open_and_init_dwp_file (void)
if (dwp_file->cus->version != dwp_file->tus->version)
{
/* Technically speaking, we should try to limp along, but this is
- pretty bizarre. */
- error (_("Dwarf Error: DWP file CU version %d doesn't match"
- " TU version %d [in DWP file %s]"),
- dwp_file->cus->version, dwp_file->tus->version, dwp_name);
+ pretty bizarre. We use pulongest here because that's the established
+ portability solution (e.g, we can use %u for uint32_t). */
+ error (_("Dwarf Error: DWP file CU version %s doesn't match"
+ " TU version %s [in DWP file %s]"),
+ pulongest (dwp_file->cus->version),
+ pulongest (dwp_file->tus->version), dwp_name);
}
dwp_file->version = dwp_file->cus->version;
next prev parent reply other threads:[~2014-01-15 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 16:36 Pedro Alves
2014-01-15 17:13 ` Eli Zaretskii
2014-01-15 17:45 ` Pedro Alves
2014-01-15 21:25 ` Doug Evans [this message]
2014-01-16 2:52 ` Joel Brobecker
2014-01-16 17:35 ` Doug Evans
2014-01-16 12:56 ` Pedro Alves
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=21206.64706.812098.20292@ruffy.mtv.corp.google.com \
--to=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@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).