This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Wrap addresses in spu-gdb
- From: Jim Blandy <jimb at codesourcery dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: drow at false dot org (Daniel Jacobowitz), deuling at de dot ibm dot com (Markus Deuling), gdb-patches at sourceware dot org (GDB Patches)
- Date: Wed, 08 Aug 2007 10:10:40 -0700
- Subject: Re: [rfc] Wrap addresses in spu-gdb
- References: <200708081411.l78EBqII022771@d12av02.megacenter.de.ibm.com>
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> Daniel Jacobowitz wrote:
>> On Wed, Aug 08, 2007 at 08:44:29AM +0200, Markus Deuling wrote:
>> > + if (target_has_registers && target_has_stack && target_has_memory
>> > + /* FIXME: Currently needed for dwarf2_read_address to work. */
>> > + && type != builtin_type_uint32)
>>
>> I think that you shouldn't commit a patch with this hack in it.
>> It looks very fragile.
>
> Agreed. Markus, this is a special hack for the combined PPE/SPE
> debugger, it shouldn't be necessary for the SPU-standalone (and
> mainline) version.
>
> I'll have to look into fixing the underlying issue cleanly when
> merging the combined debugger ...
There seem to be a number of cases where conversions between addresses
and pointers require live values from other registers --- for example,
when a pointer's bits are augmented with bits from some system
register, like a segment base register. I'd want to work in the
context of real-world examples, but it might be a good idea to
introduce frame_and_pointer_to_address and
frame_and_address_to_pointer, and use them where they make sense.
Using such functions, clipping SPE addresses using the LSLR register
could be carried out in a reasonable way.