xref: /openbmc/qemu/tests/tcg/multiarch/gdbstub/test-thread-breakpoint.py (revision 1c8e621f097362d0a28c65fa2f31054b47a5282b)
14a82be77SPavel Labathfrom __future__ import print_function
24a82be77SPavel Labath#
34a82be77SPavel Labath# Test auxiliary vector is loaded via gdbstub
44a82be77SPavel Labath#
54a82be77SPavel Labath# This is launched via tests/guest-debug/run-test.py
64a82be77SPavel Labath#
74a82be77SPavel Labath
84a82be77SPavel Labathimport gdb
9*4d48c1bcSIlya Leoshkevichfrom test_gdbstub import main, report
104a82be77SPavel Labath
114a82be77SPavel Labath
124a82be77SPavel Labathdef run_test():
134a82be77SPavel Labath    "Run through the tests one by one"
144a82be77SPavel Labath
154a82be77SPavel Labath    sym, ok = gdb.lookup_symbol("thread1_func")
164a82be77SPavel Labath    gdb.execute("b thread1_func")
174a82be77SPavel Labath    gdb.execute("c")
184a82be77SPavel Labath
194a82be77SPavel Labath    frame = gdb.selected_frame()
204a82be77SPavel Labath    report(str(frame.function()) == "thread1_func", "break @ %s"%frame)
214a82be77SPavel Labath
224a82be77SPavel Labath
23*4d48c1bcSIlya Leoshkevichmain(run_test)
24