summaryrefslogtreecommitdiffstats
path: root/kernel/debug/gdbstub.c
diff options
context:
space:
mode:
authorMatt Klein <mklein@twitter.com>2013-01-02 13:20:49 -0800
committerJason Wessel <jason.wessel@windriver.com>2013-03-02 08:52:17 -0600
commit00370b8f8dd6e3171b8202f9c5187a5f73e99497 (patch)
tree5d15f25177a0e4f92e664b27658a48dfeadbbab7 /kernel/debug/gdbstub.c
parent5f784f798c1a6367d314b3ea5d742a5dcc8dc7ca (diff)
downloadblackbird-op-linux-00370b8f8dd6e3171b8202f9c5187a5f73e99497.tar.gz
blackbird-op-linux-00370b8f8dd6e3171b8202f9c5187a5f73e99497.zip
kdb: Setup basic kdb state before invoking commands via kgdb
Although invasive kdb commands are not supported via kgdb, some useful non-invasive commands like bt* require basic kdb state to be setup before calling into the kdb code. Factor out some of this code and call it before and after executing kdb commands via kgdb. Signed-off-by: Matt Klein <mklein@twitter.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug/gdbstub.c')
-rw-r--r--kernel/debug/gdbstub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c
index ce615e064482..ea5e3edb6915 100644
--- a/kernel/debug/gdbstub.c
+++ b/kernel/debug/gdbstub.c
@@ -782,7 +782,10 @@ static void gdb_cmd_query(struct kgdb_state *ks)
len = len / 2;
remcom_out_buffer[len++] = 0;
+ kdb_common_init_state(ks);
kdb_parse(remcom_out_buffer);
+ kdb_common_deinit_state();
+
strcpy(remcom_out_buffer, "OK");
}
break;
OpenPOWER on IntegriCloud