diff options
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r-- | gdb/ppc-linux-nat.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index f1ba165..171f5b3 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -1967,8 +1967,8 @@ ppc_linux_nat_target::read_description () features.wordsize = ppc_linux_target_wordsize (tid); - CORE_ADDR hwcap = linux_get_hwcap (current_top_target ()); - CORE_ADDR hwcap2 = linux_get_hwcap2 (current_top_target ()); + CORE_ADDR hwcap = linux_get_hwcap (current_inferior ()->top_target ()); + CORE_ADDR hwcap2 = linux_get_hwcap2 (current_inferior ()->top_target ()); if (have_ptrace_getsetvsxregs && (hwcap & PPC_FEATURE_HAS_VSX)) @@ -2125,7 +2125,8 @@ ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) takes two hardware watchpoints though. */ if (len > 1 && hwdebug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE - && linux_get_hwcap (current_top_target ()) & PPC_FEATURE_BOOKE) + && (linux_get_hwcap (current_inferior ()->top_target ()) + & PPC_FEATURE_BOOKE)) return 2; /* Check if the processor provides DAWR interface. */ if (hwdebug_info.features & PPC_DEBUG_FEATURE_DATA_BP_DAWR) @@ -2153,7 +2154,8 @@ ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) { gdb_assert (m_dreg_interface.debugreg_p ()); - if (((linux_get_hwcap (current_top_target ()) & PPC_FEATURE_BOOKE) + if (((linux_get_hwcap (current_inferior ()->top_target ()) + & PPC_FEATURE_BOOKE) && (addr + len) > (addr & ~3) + 4) || (addr + len) > (addr & ~7) + 8) return 0; @@ -2640,7 +2642,8 @@ ppc_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len, long wp_value; long read_mode, write_mode; - if (linux_get_hwcap (current_top_target ()) & PPC_FEATURE_BOOKE) + if (linux_get_hwcap (current_inferior ()->top_target ()) + & PPC_FEATURE_BOOKE) { /* PowerPC 440 requires only the read/write flags to be passed to the kernel. */ @@ -3013,9 +3016,11 @@ ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, int mask; if (m_dreg_interface.hwdebug_p () - && linux_get_hwcap (current_top_target ()) & PPC_FEATURE_BOOKE) + && (linux_get_hwcap (current_inferior ()->top_target ()) + & PPC_FEATURE_BOOKE)) return start <= addr && start + length >= addr; - else if (linux_get_hwcap (current_top_target ()) & PPC_FEATURE_BOOKE) + else if (linux_get_hwcap (current_inferior ()->top_target ()) + & PPC_FEATURE_BOOKE) mask = 3; else mask = 7; |