[PATCH 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp

Thiago Jung Bauermann thiago.bauermann@linaro.org
Tue Apr 23 01:20:52 GMT 2024


Kevin Buettner <kevinb@redhat.com> writes:

> On Sun, 21 Apr 2024 21:24:42 -0300
> Thiago Jung Bauermann <thiago.bauermann@linaro.org> wrote:
>
>> >> +require libc_has_debug_info
>> >
>> > I'm wondering about the need for this requirement.  When I comment it
>> > out and run it on a machine without libc debuginfo, I do see 3 FAILs,
>> > but it seems to me that those could be turned into PASSes by changing
>> > the regular expressions for the "continue until..." tests.
> [...]
>>
>> I added the requirement because in my aarch64-linux system without libc6
>> debug info I get:
>>
>> continue
>> Continuing.
>>
>> Hardware watchpoint 2: -location a[28]
>>
>> Old value = 104 'h'
>> New value = 0 '\000'
>> 0x0000fffff7e90664 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
>> (gdb) FAIL: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits
>>
>> And I just tested removing libc6-dbg from my x86_64-linux laptop:
>>
>> continue
>> Continuing.
>>
>> Hardware watchpoint 2: -location a[28]
>>
>> Old value = 104 'h'
>> New value = 0 '\000'
>> 0x00007ffff7d8e05f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
>> (gdb) FAIL: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits
>>
>> So it depends on the system.
>
> What distro are you using?

Ubuntu. Version 22.04 on some machines, and version 23.10 on others.

>> One alternative would be to not use the require statement and run the
>> test until the watchpoint hits, and have a case in gdb_test_multiple to
>> mark as UNRESOLVED if the function name is '??'.
>
> I'm in favor of this approach.
>
> If we stick with the require statement, I think that Fedora testing
> will frequently show this new test as unsupported since installing
> debuginfo is less common / important that it used to be.  (This is
> due to debuginfod doing it for you.  But I think that debuginfod is
> mostly disabled when running the GDB tests.)

Yes, that is a good point. I think v3 should work with the output you
pasted in a previous email. Thank you for bring this up.

--
Thiago


More information about the Gdb-patches mailing list