mirror of
https://github.com/badvision/jace.git
synced 2026-04-26 21:18:34 +00:00
Fix break with no args to list breakpoints instead of printing usage
Previously 'break' / 'bp' with no arguments printed a usage message. Now it lists active breakpoints, consistent with how monitor commands are expected to behave when invoked without arguments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
39881bb420
commit
0ca567cecd
2 files changed
+4
-3
No files matched your search
@@ -168,7 +168,7 @@ public class MainMode implements TerminalMode {
|
||||
|
||||
commandHelp.put("cpu", "Displays the current CPU state (registers and flags).\nUsage: cpu");
|
||||
commandHelp.put("registers", "Shows or sets CPU register values.\nUsage: registers [reg value]\nExample: registers PC 4000");
|
||||
commandHelp.put("break", "Manages execution breakpoints.\nUsage: break <addr> | break -<addr> | break clear | break list");
|
||||
commandHelp.put("break", "Manages execution breakpoints.\nUsage: break - List all active breakpoints\n break <addr> - Add a breakpoint\n break -<addr> - Remove a breakpoint\n break clear - Remove all breakpoints");
|
||||
commandHelp.put("runto", "Runs the CPU until it reaches the specified address.\nUsage: runto <addr> (or rt <addr>)");
|
||||
|
||||
commandHelp.put("run", "Runs the CPU for a specified number of cycles or until a breakpoint is hit.\n" +
|
||||
|
||||
@@ -315,7 +315,8 @@ public class MonitorMode implements TerminalMode, WatchCallback {
|
||||
" reg PC $C000 - Set program counter to $C000\n" +
|
||||
" reg X 42 - Set X register to decimal 42");
|
||||
commandHelp.put("break", "Manages breakpoints.\n" +
|
||||
"Usage: break addr - Add a breakpoint at address\n" +
|
||||
"Usage: break - List all active breakpoints\n" +
|
||||
" break addr - Add a breakpoint at address\n" +
|
||||
" break -addr - Remove a breakpoint at address\n" +
|
||||
" break clear - Remove all breakpoints");
|
||||
commandHelp.put("step", "Steps through CPU instructions.\n" +
|
||||
@@ -459,7 +460,7 @@ public class MonitorMode implements TerminalMode, WatchCallback {
|
||||
|
||||
void handleBreakpoint(String[] args) {
|
||||
if (args.length == 0) {
|
||||
output.println("Usage: break <address> or break -<address> or break clear");
|
||||
listBreakpoints();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user