This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- From: Pedro Alves <palves at redhat dot com>
- To: lgustavo at codesourcery dot com
- Cc: Tom Tromey <tromey at redhat dot com>, Stan Shebs <stanshebs at earthlink dot net>, GDB Patches <gdb-patches at sourceware dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 03 Jul 2013 20:25:56 +0100
- Subject: Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- References: <51D1AD43 dot 3060904 at codesourcery dot com> <8761wsgb8i dot fsf at fleche dot redhat dot com> <51D3050C dot 4070309 at codesourcery dot com> <51D30BB0 dot 3050906 at earthlink dot net> <87wqp8estz dot fsf at fleche dot redhat dot com> <51D32100 dot 4000901 at codesourcery dot com> <51D43DBB dot 5090803 at redhat dot com> <51D47A05 dot 9020404 at codesourcery dot com>
On 07/03/2013 08:22 PM, Luis Machado wrote:
> On 07/03/2013 12:05 PM, Pedro Alves wrote:
>> On 07/02/2013 07:50 PM, Luis Machado wrote:
>>> -
>>> -if {[istarget "spu*-*-*"]} then {
>>> - # The internal address format used for the combined Cell/B.E.
>>> - # debugger requires 64-bit.
>>> - set is64bitonly "yes"
>>> -}
>>> -
>>
>> I'm not sure this equates to sizeof pointer == 64-bit.
>> This bit may need to be retained. [Adding Ulrich].
>
> Fair enough. Ulrich, let me know if the pointer check in the attached
> patch doesn't make sense for Cell BE.
>
>>
>>> +
>>> + set sizeof_function_ptr [get_sizeof "void (*)(void)" 8]
>>> + set sizeof_data_ptr [get_sizeof "void *" 8]
>>> + if {${sizeof_function_ptr} != 4 && ${sizeof_data_ptr} != 4} then {
>>> + set is64bitonly "yes"
>>> + }
>>> +}
>>> +
>>
>> srec (etc.) is most used in small embedded targets (e.g., those
>> that include dsrec.o in the configure.tgt), consequently
>> that's where the test is most useful. Such targets
>> are the most likely to have 16-bit pointers (< 4 bytes).
>> E.g., h8300, etc. Looks like this ends up causing the tests to
>> be skipped there too. IOW, a better check would be:
>>
>> if {${sizeof_function_ptr} > 4 || ${sizeof_data_ptr} > 4} then {
>>
>
> Ah, yes. This check is indeed better. Follows an updated patch that does
> this.
>
>> But, this change also means we have reduced routine-checking,
>> as most people test on x86_64. I think we can do better. The test
>> works fine on e.g., x86_64, because programs get linked to low (< 32-bit)
>> addresses by default. That's the point of:
>>
>> if [istarget "alpha*-*-*"] then {
>> # SREC etc cannot handle 64-bit addresses. Force the test
>> # program into the low 31 bits of the address space.
>> lappend options "additional_flags=-Wl,-taso"
>> }
>>
>> (For MIPS N64, if you wanted, I guess you could do similarly
>> to Alpha, and rebuild with:
>>
>> lappend options "ldflags=-Wl,-Tdata=0x600000"
>>
>> to force use of low addresses.)
>>
>> IOW, instead of checking for ABI pointer sizes, I think it'd
>> be better to test for the actual address size of one the
>> variables dumped. That is, check that &intarray is < 32-bit.
>>
>
> If lack of coverage for x86_64 running things on low addresses is a
> problem, we can add an exception for x86_64, what do you think? Adding
> these exceptions usually polute the testcases though.
But do you see a problem with checking whether "&intarray is < 32-bit" instead?
--
Pedro Alves
- References:
- [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
- Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.