History

Change debugger options to enumeration. Alter how the debugger displays the registers. Adding a breakpoint that is already set is a no-op and simply returns the current cookie value. Fix bug in print for the Sys module - don't ignore format modifiers.

arr committed 10 years ago

Commit db76c0c1 parent f29cf0d6 files · +45 −41Browse files

Showing the changes to src/exec/main.cpp (1 of 6 files). Show all

Unified · Split

src/exec/main.cpp+5−5
@@ -195,7 +195,7 @@ struct arg_exception_t : std::runtime_error · 194 unmodified lines
195struct exec_options195struct exec_options
196{196{
197 exec_options()197 exec_options()
198 : debugger{}198 : debugger{ debugger_options::none }
199 , enabled_debugger{ false }199 , enabled_debugger{ false }
200 , quiet_start{ false }200 , quiet_start{ false }
201 , print_help{ false }201 , print_help{ false }
@@ -227,7 +227,7 @@ void print_banner(const exec_options &options) · 25 unmodified lines
227 << "System thread usage: " << options.sys_thread_count << "\n";227 << "System thread usage: " << options.sys_thread_count << "\n";
228 228
229 if (options.enabled_debugger)229 if (options.enabled_debugger)
230 std::cout << options.debugger << "\n";230 std::cout << "\n" << options.debugger << "\n";
231 231
232 std::cout << std::endl;232 std::cout << std::endl;
233}233}
@@ -268,11 +268,11 @@ void process_arg(char* arg, std::function<char *()> next, exec_options &options) · 34 unmodified lines
268 {268 {
269 switch (arg[i])269 switch (arg[i])
270 {270 {
271 case 'e': options.debugger.break_on_enter = true;271 case 'e': options.debugger |= debugger_options::break_on_enter;
272 break;272 break;
273 case 'm': options.debugger.break_on_module_load = true;273 case 'm': options.debugger |= debugger_options::break_on_module_load;
274 break;274 break;
275 case 'x': options.debugger.break_on_exception = true;275 case 'x': options.debugger |= debugger_options::break_on_exception;
276 break;276 break;
277 }277 }
278 }278 }