]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gdbarch.sh (pointer_to_address): Change to type 'm'.
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 17 Jun 2009 18:50:31 +0000 (18:50 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 17 Jun 2009 18:50:31 +0000 (18:50 +0000)
(address_to_pointer): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

* inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
(signed_pointer_to_address): Likewise.
(unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
* findvar.c (unsigned_pointer_to_address): Likewise.
(signed_pointer_to_address): Likewise.
(unsigned_address_to_pointer, address_to_signed_pointer): Likewise.

* avr-tdep.c (avr_address_to_pointer): Likewise.
(avr_pointer_to_address): Likewise.
* iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
(iq2000_address_to_pointer): Likewise.
* m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
(m32c_m16c_pointer_to_address): Likewise.
* spu-tdep.c (spu_pointer_to_address): Likewise.
* xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
(xstormy16_address_to_pointer): Likewise.

gdb/ChangeLog
gdb/avr-tdep.c
gdb/findvar.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/inferior.h
gdb/iq2000-tdep.c
gdb/m32c-tdep.c
gdb/spu-tdep.c
gdb/xstormy16-tdep.c

index 639f8641c4e4f1ec22d5ff6659f937b279d95a15..67558075502287f9d4defed5ffbc299152707162 100644 (file)
@@ -1,3 +1,26 @@
+2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * gdbarch.sh (pointer_to_address): Change to type 'm'.
+       (address_to_pointer): Likewise.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
+       * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
+       (signed_pointer_to_address): Likewise.
+       (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
+       * findvar.c (unsigned_pointer_to_address): Likewise.
+       (signed_pointer_to_address): Likewise.
+       (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
+
+       * avr-tdep.c (avr_address_to_pointer): Likewise.
+       (avr_pointer_to_address): Likewise.
+       * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
+       (iq2000_address_to_pointer): Likewise.
+       * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
+       (m32c_m16c_pointer_to_address): Likewise.
+       * spu-tdep.c (spu_pointer_to_address): Likewise.
+       * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
+       (xstormy16_address_to_pointer): Likewise.
+
 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * printcmd.c (print_scalar_formatted): Always truncate
index c6073f78bf8daa56d557ae2079d8285930569bff..16b27adb67a62e1f91c2a4e703f4c582452611a0 100644 (file)
@@ -279,7 +279,8 @@ avr_convert_saddr_to_raw (CORE_ADDR x)
 /* Convert from address to pointer and vice-versa. */
 
 static void
-avr_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
+avr_address_to_pointer (struct gdbarch *gdbarch,
+                       struct type *type, gdb_byte *buf, CORE_ADDR addr)
 {
   /* Is it a code address?  */
   if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
@@ -297,7 +298,8 @@ avr_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
 }
 
 static CORE_ADDR
-avr_pointer_to_address (struct type *type, const gdb_byte *buf)
+avr_pointer_to_address (struct gdbarch *gdbarch,
+                       struct type *type, const gdb_byte *buf)
 {
   CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
 
index 99629eada65da72ce2c47d88fefd8a4eef0ba145..6de0927798150bf53b1a753c411602acc4c0183e 100644 (file)
@@ -309,13 +309,15 @@ value_of_register_lazy (struct frame_info *frame, int regnum)
 /* Given a pointer of type TYPE in target form in BUF, return the
    address it represents.  */
 CORE_ADDR
-unsigned_pointer_to_address (struct type *type, const gdb_byte *buf)
+unsigned_pointer_to_address (struct gdbarch *gdbarch,
+                            struct type *type, const gdb_byte *buf)
 {
   return extract_unsigned_integer (buf, TYPE_LENGTH (type));
 }
 
 CORE_ADDR
-signed_pointer_to_address (struct type *type, const gdb_byte *buf)
+signed_pointer_to_address (struct gdbarch *gdbarch,
+                          struct type *type, const gdb_byte *buf)
 {
   return extract_signed_integer (buf, TYPE_LENGTH (type));
 }
@@ -323,14 +325,15 @@ signed_pointer_to_address (struct type *type, const gdb_byte *buf)
 /* Given an address, store it as a pointer of type TYPE in target
    format in BUF.  */
 void
-unsigned_address_to_pointer (struct type *type, gdb_byte *buf,
-                            CORE_ADDR addr)
+unsigned_address_to_pointer (struct gdbarch *gdbarch, struct type *type,
+                            gdb_byte *buf, CORE_ADDR addr)
 {
   store_unsigned_integer (buf, TYPE_LENGTH (type), addr);
 }
 
 void
-address_to_signed_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
+address_to_signed_pointer (struct gdbarch *gdbarch, struct type *type,
+                          gdb_byte *buf, CORE_ADDR addr)
 {
   store_signed_integer (buf, TYPE_LENGTH (type), addr);
 }
index 37b867724b64310a85028431048d9efabce375ec..c1975f8b43560e4cfd8530435554d2c560c55cbe 100644 (file)
@@ -317,8 +317,8 @@ struct gdbarch startup_gdbarch =
   0,  /* register_to_value */
   0,  /* value_to_register */
   0,  /* value_from_register */
-  0,  /* pointer_to_address */
-  0,  /* address_to_pointer */
+  unsigned_pointer_to_address,  /* pointer_to_address */
+  unsigned_address_to_pointer,  /* address_to_pointer */
   0,  /* integer_to_address */
   0,  /* return_value */
   0,  /* skip_prologue */
@@ -2096,7 +2096,7 @@ gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gd
   gdb_assert (gdbarch->pointer_to_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
-  return gdbarch->pointer_to_address (type, buf);
+  return gdbarch->pointer_to_address (gdbarch, type, buf);
 }
 
 void
@@ -2113,7 +2113,7 @@ gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte
   gdb_assert (gdbarch->address_to_pointer != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
-  gdbarch->address_to_pointer (type, buf, addr);
+  gdbarch->address_to_pointer (gdbarch, type, buf, addr);
 }
 
 void
index fa3f82eb4a46a466c18ba5b4f280f987ff0b539c..b3ba92f06a8ad649e4d64677b67f643c81e5ae98 100644 (file)
@@ -359,11 +359,11 @@ typedef struct value * (gdbarch_value_from_register_ftype) (struct type *type, i
 extern struct value * gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame);
 extern void set_gdbarch_value_from_register (struct gdbarch *gdbarch, gdbarch_value_from_register_ftype *value_from_register);
 
-typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const gdb_byte *buf);
+typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf);
 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf);
 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
 
-typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, gdb_byte *buf, CORE_ADDR addr);
+typedef void (gdbarch_address_to_pointer_ftype) (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr);
 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr);
 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
 
index e7872358becefa42529e218f4eaa2a8b8066d7d7..3a1188d3a49aaf24fa0b1a18c58cd946e34e0572 100755 (executable)
@@ -466,8 +466,8 @@ f:void:value_to_register:struct frame_info *frame, int regnum, struct type *type
 # (but not the value contents) filled in.
 f:struct value *:value_from_register:struct type *type, int regnum, struct frame_info *frame:type, regnum, frame::default_value_from_register::0
 #
-f:CORE_ADDR:pointer_to_address:struct type *type, const gdb_byte *buf:type, buf::unsigned_pointer_to_address::0
-f:void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
+m:CORE_ADDR:pointer_to_address:struct type *type, const gdb_byte *buf:type, buf::unsigned_pointer_to_address::0
+m:void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
 M:CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf
 
 # Return the return-value convention that will be used by FUNCTYPE
index 6c71ef60225427e23a29f2321425d33d698b880d..c793936801bc2141c9d86ad23ec5c5261f342270 100644 (file)
@@ -155,13 +155,17 @@ extern void terminal_save_ours (void);
 
 extern void terminal_ours (void);
 
-extern CORE_ADDR unsigned_pointer_to_address (struct type *type,
+extern CORE_ADDR unsigned_pointer_to_address (struct gdbarch *gdbarch,
+                                             struct type *type,
                                              const gdb_byte *buf);
-extern void unsigned_address_to_pointer (struct type *type, gdb_byte *buf,
+extern void unsigned_address_to_pointer (struct gdbarch *gdbarch,
+                                        struct type *type, gdb_byte *buf,
                                         CORE_ADDR addr);
-extern CORE_ADDR signed_pointer_to_address (struct type *type,
+extern CORE_ADDR signed_pointer_to_address (struct gdbarch *gdbarch,
+                                           struct type *type,
                                            const gdb_byte *buf);
-extern void address_to_signed_pointer (struct type *type, gdb_byte *buf,
+extern void address_to_signed_pointer (struct gdbarch *gdbarch,
+                                      struct type *type, gdb_byte *buf,
                                       CORE_ADDR addr);
 
 extern void wait_for_inferior (int treat_exec_as_sigtrap);
index 8dfe6b228f6801e3336a18d9869ca832437faabb..5c9329cca3489565baf5a2886d4b2737b1248335 100644 (file)
@@ -87,7 +87,8 @@ insn_addr_from_ptr (CORE_ADDR ptr)    /* target_pointer to CORE_ADDR.  */
    Convert a target pointer to an address in host (CORE_ADDR) format. */
 
 static CORE_ADDR
-iq2000_pointer_to_address (struct type * type, const gdb_byte * buf)
+iq2000_pointer_to_address (struct gdbarch *gdbarch,
+                          struct type * type, const gdb_byte * buf)
 {
   enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
   CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
@@ -104,7 +105,8 @@ iq2000_pointer_to_address (struct type * type, const gdb_byte * buf)
    Convert a host-format address (CORE_ADDR) into a target pointer.  */
 
 static void
-iq2000_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
+iq2000_address_to_pointer (struct gdbarch *gdbarch,
+                          struct type *type, gdb_byte *buf, CORE_ADDR addr)
 {
   enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
 
index a932d14d6bd73640b9ff8d662acf970affbf49b2..a833ef43f703da311a3afd0791b4bede27dab04c 100644 (file)
@@ -2401,7 +2401,8 @@ m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc)
    programmer!  :)  */
 
 static void
-m32c_m16c_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
+m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
+                             struct type *type, gdb_byte *buf, CORE_ADDR addr)
 {
   enum type_code target_code;
   gdb_assert (TYPE_CODE (type) == TYPE_CODE_PTR ||
@@ -2449,7 +2450,8 @@ m32c_m16c_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
 
 
 static CORE_ADDR
-m32c_m16c_pointer_to_address (struct type *type, const gdb_byte *buf)
+m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
+                             struct type *type, const gdb_byte *buf)
 {
   CORE_ADDR ptr;
   enum type_code target_code;
index 7b35c0ef63beb57f5010cf264f04ba8706a15f23..949b4fdea416fcd5335a7418a5e89fc2dadf07e3 100644 (file)
@@ -327,7 +327,8 @@ spu_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 /* Address conversion.  */
 
 static CORE_ADDR
-spu_pointer_to_address (struct type *type, const gdb_byte *buf)
+spu_pointer_to_address (struct gdbarch *gdbarch,
+                       struct type *type, const gdb_byte *buf)
 {
   ULONGEST addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
   ULONGEST lslr = SPU_LS_SIZE - 1; /* Hard-wired LS size.  */
index b35ff11fefda5ab7c29666955bea0879652c7480..4445d3f038c6c7f105dde69fd7adcd1a216dfddd 100644 (file)
@@ -592,7 +592,8 @@ xstormy16_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
    and vice versa.  */
 
 static CORE_ADDR
-xstormy16_pointer_to_address (struct type *type, const gdb_byte *buf)
+xstormy16_pointer_to_address (struct gdbarch *gdbarch,
+                             struct type *type, const gdb_byte *buf)
 {
   enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
   CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
@@ -608,7 +609,8 @@ xstormy16_pointer_to_address (struct type *type, const gdb_byte *buf)
 }
 
 static void
-xstormy16_address_to_pointer (struct type *type, gdb_byte *buf, CORE_ADDR addr)
+xstormy16_address_to_pointer (struct gdbarch *gdbarch,
+                             struct type *type, gdb_byte *buf, CORE_ADDR addr)
 {
   enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));