Update copyright year printed by gdb, gdbserver and gdbreplay.
[deliverable/binutils-gdb.git] / gdb / i386-tdep.c
index f685a6af3fd2eb4ed53f71313c943beacce53546..0750506dd5c4ec4b68d687ebe70d9a35b83f7b59 100644 (file)
@@ -44,7 +44,6 @@
 #include "dis-asm.h"
 #include "disasm.h"
 #include "remote.h"
-#include "exceptions.h"
 #include "i386-tdep.h"
 #include "i387-tdep.h"
 #include "x86-xstate.h"
@@ -1818,14 +1817,15 @@ i386_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
     {
       CORE_ADDR post_prologue_pc
        = skip_prologue_using_sal (gdbarch, func_addr);
-      struct symtab *s = find_pc_symtab (func_addr);
+      struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr);
 
       /* Clang always emits a line note before the prologue and another
         one after.  We trust clang to emit usable line notes.  */
       if (post_prologue_pc
-         && (s != NULL
-             && s->producer != NULL
-             && strncmp (s->producer, "clang ", sizeof ("clang ") - 1) == 0))
+         && (cust != NULL
+             && COMPUNIT_PRODUCER (cust) != NULL
+             && strncmp (COMPUNIT_PRODUCER (cust), "clang ",
+                         sizeof ("clang ") - 1) == 0))
         return max (start_pc, post_prologue_pc);
     }
  
@@ -2184,10 +2184,10 @@ static int
 i386_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   gdb_byte insn;
-  struct symtab *symtab;
+  struct compunit_symtab *cust;
 
-  symtab = find_pc_symtab (pc);
-  if (symtab && symtab->epilogue_unwind_valid)
+  cust = find_pc_compunit_symtab (pc);
+  if (cust != NULL && COMPUNIT_EPILOGUE_UNWIND_VALID (cust))
     return 0;
 
   if (target_read_memory (pc, &insn, 1))
@@ -4306,6 +4306,17 @@ i386_stap_parse_special_token (struct gdbarch *gdbarch,
 
 \f
 
+/* gdbarch gnu_triplet_regexp method.  Both arches are acceptable as GDB always
+   also supplies -m64 or -m32 by gdbarch_gcc_target_options.  */
+
+static const char *
+i386_gnu_triplet_regexp (struct gdbarch *gdbarch)
+{
+  return "(x86_64|i.86)";
+}
+
+\f
+
 /* Generic ELF.  */
 
 void
@@ -4332,6 +4343,8 @@ i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
                                      i386_stap_is_single_operand);
   set_gdbarch_stap_parse_special_token (gdbarch,
                                        i386_stap_parse_special_token);
+
+  set_gdbarch_gnu_triplet_regexp (gdbarch, i386_gnu_triplet_regexp);
 }
 
 /* System V Release 4 (SVR4).  */
@@ -4379,6 +4392,8 @@ i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
 
   set_gdbarch_has_dos_based_file_system (gdbarch, 1);
+
+  set_gdbarch_gnu_triplet_regexp (gdbarch, i386_gnu_triplet_regexp);
 }
 \f
 
@@ -4524,18 +4539,6 @@ i386_fetch_pointer_argument (struct frame_info *frame, int argi,
   return read_memory_unsigned_integer (sp + (4 * (argi + 1)), 4, byte_order);
 }
 
-static void
-i386_skip_permanent_breakpoint (struct regcache *regcache)
-{
-  CORE_ADDR current_pc = regcache_read_pc (regcache);
-
- /* On i386, breakpoint is exactly 1 byte long, so we just
-    adjust the PC in the regcache.  */
-  current_pc += 1;
-  regcache_write_pc (regcache, current_pc);
-}
-
-
 #define PREFIX_REPZ    0x01
 #define PREFIX_REPNZ   0x02
 #define PREFIX_LOCK    0x04
@@ -8414,6 +8417,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
      gap for the upper AVX, MPX and AVX512 registers.  */
   set_gdbarch_num_regs (gdbarch, I386_AVX512_NUM_REGS);
 
+  set_gdbarch_gnu_triplet_regexp (gdbarch, i386_gnu_triplet_regexp);
+
   /* Get the x86 target description from INFO.  */
   tdesc = info.target_desc;
   if (! tdesc_has_registers (tdesc))
@@ -8567,9 +8572,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     set_gdbarch_iterate_over_regset_sections
       (gdbarch, i386_iterate_over_regset_sections);
 
-  set_gdbarch_skip_permanent_breakpoint (gdbarch,
-                                        i386_skip_permanent_breakpoint);
-
   set_gdbarch_fast_tracepoint_valid_at (gdbarch,
                                        i386_fast_tracepoint_valid_at);
 
This page took 0.028802 seconds and 4 git commands to generate.