diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2017-02-07 14:17:05 +0100 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2017-02-07 16:25:54 +0100 |
commit | fc83f37b41084a8aeae0338b16039db8c0870f04 (patch) | |
tree | b2f62bfeb8f9b514f16e99728c0de3d42a395b42 /gdb/btrace.h | |
parent | 757186093b40ad3b37962c34294d032b0d88739f (diff) | |
download | gdb-fc83f37b41084a8aeae0338b16039db8c0870f04.zip gdb-fc83f37b41084a8aeae0338b16039db8c0870f04.tar.gz gdb-fc83f37b41084a8aeae0338b16039db8c0870f04.tar.bz2 |
Add kernel module support for linux-kernel target
This patch implements module support for the new linux-kernel target by
adding a target_so_ops. In addition this patch adds handling for kernel
virtual addresses. This is necessary because kernel modules, unlike
task_structs, live in kernel virtual address space. Thus addresses need
to be translated before they can be read from. We achieve this by adding
an implementation for the targets to_xfer_partial hook, which translates
the addresses before passing them down to the target beneath.
gdb/ChangeLog:
* lk-modules.h: New file.
* lk-modules.c: New file.
* lk-low.h (lk_hook_is_kvaddr, lk_hook_vtop)
(lk_hook_get_module_text_offset): New arch dependent hooks.
(sturct lk_private_hooks): Add new hooks.
(LK_MODULES_NAME_LEN, LK_UTS_NAME_LEN): New define.
* lk-low.c (lk-modules.h): New include.
(lk_kvtop, restore_current_target, lk_xfer_partial): New functions.
(lk_init_private_data): Declare needed debug symbols.
(lk_try_push_target): Assert for new hooks and set solib_ops.
(init_linux_kernel_ops): Add implementation for to_xfer_partial.
* solib.c (get_solib_search_path): New function.
* solib.h (get_solib_search_path): New export.
* Makefile.in (SFILES, ALLDEPFILES): Add lk-modules.c.
(HFILES_NO_SRCDIR): Add lk-modules.h.
(COMMON_OBS): Add lk-modules.o.
Diffstat (limited to 'gdb/btrace.h')
0 files changed, 0 insertions, 0 deletions