Skip to content
Snippets Groups Projects
breakpoints_pdf.py 474 B
Newer Older
pompolic's avatar
pompolic committed
import unittest

# TODO: This actually tests whether the main script set up the breakpoint properly, move to integration
class InitParserBreakpointCreated(unittest.TestCase):
	def test_breakpoint_is_at_ret(self):
		arch = gdb.selected_frame().architecture()
		disassembled_ins = arch.disassemble(init_parser.location)
		ins = disassembled_ins['asm'].split(" ")[0]

		self.assertIn(ins, ["ret", "retq"])

	def test_not_pending(self):
		self.assertFalse(init_parser.pending)