Re: [RFA] ARI fix: %p rule

Pedro Alves
2009-04-17T13:59:38Z

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