aboutsummaryrefslogtreecommitdiff
path: root/gdb/lk-low.c
diff options
context:
space:
mode:
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>2017-02-07 14:17:06 +0100
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-02-07 16:25:54 +0100
commit44098f3fb63fbefcbfffcfb1220d19e2c9a95896 (patch)
tree9b06e7073bdc7c22b0ac026d5f289a028a0ac809 /gdb/lk-low.c
parentfc83f37b41084a8aeae0338b16039db8c0870f04 (diff)
downloadgdb-44098f3fb63fbefcbfffcfb1220d19e2c9a95896.zip
gdb-44098f3fb63fbefcbfffcfb1220d19e2c9a95896.tar.gz
gdb-44098f3fb63fbefcbfffcfb1220d19e2c9a95896.tar.bz2
Add commands for linux-kernel target
This patch implements a "lsmod", "struct" and, "offset" command to work with the new linux-kernel target. The commands are a handy byproduct from development and crude hacks. I don't expect them to be accepted in the current state. Nevertheless there needs to be an discussion on how and where (see gdb/python scrips in kernel sources) to implement them. So here is the start for it. gdb/Changelog: * lk-cmds.h: New file. * lk-cmds.c: New file. * lk-low.c: Include lk-cmds.h. (lk_try_push_target): Init commands. * typeprint.c: Remove unnecessary forward declarations. (whatis_exp): Remove static. * typeprint.h (whatis_exp): New export. * Makefile.in (SFILES, ALLDEPFILES): Add lk-cmds.c. (HFILES_NO_SRCDIR): Add lk-cmds.h. (COMMON_OBS): Add lk-cmds.o.
Diffstat (limited to 'gdb/lk-low.c')
-rw-r--r--gdb/lk-low.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/lk-low.c b/gdb/lk-low.c
index 20206e9..4da7f21 100644
--- a/gdb/lk-low.c
+++ b/gdb/lk-low.c
@@ -27,6 +27,7 @@
#include "gdbthread.h"
#include "gdbtypes.h"
#include "inferior.h"
+#include "lk-cmds.h"
#include "lk-lists.h"
#include "lk-low.h"
#include "lk-modules.h"
@@ -825,6 +826,8 @@ lk_try_push_target ()
if (!target_is_pushed (linux_kernel_ops))
push_target (linux_kernel_ops);
+ lk_init_cmds ();
+
set_solib_ops (gdbarch, lk_modules_so_ops);
}