[Linux-Xtensa] [PATCH] xtensa: add support for gdb

czankel chris at zankel.net
Mon Jul 8 02:56:53 PDT 2013


Hi Marc,

Any idea about the mismatch of that file name? Is there a mismatch 
between the overlay file and the GDB repository?

Thanks,
-Chris

On 7/8/13 1:54 AM, Baruch Siach wrote:
> Hi Chris, all,
>
> On Sun, Jul 07, 2013 at 08:12:52AM +0300, Baruch Siach wrote:
>> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
>> ---
>>
>> This should apply on top of git://git.linux-xtensa.org/git/dev/crosstool-NG
>>
>>   scripts/build/debug/300-gdb.sh | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
>> index 6c76334..fc2b8c1 100644
>> --- a/scripts/build/debug/300-gdb.sh
>> +++ b/scripts/build/debug/300-gdb.sh
>> @@ -93,6 +93,10 @@ do_debug_gdb_extract() {
>>           CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}"
>>           CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}"
>>       fi
>> +
>> +    if [ -n "${CT_ARCH_XTENSA_CUSTOM_OVERLAY_FILE}" ]; then
>> +        CT_ConfigureXtensa "gdb" "${CT_GDB_VERSION}"
>> +    fi
> The overlay archive contains gdb/gdbserver/xtensa-regmap.c. However
> linux-xtensa-low.c #includes xtensa-xtregs.c. This causes a mismatch in
> XTENSA_ELF_XTREG_SIZE, segfaulting gdbserver as ptrace (PTRACE_GETXTREGS)
> overflows the userspace buffer. The fix for this is to rename xtensa-regmap.c
> to xtensa-xtregs.c, thus overwriting the original source file.
>
> baruch
>



More information about the linux-xtensa mailing list