]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: Make test result accurate in breakpoint-in-ro-region.exp
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 31 Jan 2026 08:24:06 +0000 (16:24 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Fri, 13 Feb 2026 10:08:07 +0000 (18:08 +0800)
commit9e04f8748c0193e75460337a32f2b1442a8799c2
tree50e802da41bd090b7d1c31f42e1fc1e68738bd92
parent1319410a1e9d857f15c9019a87d6d4b62fa6d39a
gdb: Make test result accurate in breakpoint-in-ro-region.exp

Currently, if no support for hardware breakpoints, when executing:

  make check-gdb TESTS="gdb.base/breakpoint-in-ro-region.exp"

the test results of "hbreak" and "si" command are "PASS":

```
(gdb) hbreak *0x120000628^M
No hardware breakpoint support in the target.^M
(gdb) PASS: gdb.base/breakpoint-in-ro-region.exp: probe hbreak support (no support)

si^M
Note: automatically using hardware breakpoints for read-only addresses.^M
Warning:^M
Cannot insert hardware breakpoint 0.^M
Could not insert hardware breakpoints:^M
You may have requested too many hardware breakpoints/watchpoints.^M
^M
(gdb) PASS: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw on: step in ro region (cannot insert hw break)
```

This is not accurate, obviously it should be "UNSUPPORTED".

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33845
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp