Commit 2e7f67a
authored
check memory region permission on breakpoint/watchpoint creation (#166)
## Purpose
When a `Z` packet it sent to set a breakpoint or watchpoint, check the
access mask for the containing memory region and fail if it doesn't make
sense for the requested breakpoint/watchpoint type.
## Overview
* For hardware and software breakpoints, fail if the containing memory
region is not executable
* For read watchpoints, fail if the containing memory region is not
readable
* For write watchpoints, fail if the containing memory region is not
writeable
* For access watchpoints, fail if the containing memory region is not
either readable or writable.
* Enable the
`TestBadAddressBreakpoints.BadAddressBreakpointTestCase.test_bad_address_breakpoints`
lldb test case that was failing because of the missing checks
## Validation
GitHub build & test job1 parent fc833ca commit 2e7f67a
File tree
3 files changed
+18
-2
lines changed- Sources/GDBRemote
- Support/Testing/Excluded/ds2
3 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1096 | 1099 | | |
1097 | 1100 | | |
1098 | 1101 | | |
1099 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1100 | 1106 | | |
1101 | 1107 | | |
1102 | 1108 | | |
1103 | 1109 | | |
1104 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1105 | 1114 | | |
1106 | 1115 | | |
1107 | 1116 | | |
1108 | 1117 | | |
1109 | 1118 | | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1110 | 1122 | | |
1111 | 1123 | | |
1112 | 1124 | | |
1113 | 1125 | | |
1114 | 1126 | | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1115 | 1130 | | |
1116 | 1131 | | |
1117 | 1132 | | |
1118 | 1133 | | |
1119 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1120 | 1138 | | |
1121 | 1139 | | |
1122 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
0 commit comments