* configure.tgt (i[3456]86-*-unixware*, i[3456]86-*-unixware2*):
[deliverable/binutils-gdb.git] / gdb / arc-tdep.c
index fc20d8b2938b8388578f0f12584d202cbea34bff..cab7721a4406de570052d5a3ab3a32a40ace339d 100644 (file)
@@ -1,5 +1,5 @@
 /* ARC target-dependent stuff.
-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +26,7 @@
 #include "floatformat.h"
 #include "symtab.h"
 #include "gdbcmd.h"
+#include "regcache.h"
 
 /* Local functions */
 
@@ -44,13 +45,11 @@ struct
   }
 arc_cpu_type_table[] =
 {
-  {
-    "base", bfd_mach_arc_base
-  }
-  ,
-  {
-    NULL, 0
-  }
+  { "arc5", bfd_mach_arc_5 },
+  { "arc6", bfd_mach_arc_6 },
+  { "arc7", bfd_mach_arc_7 },
+  { "arc8", bfd_mach_arc_8 },
+  {  NULL,  0 }
 };
 
 /* Used by simulator.  */
@@ -297,6 +296,14 @@ arc_skip_prologue (CORE_ADDR pc, int frameless_p)
   return codestream_tell ();
 }
 
+/* Is the prologue at PC frameless?  */
+
+int
+arc_prologue_frameless_p (CORE_ADDR pc)
+{
+  return (pc == arc_skip_prologue (pc, 1));
+}
+
 /* Return the return address for a frame.
    This is used to implement FRAME_SAVED_PC.
    This is taken from frameless_look_for_prologue.  */
@@ -572,7 +579,9 @@ arc_software_single_step (enum target_signal ignore,        /* sig but we don't need it
     }
 }
 \f
-#ifdef GET_LONGJMP_TARGET
+/* Because of Multi-arch, GET_LONGJMP_TARGET is always defined.  So test
+   for a definition of JB_PC.  */
+#ifdef JB_PC
 /* Figure out where the longjmp will land.  Slurp the args out of the stack.
    We expect the first arg to be a pointer to the jmp_buf structure from which
    we extract the pc (JB_PC) that we will land at.  The pc is copied into PC.
@@ -618,8 +627,7 @@ arc_print_insn (bfd_vma vma, disassemble_info *info)
     {
       current_mach = arc_bfd_mach_type;
       current_endian = TARGET_BYTE_ORDER;
-      current_disasm = arc_get_disassembler (current_mach,
-                                            current_endian == BIG_ENDIAN);
+      current_disasm = arc_get_disassembler (NULL);
     }
 
   return (*current_disasm) (vma, info);
@@ -639,7 +647,7 @@ arc_set_cpu_type_command (char *args, int from_tty)
        printf_unfiltered ("%s\n", arc_cpu_type_table[i].name);
 
       /* Restore the value.  */
-      tmp_arc_cpu_type = strsave (arc_cpu_type);
+      tmp_arc_cpu_type = xstrdup (arc_cpu_type);
 
       return;
     }
@@ -648,7 +656,7 @@ arc_set_cpu_type_command (char *args, int from_tty)
     {
       error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
       /* Restore its value.  */
-      tmp_arc_cpu_type = strsave (arc_cpu_type);
+      tmp_arc_cpu_type = xstrdup (arc_cpu_type);
     }
 }
 
@@ -694,13 +702,13 @@ change the cpu being debugged.  It also gives one access to\n\
 cpu-type-specific registers and recognize cpu-type-specific instructions.\
 ",
                   &setlist);
-  c->function.cfunc = arc_set_cpu_type_command;
+  set_cmd_cfunc (c, arc_set_cpu_type_command);
   c = add_show_from_set (c, &showlist);
-  c->function.cfunc = arc_show_cpu_type_command;
+  set_cmd_cfunc (c, arc_show_cpu_type_command);
 
-  /* We have to use strsave here because the `set' command frees it before
-     setting a new value.  */
-  tmp_arc_cpu_type = strsave (DEFAULT_ARC_CPU_TYPE);
+  /* We have to use xstrdup() here because the `set' command frees it
+     before setting a new value.  */
+  tmp_arc_cpu_type = xstrdup (DEFAULT_ARC_CPU_TYPE);
   arc_set_cpu_type (tmp_arc_cpu_type);
 
   c = add_set_cmd ("displaypipeline", class_support, var_zinteger,
This page took 0.026389 seconds and 4 git commands to generate.