This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 00/10] Split up s390-linux-tdep.c


Hi everybody

changes v2 -> v3:

	- Rebase to current master.

	- Fix bug Yao reported in Patch #1 (s390: Remove duplicate checks
	  for cached gdbarch at init).

	- Move s390_guess_tracepoint_registers, s390_stap_is_single_operand,
	  s390_gcc_target_options and, s390_gnu_triplet_regexp to common
	  s390-tdep.

	- Move s390_process_record and its helper functions to common
	  s390-tdep.  This requires new patch #8.

	- Move s390_frame_unwind, s390_stub_frame_unwind, s390_frame_base
	  and their helpers to common s390-tdep

	- Clean up s390-tdep.h, i.e. remove unneeded exports.

	- Squash former patch #11 (s390: Add comments to uncommented
	  functions in s390-linux-tdep.c) into patch #10 (s390: Clean up
	  s390-linux-tdep.c).  The new code moves left the clean up patch
	  nearly empty and both patches are more the less cleanups.

	- Squash former patch #10 (s390: Add comments to uncommented
	  functions in s390-tdep.c) into patch #9 (s390: Split up
	  s390-linux-tdep.c into two files).  The extra patch isn't really
	  needed so reduce the number of patches.

	- Fix white space damages in s390_process_record and its helpers.

changes v1 -> v2:

	- Rebase to current master.

	- Hook s390 into osabi mechanism including some preparation/clean
	  up in s390_gdbarch_init (Patches #1-#7)

	- Don't move s390_cannot_store_register and s390_write_pc as well as
	  the regmap/regset definitions to the new file.

Note: I haven't added the switch from macros to enum for the register
numbering Uli has suggested.  'Condensing' the definitions, i.e. only define
the first register number of a range of equal registers, like ppc does it,
leads to constructs like 'S390_R0_REGNUM + N'.  Those constructs appear
rather often as there are quite a lot of instructions which give special
meaning to specific registers.  Giving the fact that the main reason to do
this switch is so 'only' three of the definitions can stay in
s390-linux-tdep.h, I think this switch can be deferred to later when I have
time to take a closer look at it.

Thanks
Philipp

---

This patch set splits up the s390 tdep code followed by some minor clean up
and coding style fixes.  It originates from my Linux kernel feature and
helps adding the new Linux kernel 'OS' to s390 while keeping the code
manageable.  I want to bring the set upstream in advance of the rest of the
kernel debugging feature as nearly all changes to s390-linux-tdep.c cause
merge conflicts making the maintenance off-tree extremely labor intensive
and error prone.

Thanks
Philipp

Philipp Rudo (10):
  s390: Remove duplicate checks for cached gdbarch at init
  s390: Allocate gdbarch & tdep at start of gdbarch init
  s390: gdbarch_tdep.have_* int -> bool
  s390: gdbarch_tdep add field tdesc
  s390: Move tdesc validation to separate function
  s390: if -> gdb_assert for tdesc_has_registers check
  s390: Hook s390 into OSABI mechanism
  s390: gdbarch_tdep add hook for syscall record
  s390: Split up s390-linux-tdep.c into two files
  s390: Clean up s390-linux-tdep.c

 gdb/Makefile.in       |    3 +
 gdb/configure.tgt     |    4 +-
 gdb/s390-linux-nat.c  |    1 +
 gdb/s390-linux-tdep.c | 7226 +------------------------------------------------
 gdb/s390-linux-tdep.h |  176 +-
 gdb/s390-tdep.c       | 7124 ++++++++++++++++++++++++++++++++++++++++++++++++
 gdb/s390-tdep.h       |  318 +++
 7 files changed, 7549 insertions(+), 7303 deletions(-)
 create mode 100644 gdb/s390-tdep.c
 create mode 100644 gdb/s390-tdep.h

-- 
2.13.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]