This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4] gdb: ADI support
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Weimin Pan <weimin dot pan at oracle dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 02 Aug 2017 08:55:34 +0100
- Subject: Re: [PATCH v4] gdb: ADI support
- Authentication-results: sourceware.org; auth=none
- References: <c3322bb7-87ac-4fa9-96ab-7f0544b95f44@default>
Weimin Pan <weimin.pan@oracle.com> writes:
>> gdb_test "adi x shmaddr" "${hex}00:.*\t0.*" "examine ADI"
>
> Or change it to:
>
> gdb_test "adi x shmaddr" "${hex}00:\t0 " "examine ADI"
>
Why does it print a trailing space? Can we remove it? It is from the
for loop in adi_print_versions,
+ for (int i = maxelts; i > 0 && cnt > 0; i--, cnt--)
+ {
+ if (tags[v_idx] == 0xff) /* no version tag */
+ printf_filtered ("- ");
+ else
+ printf_filtered ("%1X ", tags[v_idx]);
+ ++v_idx;
+ }
>>
>>
>> > gdb_test "adi x/100 shmaddr" "${hex}00:\t${newadi} ${newadi}" \
>> > "examine new ADI"
>>
>> It will pass if changed to:
>>
>> gdb_test "adi x/100 shmaddr" "${hex}00:.*\t${newadi} ${newadi}.*" \
>> "examine new ADI"
>
> Or change it to:
>
> gdb_test "adi x/100 shmaddr" "${hex}00:\t${newadi} ${newadi} " \
> "examine new ADI"
>
Likewise.
>>
>> >> (gdb) PASS: gdb.arch/sparc64-adi.exp: reset ADI
>> >> continue^M
>> >> Continuing.^M
>> >> ^M
>> >> Program received signal SIGSEGV, Segmentation fault^M
>> >> ADI precise mismatch while accessing address 0xfff8000100048000.^M
>> >> 0xfff8000100129f38 in adi_set_version () from /usr/lib64/libadi.so^M
>> > gdb_test "continue" \
>> > [multi_line "Program received signal SIGSEGV, Segmentation fault" \
>> > "ADI precise mismatch while accessing address $hex" ] \
>> > "continue to sigsegv"
>>
>> And it will pass if changed to
>>
>> gdb_test "continue" \
>> [multi_line ".*Program received signal SIGSEGV, Segmentation fault.*" \
>> ".*ADI precise mismatch while accessing address $hex.*" ] \
>> "continue to sigsegv"
>
> Or change it to:
>
> gdb_test "continue" \
> [multi_line "Program received signal SIGSEGV, Segmentation fault.*" \
> "ADI precise mismatch while accessing address $hex.*" ] \
> "continue to sigsegv"
That is OK.
--
Yao (齐尧)