From 54a5c8d8dae326c3e05a73d7e1eeeccb7481484a Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Tue, 24 Feb 2004 22:35:01 +0000 Subject: 2004-02-23 David Mosberger Committed by Kevin Buettner . * ia64-tdep.h (ia64_write_pc, ia64_linux_write_pc): Declare. * ia64-tdep.c (ia64_write_pc): Make it a global function. (ia64_gdbarch_init): For Linux targets, use ia64_linux_write_pc() instead of ia64_write_pc(). * ia64-linux-tdep.c (regcache.h): Include. (ia64_linux_write_pc): New function. --- gdb/ia64-tdep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gdb/ia64-tdep.c') diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index caeaf2d..278538c 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -628,7 +628,7 @@ ia64_read_pc (ptid_t ptid) return pc_value | (slot_num * SLOT_MULTIPLIER); } -static void +void ia64_write_pc (CORE_ADDR new_pc, ptid_t ptid) { int slot_num = (int) (new_pc & 0xf) / SLOT_MULTIPLIER; @@ -3338,7 +3338,10 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_memory_remove_breakpoint (gdbarch, ia64_memory_remove_breakpoint); set_gdbarch_breakpoint_from_pc (gdbarch, ia64_breakpoint_from_pc); set_gdbarch_read_pc (gdbarch, ia64_read_pc); - set_gdbarch_write_pc (gdbarch, ia64_write_pc); + if (info.osabi == GDB_OSABI_LINUX) + set_gdbarch_write_pc (gdbarch, ia64_linux_write_pc); + else + set_gdbarch_write_pc (gdbarch, ia64_write_pc); /* Settings for calling functions in the inferior. */ set_gdbarch_push_dummy_call (gdbarch, ia64_push_dummy_call); -- cgit v1.1