diff options
author | Simon Farre <simon.farre.cx@gmail.com> | 2023-06-19 17:13:05 +0200 |
---|---|---|
committer | Simon Farre <simon.farre.cx@gmail.com> | 2023-06-19 17:13:05 +0200 |
commit | d32d7e918de766807190dbfb3ada94faa6b25967 (patch) | |
tree | 22f3b16aef4b4a4926a518f78d33747e966d4663 | |
parent | ce65796b17d72d70e831b6d2cfc239b9d99a1f36 (diff) | |
download | gdb-d32d7e918de766807190dbfb3ada94faa6b25967.zip gdb-d32d7e918de766807190dbfb3ada94faa6b25967.tar.gz gdb-d32d7e918de766807190dbfb3ada94faa6b25967.tar.bz2 |
Fixes 28ab59607ef40b9571c0702ffba8f6aa6fb1b033
Python formatting errors fixed, introduced by this commit.
-rw-r--r-- | gdb/testsuite/gdb.python/py-thread-exited.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.python/py-thread-exited.py b/gdb/testsuite/gdb.python/py-thread-exited.py index 32a9e5b..1a55c3d 100644 --- a/gdb/testsuite/gdb.python/py-thread-exited.py +++ b/gdb/testsuite/gdb.python/py-thread-exited.py @@ -21,17 +21,25 @@ threadTwoExit = "" # store it here. we don't care about it though. mainThreadExit = "" + def thread_exited_handler(event): global threadOneExit, threadTwoExit, mainThreadExit print("{}".format(event)) assert isinstance(event, gdb.ThreadExitedEvent) if threadOneExit == "": - threadOneExit = "event type: thread-exited. global num: {}".format(event.inferior_thread.global_num) + threadOneExit = "event type: thread-exited. global num: {}".format( + event.inferior_thread.global_num + ) else: if threadTwoExit == "": - threadTwoExit = "event type: thread-exited. global num: {}".format(event.inferior_thread.global_num) + threadTwoExit = "event type: thread-exited. global num: {}".format( + event.inferior_thread.global_num + ) else: - mainThreadExit = "event type: thread-exited. global num: {}".format(event.inferior_thread.global_num) + mainThreadExit = "event type: thread-exited. global num: {}".format( + event.inferior_thread.global_num + ) + class test_events(gdb.Command): """Test events.""" @@ -43,4 +51,5 @@ class test_events(gdb.Command): gdb.events.thread_exited.connect(thread_exited_handler) print("Event testers registered.") + test_events() |