From: Kai Tietz <Kai.Tietz@onevision.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org, Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: [RFC] convert a host address to a string
Date: Thu, 08 Jan 2009 11:31:00 -0000 [thread overview]
Message-ID: <OF016491C6.E0C032E7-ONC1257538.003F09AD-C1257538.003F3D62@onevision.de> (raw)
In-Reply-To: <20090108112448.GU3664@adacore.com>
Hi Joel,
gdb-patches-owner@sourceware.org wrote on 08.01.2009 12:24:48:
> > By it you can use standard ISO type intptr_t. And I missed to add
> > inttypes.h.
> > By this you could simply use PRIXPTR for printing hex pointer failues.
> >
> > E.g.
> > fprint (fp, "0x%" PRIXPTR, (intptr_t) address);
>
> That's pretty clever. Bad luck for us, however. The MinGW inttypes.h
> defines PRIxPTR as "I64x". When I tried with an example, I got a warning
> because intptr_t is "long long int" whereas "%I64x" requires an unsigned
> int. Changing the cast to uintptr_t helps a little, but it's not enough
> since "unsigned int" is definitely not large enough to hold a pointer!
>
> I really should report that to the MinGW guys!
Ok, I got it. But there is not much to do here. I am a bit curious about
that x wants an unsigned scalar. I have to verify this.
The alternative for this, would be to cast to size_t in general.
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
next prev parent reply other threads:[~2009-01-08 11:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 12:19 Joel Brobecker
2009-01-07 16:17 ` Mark Kettenis
2009-01-08 10:19 ` Joel Brobecker
2009-01-08 10:25 ` Kai Tietz
2009-01-08 10:48 ` Joel Brobecker
2009-01-08 11:02 ` Kai Tietz
2009-01-08 11:25 ` Joel Brobecker
2009-01-08 11:31 ` Kai Tietz [this message]
2009-01-08 12:49 ` Mark Kettenis
2009-01-08 12:54 ` Joel Brobecker
2009-01-08 13:04 ` Kai Tietz
2009-01-08 13:12 ` Mark Kettenis
2009-01-08 13:26 ` Mark Kettenis
2009-01-08 13:35 ` Kai Tietz
2009-01-08 13:42 ` Joel Brobecker
2009-01-08 14:04 ` Kai Tietz
2009-01-08 16:18 ` Mark Kettenis
2009-01-08 16:23 ` Kai Tietz
2009-01-09 9:57 ` Joel Brobecker
2009-01-09 10:05 ` Kai Tietz
2009-01-09 13:12 ` Joel Brobecker
2009-01-09 14:28 ` Kai Tietz
2009-01-10 7:12 ` Joel Brobecker
2009-01-10 13:31 ` Kai Tietz
2009-01-10 13:34 ` Kai Tietz
2009-01-10 13:58 ` Mark Kettenis
2009-01-10 14:04 ` Mark Kettenis
2009-01-10 14:15 ` Kai Tietz
2009-01-10 14:22 ` Mark Kettenis
2009-01-10 14:25 ` Kai Tietz
2009-01-11 13:31 ` Joel Brobecker
2009-01-11 13:53 ` Mark Kettenis
2009-01-13 12:09 ` Joel Brobecker
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=OF016491C6.E0C032E7-ONC1257538.003F09AD-C1257538.003F3D62@onevision.de \
--to=kai.tietz@onevision.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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