Bug 18003 - Some fails in gdb.base/breakpoint-in-ro-region.exp
Summary: Some fails in gdb.base/breakpoint-in-ro-region.exp
Status: RESOLVED DUPLICATE of bug 18072
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-20 12:27 UTC by Yao Qi
Modified: 2018-04-18 18:57 UTC (History)
1 user (show)

See Also:
Host:
Target: aarch64-linux-gnu
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yao Qi 2015-02-20 12:27:18 UTC
I see some fails as below on aarch64-linux-gnu target, in both remote and native testing...

si^M
0x0000000000400738      23        i = 0;^M
(gdb) FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted off: auto-hw off: step in ro region

si^M
0x0000000000400740      24        i = 0;^M
(gdb) FAIL: gdb.base/breakpoint-in-ro-region.exp: always-inserted on: auto-hw off: step in ro region

looks the hex is unexpected to the pattern matching,

    set test "step in ro region"
    gdb_test_multiple "si" $test {
	-re "Could not insert hardware breakpoints.*$gdb_prompt $" {
	    gdb_assert {!$hw_step && $auto_hw == "on" && !$supports_hbreak} \
		"$test (cannot insert hw break)"
	}
	-re "Cannot set software breakpoint at read-only address $next_insn.*$gdb_prompt $" {
	    gdb_assert {!$hw_step && $auto_hw == "off"} \
		"$test (cannot insert sw break)"
	}
	-re "^si\r\nNote: automatically using hardware breakpoints for read-only addresses\.\r\n${decimal}\[ \t\]+i = 0;\r\n$gdb_prompt $" {
	    gdb_assert {!$hw_step && $auto_hw == "on" && $supports_hbreak} \
		"$test (auto-hw)"
	}
	-re "^si\r\n${decimal}\[ \t\]+i = 0;\r\n$gdb_prompt $" {
	    gdb_assert {$hw_step || ($auto_hw == "on" && $supports_hbreak)} \
		"$test (no error)"
	}
    }

further analysis is needed.
Comment 1 weimin.pan 2017-11-08 22:17:02 UTC
The test case is now passing with the upstream gdb:

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

# of expected passes            40
/home/wepan/binutils-gdb/gdb/testsuite/../../gdb/gdb version  8.0.50.20170915-git -nw -nx -data-directory /home/wepan/binutils-gdb/gdb/testsuite/../data-directory

make[2]: Leaving directory '/home/wepan/binutils-gdb/gdb/testsuite'
make[1]: Leaving directory '/home/wepan/binutils-gdb/gdb/testsuite'
Comment 2 weimin.pan 2018-04-18 18:57:50 UTC
This is a duplicate of 18072 which is fixed with 
commit ca5fd19bfb2a41fae7696d67d1f4dce5d5a9053a.

*** This bug has been marked as a duplicate of bug 18072 ***