@@ -436,7 +436,7 @@ aarch64_target::low_insert_point (raw_bkpt_type type, CORE_ADDR addr,
int ret;
enum target_hw_bp_type targ_type;
struct aarch64_debug_reg_state *state
- = aarch64_get_debug_reg_state (pid_of (current_thread));
+ = aarch64_get_debug_reg_state (current_process ()->pid);
if (show_debug_regs)
fprintf (stderr, "insert_point on entry (addr=0x%08lx, len=%d)\n",
@@ -487,7 +487,7 @@ aarch64_target::low_remove_point (raw_bkpt_type type, CORE_ADDR addr,
int ret;
enum target_hw_bp_type targ_type;
struct aarch64_debug_reg_state *state
- = aarch64_get_debug_reg_state (pid_of (current_thread));
+ = aarch64_get_debug_reg_state (current_process ()->pid);
if (show_debug_regs)
fprintf (stderr, "remove_point on entry (addr=0x%08lx, len=%d)\n",
@@ -575,7 +575,7 @@ aarch64_target::low_stopped_data_address ()
= aarch64_remove_non_address_bits ((CORE_ADDR) siginfo.si_addr);
/* Check if the address matches any watched address. */
- state = aarch64_get_debug_reg_state (pid_of (current_thread));
+ state = aarch64_get_debug_reg_state (current_process ()->pid);
for (i = aarch64_num_wp_regs - 1; i >= 0; --i)
{
const unsigned int offset
@@ -846,7 +846,7 @@ aarch64_target::low_arch_setup ()
if (is_elf64)
{
struct aarch64_features features;
- int pid = current_thread->id.pid ();
+ int pid = current_process ()->pid;
features.vq = aarch64_sve_get_vq (tid);
/* A-profile PAC is 64-bit only. */
@@ -3323,7 +3323,7 @@ aarch64_target::supports_memory_tagging ()
#endif
}
- return (linux_get_hwcap2 (current_thread->id.pid (), 8) & HWCAP2_MTE) != 0;
+ return (linux_get_hwcap2 (current_process ()->pid, 8) & HWCAP2_MTE) != 0;
}
bool
@@ -636,7 +636,7 @@ arm_target::low_insert_point (raw_bkpt_type type, CORE_ADDR addr,
pts[i] = p;
/* Only update the threads of the current process. */
- for_each_thread (current_thread->id.pid (), [&] (thread_info *thread)
+ for_each_thread (current_process ()->pid, [&] (thread_info *thread)
{
update_registers_callback (thread, watch, i);
});
@@ -681,7 +681,7 @@ arm_target::low_remove_point (raw_bkpt_type type, CORE_ADDR addr,
pts[i].control = arm_hwbp_control_disable (pts[i].control);
/* Only update the threads of the current process. */
- for_each_thread (current_thread->id.pid (), [&] (thread_info *thread)
+ for_each_thread (current_process ()->pid, [&] (thread_info *thread)
{
update_registers_callback (thread, watch, i);
});
@@ -958,7 +958,7 @@ get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
static const struct target_desc *
arm_read_description (void)
{
- unsigned long arm_hwcap = linux_get_hwcap (current_thread->id.pid (), 4);
+ unsigned long arm_hwcap = linux_get_hwcap (current_process ()->pid, 4);
if (arm_hwcap & HWCAP_IWMMXT)
return arm_linux_read_description (ARM_FP_TYPE_IWMMXT);
@@ -894,8 +894,8 @@ ppc_target::low_arch_setup ()
/* The value of current_process ()->tdesc needs to be set for this
call. */
- ppc_hwcap = linux_get_hwcap (current_thread->id.pid (), features.wordsize);
- ppc_hwcap2 = linux_get_hwcap2 (current_thread->id.pid (), features.wordsize);
+ ppc_hwcap = linux_get_hwcap (current_process ()->pid, features.wordsize);
+ ppc_hwcap2 = linux_get_hwcap2 (current_process ()->pid, features.wordsize);
features.isa205 = ppc_linux_has_isa205 (ppc_hwcap);
@@ -1097,7 +1097,7 @@ is_elfv2_inferior (void)
const struct target_desc *tdesc = current_process ()->tdesc;
int wordsize = register_size (tdesc, 0);
- if (!linux_get_auxv (current_thread->id.pid (), wordsize, AT_PHDR, &phdr))
+ if (!linux_get_auxv (current_process ()->pid, wordsize, AT_PHDR, &phdr))
return def_res;
/* Assume ELF header is at the beginning of the page where program headers
@@ -1392,7 +1392,7 @@ set_single_step_breakpoint (CORE_ADDR stop_at, ptid_t ptid)
{
struct single_step_breakpoint *bp;
- gdb_assert (current_ptid.pid () == ptid.pid ());
+ gdb_assert (current_process ()->pid == ptid.pid ());
bp = (struct single_step_breakpoint *) set_breakpoint_type_at (single_step_breakpoint,
stop_at, NULL);
@@ -106,7 +106,7 @@ void
regcache_invalidate (void)
{
/* Only update the threads of the current process. */
- int pid = current_thread->id.pid ();
+ int pid = current_process ()->pid;
regcache_invalidate_pid (pid);
}
@@ -1469,7 +1469,7 @@ handle_qxfer_exec_file (const char *annex,
if (current_thread == NULL)
return -1;
- pid = pid_of (current_thread);
+ pid = current_process ()->pid;
}
else
{
@@ -6813,7 +6813,7 @@ static int
run_inferior_command (char *cmd, int len)
{
int err = -1;
- int pid = current_ptid.pid ();
+ int pid = current_process ()->pid;
trace_debug ("run_inferior_command: running: %s", cmd);
@@ -57,7 +57,7 @@ x86_dr_low_set_addr (int regnum, CORE_ADDR addr)
gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
/* Only update the threads of this process. */
- for_each_thread (current_thread->id.pid (), update_debug_registers);
+ for_each_thread (current_process ()->pid, update_debug_registers);
}
/* Update the inferior's DR7 debug control register from STATE. */
@@ -66,7 +66,7 @@ static void
x86_dr_low_set_control (unsigned long control)
{
/* Only update the threads of this process. */
- for_each_thread (current_thread->id.pid (), update_debug_registers);
+ for_each_thread (current_process ()->pid, update_debug_registers);
}
/* Return the current value of a DR register of the current thread's