Replace some $ARCH_{get,set}_pc with linux_{get,set}_pc_64bit
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-low.c
index 8f5ab0bb28c5eb0c262eff21c6be97957ff3a8a6..1f3fc0825f6de8b7f95d7233a5f3658baf2db633 100644 (file)
@@ -7283,6 +7283,32 @@ linux_get_pc_32bit (struct regcache *regcache)
   return pc;
 }
 
+/* Default implementation of linux_target_ops method "set_pc" for
+   64-bit pc register which is literally named "pc".  */
+
+void
+linux_set_pc_64bit (struct regcache *regcache, CORE_ADDR pc)
+{
+  uint64_t newpc = pc;
+
+  supply_register_by_name (regcache, "pc", &newpc);
+}
+
+/* Default implementation of linux_target_ops method "get_pc" for
+   64-bit pc register which is literally named "pc".  */
+
+CORE_ADDR
+linux_get_pc_64bit (struct regcache *regcache)
+{
+  uint64_t pc;
+
+  collect_register_by_name (regcache, "pc", &pc);
+  if (debug_threads)
+    debug_printf ("stop pc is 0x%" PRIx64 "\n", pc);
+  return pc;
+}
+
+
 static struct target_ops linux_target_ops = {
   linux_create_inferior,
   linux_post_create_inferior,
This page took 0.02621 seconds and 4 git commands to generate.