Commit Graph

4 Commits

Author SHA1 Message Date
joevt 177098c957 debugger: Fix interrupt signal.
Typing Control-C in Terminal app causes an interrupt signal that should enter the DPPC debugger but this only worked once since the signal handler never returned. Even if the signal handler reenabled the signal somehow, it calls enter_debugger recursively which is strange since the earlier calls to enter_debugger would never return.

Now the signal handler just sets a flag (power_on) which can be used to exit any loop (emulator loops, stepping loops, disassembly loops, dumping loops).

Main always calls enter_debugger now which calls the ppc_exec loop. The power_on flag will exit the ppc_exec loop to return to the debugger. Recursion of enter_debugger is eliminated except for calls to loguru's ABORT_F.

An enum power_off_reason is used to indicate why the power_on flag is set to false and to determine what happens next.
2024-03-02 12:57:02 -07:00
Maxim Poliakovski c0cd6eb38f Add missing licence headers, update license date. 2021-10-23 21:00:31 +02:00
Waqar Ahmed 0ab9380be3 clang-format everything 2020-05-12 23:55:45 +05:00
Maxim Poliakovski 684a8dee8e Move debugger sources into a dedicated subdirectory. 2019-12-14 13:48:54 +01:00