2002-04-29 Michal Ludvig <mludvig@suse.cz>
authorMichal Ludvig <mludvig@suse.cz>
Mon, 29 Apr 2002 18:27:31 +0000 (18:27 +0000)
committerMichal Ludvig <mludvig@suse.cz>
Mon, 29 Apr 2002 18:27:31 +0000 (18:27 +0000)
* x86-64-linux-nat.c (fill_gregset): Explicit cast to avoid warning.
* x86-64-tdep.c (i386_gdbarch_init): Ditto.
(x86_64_register_info_table): Added comments with register numbers.

gdb/ChangeLog
gdb/x86-64-linux-nat.c
gdb/x86-64-tdep.c

index 1c6b690..6206aeb 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-29  Michal Ludvig  <mludvig@suse.cz>
+
+       * x86-64-linux-nat.c (fill_gregset): Explicit cast to avoid warning.
+       * x86-64-tdep.c (i386_gdbarch_init): Ditto.
+       (x86_64_register_info_table): Added comments with register numbers.
+       
 2002-04-29  Elena Zannoni  <ezannoni@redhat.com>
 
        * rs6000-tdep.c (rs6000_extract_return_value,
index fd70572..fd9246c 100644 (file)
@@ -158,7 +158,7 @@ fill_gregset (elf_gregset_t * gregsetp, int regno)
 
   for (i = 0; i < x86_64_num_gregs; i++)
     if ((regno == -1 || regno == i))
-      read_register_gen (i, regp + x86_64_regmap[i]);
+      read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
 }
 
 /* Fetch all general-purpose registers from process/thread TID and
@@ -446,4 +446,3 @@ kernel_u_size (void)
 {
   return (sizeof (struct user));
 }
-  
index f30b85e..8d3ad87 100644 (file)
@@ -49,61 +49,61 @@ struct register_info
 /* x86_64_register_raw_size_table[i] is the number of bytes of storage in
    GDB's register array occupied by register i.  */
 static struct register_info x86_64_register_info_table[] = {
-  {8, "rax", &builtin_type_int64},
-  {8, "rbx", &builtin_type_int64},
-  {8, "rcx", &builtin_type_int64},
-  {8, "rdx", &builtin_type_int64},
-  {8, "rsi", &builtin_type_int64},
-  {8, "rdi", &builtin_type_int64},
-  {8, "rbp", &builtin_type_void_func_ptr},
-  {8, "rsp", &builtin_type_void_func_ptr},
-  {8, "r8", &builtin_type_int64},
-  {8, "r9", &builtin_type_int64},
-  {8, "r10", &builtin_type_int64},
-  {8, "r11", &builtin_type_int64},
-  {8, "r12", &builtin_type_int64},
-  {8, "r13", &builtin_type_int64},
-  {8, "r14", &builtin_type_int64},
-  {8, "r15", &builtin_type_int64},
-  {8, "rip", &builtin_type_void_func_ptr},
-  {4, "eflags", &builtin_type_int32},
-  {4, "ds", &builtin_type_int32},
-  {4, "es", &builtin_type_int32},
-  {4, "fs", &builtin_type_int32},
-  {4, "gs", &builtin_type_int32},
-  {10, "st0", &builtin_type_i387_ext},
-  {10, "st1", &builtin_type_i387_ext},
-  {10, "st2", &builtin_type_i387_ext},
-  {10, "st3", &builtin_type_i387_ext},
-  {10, "st4", &builtin_type_i387_ext},
-  {10, "st5", &builtin_type_i387_ext},
-  {10, "st6", &builtin_type_i387_ext},
-  {10, "st7", &builtin_type_i387_ext},
-  {4, "fctrl", &builtin_type_int32},
-  {4, "fstat", &builtin_type_int32},
-  {4, "ftag", &builtin_type_int32},
-  {4, "fiseg", &builtin_type_int32},
-  {4, "fioff", &builtin_type_int32},
-  {4, "foseg", &builtin_type_int32},
-  {4, "fooff", &builtin_type_int32},
-  {4, "fop", &builtin_type_int32},
-  {16, "xmm0", &builtin_type_v4sf},
-  {16, "xmm1", &builtin_type_v4sf},
-  {16, "xmm2", &builtin_type_v4sf},
-  {16, "xmm3", &builtin_type_v4sf},
-  {16, "xmm4", &builtin_type_v4sf},
-  {16, "xmm5", &builtin_type_v4sf},
-  {16, "xmm6", &builtin_type_v4sf},
-  {16, "xmm7", &builtin_type_v4sf},
-  {16, "xmm8", &builtin_type_v4sf},
-  {16, "xmm9", &builtin_type_v4sf},
-  {16, "xmm10", &builtin_type_v4sf},
-  {16, "xmm11", &builtin_type_v4sf},
-  {16, "xmm12", &builtin_type_v4sf},
-  {16, "xmm13", &builtin_type_v4sf},
-  {16, "xmm14", &builtin_type_v4sf},
-  {16, "xmm15", &builtin_type_v4sf},
-  {4, "mxcsr", &builtin_type_int32}
+  /*  0 */ {8, "rax", &builtin_type_int64},
+  /*  1 */ {8, "rbx", &builtin_type_int64},
+  /*  2 */ {8, "rcx", &builtin_type_int64},
+  /*  3 */ {8, "rdx", &builtin_type_int64},
+  /*  4 */ {8, "rsi", &builtin_type_int64},
+  /*  5 */ {8, "rdi", &builtin_type_int64},
+  /*  6 */ {8, "rbp", &builtin_type_void_func_ptr},
+  /*  7 */ {8, "rsp", &builtin_type_void_func_ptr},
+  /*  8 */ {8, "r8", &builtin_type_int64},
+  /*  9 */ {8, "r9", &builtin_type_int64},
+  /* 10 */ {8, "r10", &builtin_type_int64},
+  /* 11 */ {8, "r11", &builtin_type_int64},
+  /* 12 */ {8, "r12", &builtin_type_int64},
+  /* 13 */ {8, "r13", &builtin_type_int64},
+  /* 14 */ {8, "r14", &builtin_type_int64},
+  /* 15 */ {8, "r15", &builtin_type_int64},
+  /* 16 */ {8, "rip", &builtin_type_void_func_ptr},
+  /* 17 */ {4, "eflags", &builtin_type_int32},
+  /* 18 */ {4, "ds", &builtin_type_int32},
+  /* 19 */ {4, "es", &builtin_type_int32},
+  /* 20 */ {4, "fs", &builtin_type_int32},
+  /* 21 */ {4, "gs", &builtin_type_int32},
+  /* 22 */ {10, "st0", &builtin_type_i387_ext},
+  /* 23 */ {10, "st1", &builtin_type_i387_ext},
+  /* 24 */ {10, "st2", &builtin_type_i387_ext},
+  /* 25 */ {10, "st3", &builtin_type_i387_ext},
+  /* 26 */ {10, "st4", &builtin_type_i387_ext},
+  /* 27 */ {10, "st5", &builtin_type_i387_ext},
+  /* 28 */ {10, "st6", &builtin_type_i387_ext},
+  /* 29 */ {10, "st7", &builtin_type_i387_ext},
+  /* 30 */ {4, "fctrl", &builtin_type_int32},
+  /* 31 */ {4, "fstat", &builtin_type_int32},
+  /* 32 */ {4, "ftag", &builtin_type_int32},
+  /* 33 */ {4, "fiseg", &builtin_type_int32},
+  /* 34 */ {4, "fioff", &builtin_type_int32},
+  /* 35 */ {4, "foseg", &builtin_type_int32},
+  /* 36 */ {4, "fooff", &builtin_type_int32},
+  /* 37 */ {4, "fop", &builtin_type_int32},
+  /* 38 */ {16, "xmm0", &builtin_type_v4sf},
+  /* 39 */ {16, "xmm1", &builtin_type_v4sf},
+  /* 40 */ {16, "xmm2", &builtin_type_v4sf},
+  /* 41 */ {16, "xmm3", &builtin_type_v4sf},
+  /* 42 */ {16, "xmm4", &builtin_type_v4sf},
+  /* 43 */ {16, "xmm5", &builtin_type_v4sf},
+  /* 44 */ {16, "xmm6", &builtin_type_v4sf},
+  /* 45 */ {16, "xmm7", &builtin_type_v4sf},
+  /* 46 */ {16, "xmm8", &builtin_type_v4sf},
+  /* 47 */ {16, "xmm9", &builtin_type_v4sf},
+  /* 48 */ {16, "xmm10", &builtin_type_v4sf},
+  /* 49 */ {16, "xmm11", &builtin_type_v4sf},
+  /* 50 */ {16, "xmm12", &builtin_type_v4sf},
+  /* 51 */ {16, "xmm13", &builtin_type_v4sf},
+  /* 52 */ {16, "xmm14", &builtin_type_v4sf},
+  /* 53 */ {16, "xmm15", &builtin_type_v4sf},
+  /* 54 */ {4, "mxcsr", &builtin_type_int32}
 };
 
 /* Number of all registers */
@@ -609,7 +609,7 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   static int int_parameter_registers[INT_REGS] = {
     5 /* RDI */ , 4 /* RSI */ ,
     3 /* RDX */ , 2 /* RCX */ ,
-    8 /* R8  */ , 9 /* R9  */
+    8 /* R8  */ , 9            /* R9  */
   };
   /* XMM0 - XMM15  */
   static int sse_parameter_registers[SSE_REGS] = {
@@ -1064,7 +1064,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_breakpoint_from_pc (gdbarch, x86_64_breakpoint_from_pc);
+  set_gdbarch_breakpoint_from_pc (gdbarch,
+                                 (gdbarch_breakpoint_from_pc_ftype *)
+                                 x86_64_breakpoint_from_pc);
 
 
 /* Amount PC must be decremented by after a breakpoint.  This is often the