This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [1/3] Remove gdbarch-swapping of remote_address_masked
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 12 Jun 2007 11:34:53 -0400
- Subject: Re: [1/3] Remove gdbarch-swapping of remote_address_masked
- References: <200706082322.l58NMZAD019415@d12av02.megacenter.de.ibm.com>
On Sat, Jun 09, 2007 at 01:22:35AM +0200, Ulrich Weigand wrote:
> Hello,
>
> remote.c contains a gdbarch-swapped variable "remote_address_masked". The
> swap function in fact re-sets the variable to the default address size of
> the target.
>
> This patch attempts to decouple changes to the variable by the user
> (via "set remoteaddresssize") from changes due to architecture switches:
>
> - If the user sets the variable, that value is subsequently used (even
> if the architecture switches).
>
> - If the user never used "set remoteaddresssize" (i.e. the variable
> reads 0), remote_address_masked implicitly uses the current target's
> address size instead.
>
>
> Now this is certainly a change in behaviour, but I'd think the new way
> should actually be more useful ...
>
> Any comments from users of that functionality? Does this make sense?
Seems right to me. I can't tell if there are any users, because there
seems to be at least one IDE or set of instructions on the internet
that recommends setting it; I found several places where it was set to
the default value, but I'm not sure about others. If we have to keep
it, I think this is the right way to do so.
--
Daniel Jacobowitz
CodeSourcery