aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorPedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>2018-05-22 11:09:06 -0300
committerPedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>2018-05-22 11:52:03 -0300
commit0ec848ad25bb77edd9c9c3c097c3dd5b8874a6c0 (patch)
tree549c18bd9141c5917efe0b009c2e0255cdd8de8a /gdb/arch
parent0fb2aaa15e04238644471f7d89be3667784b19c0 (diff)
downloadgdb-0ec848ad25bb77edd9c9c3c097c3dd5b8874a6c0.zip
gdb-0ec848ad25bb77edd9c9c3c097c3dd5b8874a6c0.tar.gz
gdb-0ec848ad25bb77edd9c9c3c097c3dd5b8874a6c0.tar.bz2
[PowerPC] Recognize isa205 in linux core files
Currently the ppc linux core file target doesn't return target descriptions with the lager FPSCR introduced in isa205. This patch changes the core file target so that the auxv is read from the core file to determine the size of FPSCR, so that the appropriate target description is selected. gdb/ChangeLog: 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com> * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the parameter type to CORE_ADDR. * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the parameter type in declaration to CORE_ADDR. * ppc-linux-tdep.c (ppc_linux_core_read_description): Call target_auxv_search to get AT_HWCAP and use the result to get the target description. * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type to CORE_ADDR. Remove the cast of the return value to unsigned long. Fix error predicate of target_auxv_search. (ppc_linux_nat_target::read_description): Change the type of the hwcap variable to CORE_ADDR. gdb/testsuite/ChangeLog: 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com> * gdb.arch/powerpc-fpscr-gcore.exp: New file.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/ppc-linux-common.c2
-rw-r--r--gdb/arch/ppc-linux-common.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/arch/ppc-linux-common.c b/gdb/arch/ppc-linux-common.c
index 87ccc42..45da105 100644
--- a/gdb/arch/ppc-linux-common.c
+++ b/gdb/arch/ppc-linux-common.c
@@ -31,7 +31,7 @@
#endif
bool
-ppc_linux_has_isa205 (unsigned long hwcap)
+ppc_linux_has_isa205 (CORE_ADDR hwcap)
{
/* Power ISA 2.05 (implemented by Power 6 and newer processors)
increases the FPSCR from 32 bits to 64 bits. Even though Power 7
diff --git a/gdb/arch/ppc-linux-common.h b/gdb/arch/ppc-linux-common.h
index 798781c..2f535e8 100644
--- a/gdb/arch/ppc-linux-common.h
+++ b/gdb/arch/ppc-linux-common.h
@@ -32,7 +32,7 @@ struct target_desc;
#define PPC_LINUX_SIZEOF_VSXREGSET 256
/* Check if the hwcap auxv entry indicates that isa205 is supported. */
-bool ppc_linux_has_isa205 (unsigned long hwcap);
+bool ppc_linux_has_isa205 (CORE_ADDR hwcap);
/* Features used to determine the target description. */
struct ppc_linux_features