* ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptrace
BookE interface for PowerPC server processors if not available in the Linux Kernel.
This commit is contained in:
parent
71bdabee21
commit
0c56f59b40
2 changed files with 19 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue