diff options
author | Luis Machado <lgustavo@codesourcery.com> | 2015-04-13 14:45:56 -0300 |
---|---|---|
committer | Luis Machado <lgustavo@codesourcery.com> | 2015-04-13 14:45:56 -0300 |
commit | 0ff6fcb2f0f2e3c0de3708ec41fb849d1461c9d7 (patch) | |
tree | 88b7fbf3cc47066ebcbd96264185c852252cf4eb /binutils | |
parent | 7578d5f72c4abb6b49b0394bc810192b06088705 (diff) | |
download | gdb-0ff6fcb2f0f2e3c0de3708ec41fb849d1461c9d7.zip gdb-0ff6fcb2f0f2e3c0de3708ec41fb849d1461c9d7.tar.gz gdb-0ff6fcb2f0f2e3c0de3708ec41fb849d1461c9d7.tar.bz2 |
Harden gdb.base/bp-permanent.exp
This testcase does not work as expected in QEMU (aarch64 QEMU in my case). It
fails when trying to manually write the breakpoint instruction to a certain
PC address.
(gdb) p /x addr_bp[0] = buffer[0]^M
Cannot access memory at address 0x400834^M
(gdb) PASS: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=0: setup: p /x addr_bp[0] = buffer[0]
p /x addr_bp[1] = buffer[1]^M
Cannot access memory at address 0x400835^M
(gdb) PASS: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=0: setup: p /x addr_bp[1] = buffer[1]
p /x addr_bp[2] = buffer[2]^M
Cannot access memory at address 0x400836^M
(gdb) PASS: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=0: setup: p /x addr_bp[2] = buffer[2]
p /x addr_bp[3] = buffer[3]^M
Cannot access memory at address 0x400837^M
(gdb) PASS: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=0: setup: p /x addr_bp[3] = buffer[3]
The following patch prevents a number of failures by detecting this and bailing out in case the target has such a restriction. Writing to .text from within the program isn't any better. It just leads to a SIGSEGV.
Before the patch:
=== gdb Summary ===
After the patch:
=== gdb Summary ===
gdb/testsuite/ChangeLog:
2015-04-13 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/bp-permanent.exp (test): Handle the case of being unable
to write to the .text section.
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions