(self)
| 165 | self.assertEqual(reason, DebugStopReason.ProcessExited) |
| 166 | |
| 167 | def test_breakpoint(self): |
| 168 | fpath = name_to_fpath('helloworld', self.arch) |
| 169 | bv = load(fpath) |
| 170 | dbg = DebuggerController(bv) |
| 171 | self.assertNotIn(dbg.launch_and_wait(), [DebugStopReason.ProcessExited, DebugStopReason.InternalError]) |
| 172 | # TODO: right now we are not returning whether the operation succeeds, so we cannot use assertTrue/assertFalse |
| 173 | # breakpoint set/clear should fail at 0 |
| 174 | self.assertIsNone(dbg.add_breakpoint(0)) |
| 175 | self.assertIsNone(dbg.delete_breakpoint(0)) |
| 176 | |
| 177 | # breakpoint set/clear should succeed at entrypoint |
| 178 | entry = dbg.data.entry_point |
| 179 | self.assertIsNone(dbg.delete_breakpoint(entry)) |
| 180 | self.assertIsNone(dbg.add_breakpoint(entry)) |
| 181 | |
| 182 | self.assertEqual(dbg.ip, entry) |
| 183 | dbg.quit_and_wait() |
| 184 | |
| 185 | def test_register_read_write(self): |
| 186 | fpath = name_to_fpath('helloworld', self.arch) |
nothing calls this directly
no test coverage detected