public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC v5 0/9] Add support for Linux kernel debugging
@ 2018-03-12 15:31 Philipp Rudo
  2018-03-12 15:31 ` [RFC PATCH v5 2/9] Add libiberty/concat styled concat_path function Philipp Rudo
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Philipp Rudo @ 2018-03-12 15:31 UTC (permalink / raw)
  To: gdb-patches; +Cc: Omair Javaid, Yao Qi, arnez

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-03-19  0:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 15:31 [RFC v5 0/9] Add support for Linux kernel debugging Philipp Rudo
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 8/9] Link frame_info to thread_info Philipp Rudo
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 5/9] Add kernel module support for linux-kernel target Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 9/9] Add S390 " Philipp Rudo
2018-03-12 15:31 ` [RFC PATCH v5 6/9] Add commands " Philipp Rudo
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 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 7/9] Add privileged registers for s390x Philipp Rudo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).