[PATCH v6 4/5] gdb: introduce ability to disable frame unwinders
Guinevere Larsen
guinevere@redhat.com
Mon Oct 14 15:32:42 GMT 2024
On 10/12/24 12:43 AM, Thiago Jung Bauermann wrote:
> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
>> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>>
>>> Guinevere Larsen <guinevere@redhat.com> writes:
>>>
>>>> create mode 100644 gdb/testsuite/gdb.base/frame-unwind-disable.c
>>>> create mode 100644 gdb/testsuite/gdb.base/frame-unwind-disable.exp
>> I'm getting these failures on aarch64-linux (but not x86_64-linux) when
>> running "make check", but not with "make check-read1":
>>
>> FAIL: gdb.base/frame-unwind-disable.exp: successfully enabled dummy unwinder (timeout)
>> FAIL: gdb.base/frame-unwind-disable.exp: check if dummy continues enabled (timeout)
>> FAIL: gdb.base/frame-unwind-disable.exp: maint frame-unwinder enable -class GDB
>>
>> I'm still trying to understand what's going on.
> I found the problem.
>
>> +# Proc to check if the unwinder of the given name is in the desired state.
>> +# STATE can be either Y or N.
>> +proc check_unwinder_state { unwinder_name state {testname ""} } {
>> + set should_pass false
>> + set command "maint info frame-unwinders"
>> + if {${testname} == ""} {
>> + set testname "checking state ${state} for ${unwinder_name}"
>> + }
>> + gdb_test_multiple "${command}" "${testname}" -lbl {
>> + -re "${unwinder_name}\\s+\\w+\\s+\\w+\\s+${state}\\s+" {
> The failures go away when I add "(?=\r\n)" at the end of this pattern ...
>
>> + set should_pass true
>> + exp_continue
>> + }
>> + -re "${command}" {
>> + exp_continue
>> + }
>> + -re "\\w+\\s+\\w+\\s+\\w+\\s+\\w+\\s+" {
> ... and also at the end of this pattern.
>
>> + exp_continue
>> + }
>> + -re -wrap "" {
>> + # We can't use -wrap here because it expects the line with start
>> + # with \r\n, but the previous commands eat that
>> + gdb_assert {${should_pass} == true} "${gdb_test_name}"
>> + }
>> + }
>> +}
AH ha! thanks for this. I don't think I would have solved this on my own
lol.
I've added this fix and the nits from the other reply to my local
version, thanks for the review
--
Cheers,
Guinevere Larsen
She/Her/Hers
More information about the Gdb-patches
mailing list