From 6ba34a8d520d08d10e92d03ca5003b5618666f1e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 29 Feb 2004 17:01:38 +0000 Subject: [PATCH] * regcache.c (read_pc_pid): Restore inferior_ptid after reading PC_REGNUM. --- gdb/ChangeLog | 5 +++++ gdb/regcache.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0268a884f0c..f384d26ee88 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-02-29 Daniel Jacobowitz + + * regcache.c (read_pc_pid): Restore inferior_ptid after reading + PC_REGNUM. + 2004-02-28 Andrew Cagney * NEWS: Refer to GDB 6.1. diff --git a/gdb/regcache.c b/gdb/regcache.c index e479954296e..154fc5e0c71 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1332,8 +1332,7 @@ read_pc_pid (ptid_t ptid) else if (PC_REGNUM >= 0) { CORE_ADDR raw_val = read_register_pid (PC_REGNUM, ptid); - CORE_ADDR pc_val = ADDR_BITS_REMOVE (raw_val); - return pc_val; + pc_val = ADDR_BITS_REMOVE (raw_val); } else internal_error (__FILE__, __LINE__, "read_pc_pid: Unable to find PC"); -- 2.30.2