summaryrefslogtreecommitdiffstats
path: root/cpukit/libdebugger/rtems-debugger-cmd.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-07-17 09:53:11 +1000
committerChris Johns <chrisj@rtems.org>2017-08-15 11:39:22 +1000
commitb2353ed92435c3f9301b795bf20bce14f0ddb01b (patch)
treed228865c34c6989827e80c6393ee79ecadff0996 /cpukit/libdebugger/rtems-debugger-cmd.c
parentlibmisc/shell: Make some internal shell functions public. (diff)
downloadrtems-b2353ed92435c3f9301b795bf20bce14f0ddb01b.tar.bz2
libdebugger: Fixes to debugging, ARM support, locking, and gcc-7.1 warnings.
- Add `printk` support to aid multi-core debugging. - Add lock trace to aid lock debugging. - Fixes to gcc-7.1 warnings. - Fixes from ticket #2879. - Add verbose command controls. - Change using the RTEMS sys/lock.h API to manage exception threads. - ARM hardware breakpoint fixes. Support for SMP stepping is not implemented, this requires use of the context id register. Closes #2879.
Diffstat (limited to 'cpukit/libdebugger/rtems-debugger-cmd.c')
-rw-r--r--cpukit/libdebugger/rtems-debugger-cmd.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/cpukit/libdebugger/rtems-debugger-cmd.c b/cpukit/libdebugger/rtems-debugger-cmd.c
index e292065e64..afa522aa91 100644
--- a/cpukit/libdebugger/rtems-debugger-cmd.c
+++ b/cpukit/libdebugger/rtems-debugger-cmd.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
+ * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -180,11 +181,29 @@ static int rtems_shell_main_debugger(int argc, char *argv[])
return 1;
}
}
+ else if (strcasecmp(argv[1], "verbose") == 0) {
+ if (!rtems_debugger_running()) {
+ printf("error: debugger not running.\n");
+ return 1;
+ }
+
+ if (argc == 3 && strcasecmp(argv[2], "on") == 0) {
+ rtems_debugger_set_verbose(true);
+ }
+ else if (argc == 3 && strcasecmp(argv[2], "off") == 0) {
+ rtems_debugger_set_verbose(false);
+ }
+ else {
+ printf("debugger verbose: not on or off\n");
+ return 1;
+ }
+ }
else if (strcasecmp(argv[1], "help") == 0) {
printf("debugger [start/stop/help] ...\n" \
" start -v -R remote -d device -t secs -P priority -l [stdout,stderr,kernel]\n" \
" stop\n" \
" remote-debug <on/off>\n" \
+ " verbose <on/off>\n" \
" help\n");
}
else {