This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] convert a host address to a string
> From: Kai Tietz <Kai.Tietz@onevision.com>
> Date: Thu, 8 Jan 2009 12:01:56 +0100
>
> Joel Brobecker <brobecker@adacore.com> wrote on 08.01.2009 11:48:00:
>
> > > Why not simply use stdint.h (gstdint.h) for this?
> >
> > Could you give more details? I'm not sure what you mean exactly.
> >
> > Thanks,
> > --
> > Joel
> >
>
> 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);
Well, the PRIxxx macros are ISO C99 inventions, so we can't assume
they're generally available. Guess that could be mitigated by
importing inttypes module from gnulib.