Module Name:    src
Committed By:   christos
Date:           Sun Sep 25 19:09:31 UTC 2011

Modified Files:
        src/external/gpl3/gdb/dist/bfd/doc: bfd.info
        src/external/gpl3/gdb/dist/gdb: amd64nbsd-tdep.c

Log Message:
make amd64 compile.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/bfd/doc/bfd.info
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/bfd/doc/bfd.info
diff -u src/external/gpl3/gdb/dist/bfd/doc/bfd.info:1.1.1.1 src/external/gpl3/gdb/dist/bfd/doc/bfd.info:1.2
--- src/external/gpl3/gdb/dist/bfd/doc/bfd.info:1.1.1.1	Sat Sep 24 15:47:50 2011
+++ src/external/gpl3/gdb/dist/bfd/doc/bfd.info	Sun Sep 25 15:09:30 2011
@@ -1,4 +1,7 @@
-This is bfd.info, produced by makeinfo version 4.8 from bfd.texinfo.
+This is
+/usr/src/tools/gdb/../../external/gpl3/gdb/dist/bfd/doc/bfd.info,
+produced by makeinfo version 4.8 from
+/usr/src/tools/gdb/../../external/gpl3/gdb/dist/bfd/doc/bfd.texinfo.
 
 INFO-DIR-SECTION Software development
 START-INFO-DIR-ENTRY
@@ -10102,8 +10105,8 @@ BFD Index
 * bfd_get_section_by_name_if:            section prototypes. (line   31)
 * bfd_get_section_contents:              section prototypes. (line  237)
 * bfd_get_sign_extend_vma:               BFD front end.      (line  484)
-* bfd_get_size <1>:                      Internal.           (line   25)
-* bfd_get_size:                          BFD front end.      (line  860)
+* bfd_get_size <1>:                      BFD front end.      (line  860)
+* bfd_get_size:                          Internal.           (line   25)
 * bfd_get_symtab_upper_bound:            symbol handling functions.
                                                              (line    6)
 * bfd_get_target_info:                   bfd_target.         (line  472)
@@ -11606,67 +11609,67 @@ BFD Index
 
 
 Tag Table:
-Node: Top1089
-Node: Overview1428
-Node: History2479
-Node: How It Works3425
-Node: What BFD Version 2 Can Do4968
-Node: BFD information loss6283
-Node: Canonical format8815
-Node: BFD front end13187
-Node: Memory Usage45266
-Node: Initialization46494
-Node: Sections46953
-Node: Section Input47436
-Node: Section Output48801
-Node: typedef asection51287
-Node: section prototypes76599
-Node: Symbols86494
-Node: Reading Symbols88089
-Node: Writing Symbols89196
-Node: Mini Symbols90905
-Node: typedef asymbol91879
-Node: symbol handling functions97938
-Node: Archives103280
-Node: Formats107006
-Node: Relocations109954
-Node: typedef arelent110681
-Node: howto manager126317
-Node: Core Files203149
-Node: Targets205187
-Node: bfd_target207157
-Node: Architectures229550
-Node: Opening and Closing253308
-Node: Internal264764
-Node: File Caching271097
-Node: Linker Functions273011
-Node: Creating a Linker Hash Table274684
-Node: Adding Symbols to the Hash Table276422
-Node: Differing file formats277322
-Node: Adding symbols from an object file279047
-Node: Adding symbols from an archive281198
-Node: Performing the Final Link284127
-Node: Information provided by the linker285369
-Node: Relocating the section contents286523
-Node: Writing the symbol table288274
-Node: Hash Tables292289
-Node: Creating and Freeing a Hash Table293487
-Node: Looking Up or Entering a String294737
-Node: Traversing a Hash Table295990
-Node: Deriving a New Hash Table Type296779
-Node: Define the Derived Structures297845
-Node: Write the Derived Creation Routine298926
-Node: Write Other Derived Routines301550
-Node: BFD back ends302865
-Node: What to Put Where303135
-Node: aout303315
-Node: coff309633
-Node: elf338066
-Node: mmo338467
-Node: File layout339395
-Node: Symbol-table345042
-Node: mmo section mapping348811
-Node: GNU Free Documentation License352463
-Node: BFD Index377546
+Node: Top1201
+Node: Overview1540
+Node: History2591
+Node: How It Works3537
+Node: What BFD Version 2 Can Do5080
+Node: BFD information loss6395
+Node: Canonical format8927
+Node: BFD front end13299
+Node: Memory Usage45378
+Node: Initialization46606
+Node: Sections47065
+Node: Section Input47548
+Node: Section Output48913
+Node: typedef asection51399
+Node: section prototypes76711
+Node: Symbols86606
+Node: Reading Symbols88201
+Node: Writing Symbols89308
+Node: Mini Symbols91017
+Node: typedef asymbol91991
+Node: symbol handling functions98050
+Node: Archives103392
+Node: Formats107118
+Node: Relocations110066
+Node: typedef arelent110793
+Node: howto manager126429
+Node: Core Files203261
+Node: Targets205299
+Node: bfd_target207269
+Node: Architectures229662
+Node: Opening and Closing253420
+Node: Internal264876
+Node: File Caching271209
+Node: Linker Functions273123
+Node: Creating a Linker Hash Table274796
+Node: Adding Symbols to the Hash Table276534
+Node: Differing file formats277434
+Node: Adding symbols from an object file279159
+Node: Adding symbols from an archive281310
+Node: Performing the Final Link284239
+Node: Information provided by the linker285481
+Node: Relocating the section contents286635
+Node: Writing the symbol table288386
+Node: Hash Tables292401
+Node: Creating and Freeing a Hash Table293599
+Node: Looking Up or Entering a String294849
+Node: Traversing a Hash Table296102
+Node: Deriving a New Hash Table Type296891
+Node: Define the Derived Structures297957
+Node: Write the Derived Creation Routine299038
+Node: Write Other Derived Routines301662
+Node: BFD back ends302977
+Node: What to Put Where303247
+Node: aout303427
+Node: coff309745
+Node: elf338178
+Node: mmo338579
+Node: File layout339507
+Node: Symbol-table345154
+Node: mmo section mapping348923
+Node: GNU Free Documentation License352575
+Node: BFD Index377658
 
 End Tag Table

Index: src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.2 src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.3
--- src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c:1.2	Sun Sep 25 12:30:24 2011
+++ src/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c	Sun Sep 25 15:09:31 2011
@@ -133,9 +133,10 @@ amd64nbsd_trapframe_cache(struct frame_i
 {
   struct trad_frame_cache *cache;
   CORE_ADDR func, sp, addr;
-  ULONGEST cs, rip;
+  ULONGEST cs = 0, rip = 0;
   char *name;
   int i;
+  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
 
   if (*this_cache)
     return *this_cache;
@@ -143,7 +144,7 @@ amd64nbsd_trapframe_cache(struct frame_i
   cache = trad_frame_cache_zalloc (next_frame);
   *this_cache = cache;
 
-  func = frame_func_unwind (next_frame);
+  func = get_frame_func (next_frame);
   sp = frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
 
   find_pc_partial_function (func, &name, NULL, NULL);
@@ -162,11 +163,16 @@ amd64nbsd_trapframe_cache(struct frame_i
 
       /* Read %cs and %rip when we have the addresses to hand */
       if (i == AMD64_CS_REGNUM)
-        cs = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[i], 8);
+        cs = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[i], 8,
+	  byte_order);
       if (i == AMD64_RIP_REGNUM)
-        rip = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[i], 8);
+        rip = read_memory_unsigned_integer (addr + amd64nbsd_tf_reg_offset[i],
+	  8, byte_order);
     }
 
+  if (cs == 0 || rip == 0)
+     abort();
+
   /* The trap frame layout was changed lf the %rip value is less than 2^16 it
    * is almost certainly the %ss of the old format. */
   if (rip < (1 << 16))
@@ -182,7 +188,8 @@ amd64nbsd_trapframe_cache(struct frame_i
 
           /* Read %cs when we have the address to hand */
           if (i == AMD64_CS_REGNUM)
-	    cs = read_memory_unsigned_integer (addr + amd64nbsd_r_reg_offset[i], 8);
+	    cs = read_memory_unsigned_integer (addr + amd64nbsd_r_reg_offset[i],
+	    8, byte_order);
         }
     }
 
@@ -202,7 +209,8 @@ amd64nbsd_trapframe_cache(struct frame_i
 
 static void
 amd64nbsd_trapframe_this_id (struct frame_info *next_frame,
-			     void **this_cache, struct frame_id *this_id)
+			     void **this_cache,
+			     struct frame_id *this_id)
 {
   struct trad_frame_cache *cache =
     amd64nbsd_trapframe_cache (next_frame, this_cache);
@@ -210,18 +218,14 @@ amd64nbsd_trapframe_this_id (struct fram
   trad_frame_get_id (cache, this_id);
 }
 
-static void
-amd64nbsd_trapframe_prev_register (struct frame_info *next_frame,
-				   void **this_cache, int regnum,
-				   int *optimizedp, enum lval_type *lvalp,
-				   CORE_ADDR *addrp, int *realnump,
-				   gdb_byte *valuep)
+static struct value *
+amd64nbsd_trapframe_prev_register (struct frame_info *this_frame,
+				   void **this_cache, int regnum) 
 {
   struct trad_frame_cache *cache =
-    amd64nbsd_trapframe_cache (next_frame, this_cache);
+    amd64nbsd_trapframe_cache (this_frame, this_cache);
 
-  trad_frame_get_register (cache, next_frame, regnum,
-			   optimizedp, lvalp, addrp, realnump, valuep);
+  return trad_frame_get_register (cache, this_frame, regnum);
 }
 
 static int
@@ -238,7 +242,7 @@ amd64nbsd_trapframe_sniffer (const struc
   if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
     return 0;
 
-  find_pc_partial_function (frame_pc_unwind (next_frame), &name, NULL, NULL);
+  find_pc_partial_function (get_frame_pc (next_frame), &name, NULL, NULL);
   return (name && ((strcmp (name, "alltraps") == 0)
 		   || (strcmp (name, "calltrap") == 0)
 		   || (strncmp (name, "Xtrap", 5) == 0)
@@ -257,6 +261,7 @@ static const struct frame_unwind amd64nb
      frame, but SIGTRAMP_FRAME would print <signal handler called>,
      which really is not what we want here.  */
   NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
   amd64nbsd_trapframe_this_id,
   amd64nbsd_trapframe_prev_register,
   NULL,

Reply via email to