From 954e927b912047942c40cfb32168ac48267fb464 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sat, 16 Jun 2007 17:16:26 +0000 Subject: * regcache.c (struct regcache): Add ptid_t member. (regcache_xmalloc): Initialize it. (regcache_cpy_no_passthrough): Do not refer to current_regcache. (regcache_dup): Likewise. (regcache_dup_no_passthrough): Likewise. (current_regcache): Make static. (registers_ptid): Remove variable. (get_thread_regcache): New function. (get_current_regcache): New function. (registers_changed): Implement by freeing current regcache. (regcache_raw_read): Do not refer to current_regcache. Set inferior_ptid to regcache->ptid while calling target routines. (regcache_raw_write): Likewise. (regcache_raw_supply): Do not refer to current_regcache. (read_pc_pid): Use thread regcache. Do not modify inferior_ptid. (write_pc_pid): Likewise. (build_regcache): Remove. (_initialize_regcache): Do not call DEPRECATED_REGISTER_GDBARCH_SWAP or deprecated_register_gdbarch_swap. Do not initialize registers_ptid. * regcache.h (get_current_regcache): Add prototype. (get_thread_regcache): Likewise. (current_regcache): Remove declaration. * corelow.c (core_open): Replace current_regcache by get_current_regcache (). * frame.c (frame_pop): Likewise. (put_frame_register): Likewise. (get_current_frame, create_new_frame): Likewise. * mi/mi-main.c (mi_cmd_data_write_register_values): Likewise. * stack.c (return_command): Likewise. * infcall.c (call_function_by_hand): Likewise. * infrun.c (resume): Likewise. (save_inferior_status, restore_inferior_status): Likewise. * linux-fork.c (fork_load_infrun_state): Likewise. (fork_save_infrun_state): Likewise. * win32-nat.c (win32_resume): Likewise. * i386fbsd-nat.c (i386fbsd_resume): Likewise. * monitor.c (monitor_wait): Likewise. * remote.c (remote_wait): Likewise. * remote-mips.c (mips_wait): Likewise. * bsd-kvm.c (bsd_kvm_open): Likewise (bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): Likewise. * fbsd-nat.c (fbsd_make_corefile_notes): Likewise. * i386-linux-nat.c (i386_linux_resume): Likewise. * ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise. (ia64_linux_stopped_data_address): Likewise. * frv-tdep.c (frv_fdpic_loadmap_addresses): Likewise. * m32c-tdep.c (m32c_virtual_frame_pointer): Likewise. * mep-tdep.c (current_me_module, current_options): Likewise. * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Likewise. * linux-nat.c (linux_nat_do_thread_registers): Use thread regcache instead of current_regcache. Call target_fetch_registers. (linux_nat_corefile_thread_callback): Update call site. (linux_nat_do_registers): Likewise. * procfs.c (procfs_do_thread_registers): Use thread regcache instead of current_regcache. (procfs_make_note_section): Likewise. * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise. (ps_lgetfpregs, ps_lsetfpregs): Likewise. * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise. (ps_lgetfpregs, ps_lsetfpregs): Likewise. --- gdb/infcall.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/infcall.c') diff --git a/gdb/infcall.c b/gdb/infcall.c index 2805e4b4f89..525cf2fd8e8 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -469,7 +469,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) { sp = push_dummy_code (current_gdbarch, sp, funaddr, using_gcc, args, nargs, values_type, - &real_pc, &bp_addr, current_regcache); + &real_pc, &bp_addr, get_current_regcache ()); dummy_addr = sp; } else @@ -477,7 +477,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) dummy_addr = sp; sp = push_dummy_code (current_gdbarch, sp, funaddr, using_gcc, args, nargs, values_type, - &real_pc, &bp_addr, current_regcache); + &real_pc, &bp_addr, get_current_regcache ()); } break; case AT_ENTRY_POINT: @@ -672,9 +672,9 @@ You must use a pointer to function type variable. Command ignored."), arg_name); /* Create the dummy stack frame. Pass in the call dummy address as, presumably, the ABI code knows where, in the call dummy, the return address should be pointed. */ - sp = gdbarch_push_dummy_call (current_gdbarch, function, current_regcache, - bp_addr, nargs, args, sp, struct_return, - struct_addr); + sp = gdbarch_push_dummy_call (current_gdbarch, function, + get_current_regcache (), bp_addr, nargs, args, + sp, struct_return, struct_addr); /* Set up a frame ID for the dummy frame so we can pass it to set_momentary_breakpoint. We need to give the breakpoint a frame -- cgit v1.2.1