From: Philipp Rudo <prudo@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: Omair Javaid <omair.javaid@linaro.org>,
Yao Qi <qiyaoltc@gmail.com>,
arnez@linux.vnet.ibm.com
Subject: [RFC v5 0/9] Add support for Linux kernel debugging
Date: Mon, 12 Mar 2018 15:31:00 -0000 [thread overview]
Message-ID: <20180312153115.47321-1-prudo@linux.vnet.ibm.com> (raw)
Hi everybody,
after a long time here is a sign of life from kernel awareness.
Originally i planed to bring the patches upstream one by one. However i'm
currently stuck on an other project. But I should find time soon to
continue here.
The main change between v4 and v5 is the C++ification of lk_low, which
required big parts of the file to be rewritten. Along with that smaller
improvements and bug fixes where made.
Changes v4 -> v5:
* Rebase to current master.
* C++-ify lk-low, i.e. replace:
- struct lk_private -> class linux_kernel_ops,
- hooks -> virtual member functions in linux_kernel_ops,
- macros -> member function of linux_kernel_ops,
- htab_t -> std::unordered_map for cached symbols,
- gdbarch_lk_init_private -> gdbarch_get_new_lk_ops,
- lk_list & lk_bitmap -> iterator class,
- const char * -> const std::string & (where possible),
- whatever I forgot, lk-low was basically rewritten.
* Add class s390_linux_kernel_ops inherited from linux_kernel_ops.
* Add GDB_OSABI_LINUX_KERNEL (patch #4). Architectures must use a
sniffer to distinguish between user- and kernel-space as in ELF both
have type Linux.
* Introduce ENUM_FLAG lk_kconfig to track config options used in
kernel and turn off features not supported by the kernel (e.g.
module support).
* Fix handling of fields defined in anonymous structs.
* Fix call to target beneath->to_fetch_registers. Adjust that
to_fetch_registers uses regcache->ptid() instead of inferior_ptid
nowadays (bcc0c096d5b et al.). Requires new patch #3.
* Fix typo in size of (s390) topdpreg.
* Fix bug in S390_LK_ROUNDUP and rename to LK_ALIGN.
* Move s390 split up to separate patch set (already pushed) and
adjust s390 code accordingly.
Thanks
Philipp
Philipp Rudo (9):
Convert substitute_path_component to C++
Add libiberty/concat styled concat_path function
Add scoped_restore_regcache_ptid
Add basic Linux kernel support
Add kernel module support for linux-kernel target
Add commands for linux-kernel target
Add privileged registers for s390x
Link frame_info to thread_info
Add S390 support for linux-kernel target
gdb/Makefile.in | 12 +
gdb/auto-load.c | 19 +-
gdb/common/common-utils.h | 11 +
gdb/configure.tgt | 9 +-
gdb/defs.h | 1 +
gdb/features/Makefile | 11 +-
gdb/features/s390-cr.xml | 26 +
gdb/features/s390x-cr-linux64.c | 99 ++++
gdb/features/s390x-cr-linux64.xml | 24 +
gdb/features/s390x-vxcr-linux64.c | 170 ++++++
gdb/features/s390x-vxcr-linux64.xml | 25 +
gdb/frame.c | 12 +
gdb/frame.h | 2 +
gdb/gdbarch.c | 32 ++
gdb/gdbarch.h | 9 +
gdb/gdbarch.sh | 4 +
gdb/lk-bitmap.h | 226 ++++++++
gdb/lk-cmds.c | 254 +++++++++
gdb/lk-cmds.h | 25 +
gdb/lk-list.h | 201 +++++++
gdb/lk-low.c | 953 +++++++++++++++++++++++++++++++
gdb/lk-low.h | 362 ++++++++++++
gdb/lk-modules.c | 501 ++++++++++++++++
gdb/lk-modules.h | 148 +++++
gdb/osabi.c | 1 +
gdb/regcache.h | 21 +
gdb/regformats/s390x-cr-linux64.dat | 76 +++
gdb/regformats/s390x-vxcr-linux64.dat | 108 ++++
gdb/s390-lk-tdep.c | 1015 +++++++++++++++++++++++++++++++++
gdb/s390-lk-tdep.h | 39 ++
gdb/s390-tdep.c | 44 +-
gdb/s390-tdep.h | 90 ++-
gdb/solib.c | 8 +
gdb/solib.h | 5 +
gdb/typeprint.c | 2 +-
gdb/typeprint.h | 2 +
gdb/utils.c | 85 +--
gdb/utils.h | 26 +-
38 files changed, 4599 insertions(+), 59 deletions(-)
create mode 100644 gdb/features/s390-cr.xml
create mode 100644 gdb/features/s390x-cr-linux64.c
create mode 100644 gdb/features/s390x-cr-linux64.xml
create mode 100644 gdb/features/s390x-vxcr-linux64.c
create mode 100644 gdb/features/s390x-vxcr-linux64.xml
create mode 100644 gdb/lk-bitmap.h
create mode 100644 gdb/lk-cmds.c
create mode 100644 gdb/lk-cmds.h
create mode 100644 gdb/lk-list.h
create mode 100644 gdb/lk-low.c
create mode 100644 gdb/lk-low.h
create mode 100644 gdb/lk-modules.c
create mode 100644 gdb/lk-modules.h
create mode 100644 gdb/regformats/s390x-cr-linux64.dat
create mode 100644 gdb/regformats/s390x-vxcr-linux64.dat
create mode 100644 gdb/s390-lk-tdep.c
create mode 100644 gdb/s390-lk-tdep.h
--
2.13.5
next reply other threads:[~2018-03-12 15:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 15:31 Philipp Rudo [this message]
2018-03-12 15:31 ` [RFC PATCH v5 1/9] Convert substitute_path_component to C++ Philipp Rudo
2018-03-16 2:15 ` Simon Marchi
2018-03-17 20:11 ` Simon Marchi
2018-03-12 15:31 ` [RFC PATCH v5 8/9] Link frame_info to thread_info Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 6/9] Add commands for linux-kernel target Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 4/9] Add basic Linux kernel support Philipp Rudo
2018-03-13 14:09 ` Kamil Rytarowski
2018-03-14 9:48 ` Philipp Rudo
2018-03-14 23:38 ` Kamil Rytarowski
2018-03-19 0:11 ` Simon Marchi
2018-03-12 15:31 ` [RFC PATCH v5 3/9] Add scoped_restore_regcache_ptid Philipp Rudo
2018-03-17 18:08 ` Simon Marchi
2018-03-12 15:31 ` [RFC PATCH v5 2/9] Add libiberty/concat styled concat_path function Philipp Rudo
2018-03-16 2:47 ` Simon Marchi
2018-03-12 15:31 ` [RFC PATCH v5 9/9] Add S390 support for linux-kernel target Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 5/9] Add kernel module " Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 7/9] Add privileged registers for s390x Philipp Rudo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180312153115.47321-1-prudo@linux.vnet.ibm.com \
--to=prudo@linux.vnet.ibm.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=omair.javaid@linaro.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox