[PATCH v4] gdb: ADI support

Yao Qi qiyaoltc@gmail.com
Wed Aug 2 07:55:00 GMT 2017


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 (齐尧)



More information about the Gdb-patches mailing list