* config/i386/xm-i386.h (HOST_BYTE_ORDER): Removed.
[deliverable/binutils-gdb.git] / gdb / arch-utils.c
index de977ddbbe8e86240f9a68ea53cdfb5bc48a0c75..124281f454c27f9c5b6e0d7e27de947ebda06adc 100644 (file)
@@ -38,6 +38,7 @@
 #include "annotate.h"
 #endif
 #include "regcache.h"
+#include "gdb_assert.h"
 
 #include "version.h"
 
@@ -98,6 +99,12 @@ generic_return_value_on_stack_not (struct type *type)
   return 0;
 }
 
+CORE_ADDR
+generic_skip_trampoline_code (CORE_ADDR pc)
+{
+  return 0;
+}
+
 char *
 legacy_register_name (int i)
 {
@@ -222,7 +229,7 @@ default_register_sim_regno (int num)
 
 
 CORE_ADDR
-default_convert_from_func_ptr_addr (CORE_ADDR addr)
+core_addr_identity (CORE_ADDR addr)
 {
   return addr;
 }
@@ -258,9 +265,11 @@ generic_prepare_to_proceed (int select_it)
   /* Get the last target status returned by target_wait().  */
   get_last_target_status (&wait_ptid, &wait_status);
 
-  /* Make sure we were stopped at a breakpoint.  */
+  /* Make sure we were stopped either at a breakpoint, or because
+     of a Ctrl-C.  */
   if (wait_status.kind != TARGET_WAITKIND_STOPPED
-      || wait_status.value.sig != TARGET_SIGNAL_TRAP)
+      || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
+          wait_status.value.sig != TARGET_SIGNAL_INT))
     {
       return 0;
     }
@@ -271,14 +280,11 @@ generic_prepare_to_proceed (int select_it)
       /* Switched over from WAIT_PID.  */
       CORE_ADDR wait_pc = read_pc_pid (wait_ptid);
 
-      /* Avoid switching where it wouldn't do any good, i.e. if both
-         threads are at the same breakpoint.  */
-      if (wait_pc != read_pc () && breakpoint_here_p (wait_pc))
+      if (wait_pc != read_pc ())
        {
          if (select_it)
            {
-             /* User hasn't deleted the breakpoint.  Switch back to
-                WAIT_PID and return non-zero.  */
+             /* Switch back to WAIT_PID thread.  */
              inferior_ptid = wait_ptid;
 
              /* FIXME: This stuff came from switch_to_thread() in
@@ -288,14 +294,55 @@ generic_prepare_to_proceed (int select_it)
              stop_pc = wait_pc;
              select_frame (get_current_frame (), 0);
            }
-
-         return 1;
+          /* We return 1 to indicate that there is a breakpoint here,
+             so we need to step over it before continuing to avoid
+             hitting it straight away. */
+          if (breakpoint_here_p (wait_pc))
+            {
+             return 1;
+            }
        }
     }
   return 0;
   
 }
 
+void
+init_frame_pc_noop (int fromleaf, struct frame_info *prev)
+{
+  return;
+}
+
+void
+init_frame_pc_default (int fromleaf, struct frame_info *prev)
+{
+  if (fromleaf)
+    prev->pc = SAVED_PC_AFTER_CALL (prev->next);
+  else if (prev->next != NULL)
+    prev->pc = FRAME_SAVED_PC (prev->next);
+  else
+    prev->pc = read_pc ();
+}
+
+int
+cannot_register_not (int regnum)
+{
+  return 0;
+}
+
+/* Legacy version of target_virtual_frame_pointer().  Assumes that
+   there is an FP_REGNUM and that it is the same, cooked or raw.  */
+
+void
+legacy_virtual_frame_pointer (CORE_ADDR pc,
+                             int *frame_regnum,
+                             LONGEST *frame_offset)
+{
+  gdb_assert (FP_REGNUM >= 0);
+  *frame_regnum = FP_REGNUM;
+  *frame_offset = 0;
+}
+\f
 /* Functions to manipulate the endianness of the target.  */
 
 #ifdef TARGET_BYTE_ORDER_SELECTABLE
@@ -701,6 +748,8 @@ initialize_current_architecture (void)
                          "initialize_current_architecture: Selection of initial architecture failed");
        }
     }
+  else
+    initialize_non_multiarch ();
 
   /* Create the ``set architecture'' command appending ``auto'' to the
      list of architectures. */
This page took 0.026041 seconds and 4 git commands to generate.