This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] ARI fix: %p rule
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- Date: Fri, 17 Apr 2009 14:59:38 +0100
- Subject: Re: [RFA] ARI fix: %p rule
- References: <000601c9bf26$50f53740$f2dfa5c0$@u-strasbg.fr>
On Friday 17 April 2009 07:32:43, Pierre Muller wrote:
> Most of the remaining usages of %p
> in printf family messages
> are related to pointers in the host space
> rater that target space.
>
> ? Thus the recommendation to use paddress
> is not correct for these cases, and I
> used host_address_to_string instead.
>
> Is this OK?
Looks okay. Thanks.
(I have a sekret itch that keeps telling me that
host_address_to_string is such a long name for this)
> Pierre Muller
> Pascal language support maintainer for GDB
>
> I left a few cases out, where
> the %p value was not a simple pointer
> but a arithmetic operation,
> I don't know the rules for C,
> is an addition of a pointer and a integer
> always of type pointer?
>
> 2009-04-17 ?Pierre Muller ?<muller.u-strasbg.fr>
>
> ????????ARI fix: Do not use %p, replace by call to host_address_to_string
> ????????for host pointers.
> ????????* darwin-nat.c (darwin_xfer_partial): Apply change.
> ????????* gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
> ????????* gnu-nat.h (proc_debug): Ditto.
> ????????* symmisc.c (maintenance_info_symtabs): Ditto.
> ????????(maintenance_info_psymtabs): Ditto.
> ????????* windows-nat.c (handle_load_dll): Ditto.
> ????????(handle_unload_dll, info_w32_command, handle_exception): Ditto.
> ????????* xtensa-tdep.c (xtensa_unwind_pc): Ditto.
>
--
Pedro Alves