mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-02 21:30:40 +00:00
debugger: Erase prompt when repeating command.
Enterring a blank command continues the disassembly or stepping for one instruction. Erasing the prompt saves one line in the console so the disassembly doesn't appear double spaced. I don't know if the terminal control sequence works in Windows.
This commit is contained in:
parent
625e474c03
commit
27d389c36a
@ -438,6 +438,13 @@ static void mysig_handler(int signum)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void delete_prompt() {
|
||||
#ifndef _WIN32
|
||||
// move up, carriage return (move to column 0), erase from cursor to end of line
|
||||
cout << "\e[A\r\e[0K";
|
||||
#endif
|
||||
}
|
||||
|
||||
void enter_debugger() {
|
||||
string inp, cmd, addr_str, expr_str, reg_expr, last_cmd, reg_value_str,
|
||||
inst_string, inst_num_str, profile_name, sub_cmd;
|
||||
@ -620,11 +627,17 @@ void enter_debugger() {
|
||||
|
||||
if (context == 2) {
|
||||
#ifdef ENABLE_68K_DEBUGGER
|
||||
if (cmd_repeat) {
|
||||
delete_prompt();
|
||||
}
|
||||
for (; --count >= 0;) {
|
||||
exec_single_68k();
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if (cmd_repeat) {
|
||||
delete_prompt();
|
||||
}
|
||||
for (; --count >= 0;) {
|
||||
ppc_exec_single();
|
||||
}
|
||||
@ -703,6 +716,7 @@ void enter_debugger() {
|
||||
if (context == 2) {
|
||||
#ifdef ENABLE_68K_DEBUGGER
|
||||
if (cmd_repeat) {
|
||||
delete_prompt();
|
||||
addr = next_addr_68k;
|
||||
}
|
||||
else {
|
||||
@ -713,6 +727,7 @@ void enter_debugger() {
|
||||
#endif
|
||||
} else {
|
||||
if (cmd_repeat) {
|
||||
delete_prompt();
|
||||
addr = next_addr_ppc;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user