From 2e077f5e67aeff78e096a250bd225cd4658a35dc Mon Sep 17 00:00:00 2001 From: Pedro Franco de Carvalho Date: Tue, 22 May 2018 11:09:05 -0300 Subject: [PowerPC] Consolidate wordsize getter between native and gdbserver This patch moves the native target wordsize getter for ppc linux to nat/ so that it can be used to simplify ppc_arch_setup in gdbserver. The ptrace call used to get MSR for this is ultimately the same as before, but it is no longer necessary to create a temporary regcache to call fetch_inferior_registers. gdb/ChangeLog: 2018-05-22 Pedro Franco de Carvalho * configure.nat : Add ppc-linux.o to NATDEPFILES. * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to nat/ppc-linux.c. (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call ppc_linux_target_wordsize with tid. (ppc_linux_nat_target::read_description): Call ppc_linux_target wordsize with tid. * nat/ppc-linux.c: Include nat/gdb_ptrace.h. (ppc64_64bit_inferior_p): Add static and inline specifiers. (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add tid parameter. Remove static specifier. * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration. (ppc_linux_target_wordsize): New declaration. gdb/gdbserver/ChangeLog: 2018-05-22 Pedro Franco de Carvalho * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the wordsize of the inferior. Call ppc_linux_target_wordsize. --- gdb/ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7492083f..7e9b9b2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,21 @@ 2018-05-22 Pedro Franco de Carvalho + * configure.nat : Add ppc-linux.o to NATDEPFILES. + * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to + nat/ppc-linux.c. + (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call + ppc_linux_target_wordsize with tid. + (ppc_linux_nat_target::read_description): Call ppc_linux_target + wordsize with tid. + * nat/ppc-linux.c: Include nat/gdb_ptrace.h. + (ppc64_64bit_inferior_p): Add static and inline specifiers. + (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add + tid parameter. Remove static specifier. + * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration. + (ppc_linux_target_wordsize): New declaration. + +2018-05-22 Pedro Franco de Carvalho + * arch/ppc-linux-common.c: New file. * arch/ppc-linux-common.h: New file. * arch/ppc-linux-tdesc.h: New file. -- cgit v1.1