diff options
author | Kevin Buettner <kevinb@redhat.com> | 2004-02-24 22:35:01 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2004-02-24 22:35:01 +0000 |
commit | 54a5c8d8dae326c3e05a73d7e1eeeccb7481484a (patch) | |
tree | 9d830d011ed1b2c0ac75e3cc89d43782fff31295 /gdb/ia64-tdep.c | |
parent | 9b1f5ff99baf4d74831e2a01ea509b39f0a4f63b (diff) | |
download | gdb-54a5c8d8dae326c3e05a73d7e1eeeccb7481484a.zip gdb-54a5c8d8dae326c3e05a73d7e1eeeccb7481484a.tar.gz gdb-54a5c8d8dae326c3e05a73d7e1eeeccb7481484a.tar.bz2 |
2004-02-23 David Mosberger <davidm@hpl.hp.com>
Committed by Kevin Buettner <kevinb@redhat.com>.
* 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.
Diffstat (limited to 'gdb/ia64-tdep.c')
-rw-r--r-- | gdb/ia64-tdep.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |