diff options
author | Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> | 2012-05-31 22:07:31 +0000 |
---|---|---|
committer | Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> | 2012-05-31 22:07:31 +0000 |
commit | 0c56f59b401a4478487972e0f1164fed24270891 (patch) | |
tree | 8a6e650ae4c6f2aa5c8487757f4ad7645ba7e99b /gdb | |
parent | 71bdabee218e22fa592ab679a2d1ee044e0f6e2c (diff) | |
download | binutils-0c56f59b401a4478487972e0f1164fed24270891.zip binutils-0c56f59b401a4478487972e0f1164fed24270891.tar.gz binutils-0c56f59b401a4478487972e0f1164fed24270891.tar.bz2 |
* ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptrace
BookE interface for PowerPC server processors if not available
in the Linux Kernel.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/ppc-linux-nat.c | 23 |
2 files changed, 19 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2ca89f..af25ef7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-05-31 Edjunior Machado <emachado@linux.vnet.ibm.com> + + * ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptrace + BookE interface for PowerPC server processors if not available + in the Linux Kernel. + 2012-05-31 Keith Seitz <keiths@redhat.com> * linespec.c (decode_objc): Add cleanup to free diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index b9e0c85..45cdd73 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -1421,17 +1421,20 @@ have_ptrace_booke_interface (void) /* Check for kernel support for BOOKE debug registers. */ if (ptrace (PPC_PTRACE_GETHWDBGINFO, tid, 0, &booke_debug_info) >= 0) { - have_ptrace_booke_interface = 1; - max_slots_number = booke_debug_info.num_instruction_bps - + booke_debug_info.num_data_bps - + booke_debug_info.num_condition_regs; - } - else - { - /* Old school interface and no BOOKE debug registers support. */ - have_ptrace_booke_interface = 0; - memset (&booke_debug_info, 0, sizeof (struct ppc_debug_info)); + /* Check whether ptrace BOOKE interface is functional and + provides any supported feature. */ + if (booke_debug_info.features != 0) + { + have_ptrace_booke_interface = 1; + max_slots_number = booke_debug_info.num_instruction_bps + + booke_debug_info.num_data_bps + + booke_debug_info.num_condition_regs; + return have_ptrace_booke_interface; + } } + /* Old school interface and no BOOKE debug registers support. */ + have_ptrace_booke_interface = 0; + memset (&booke_debug_info, 0, sizeof (struct ppc_debug_info)); } return have_ptrace_booke_interface; |