2007-06-13 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 13 Jun 2007 17:59:51 +0000 (17:59 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 13 Jun 2007 17:59:51 +0000 (17:59 +0000)
* gdbarch.sh (TARGET_ADDR_BIT): Replace by gdbarch_addr_bit.
* valops.c (value_cast): Likewise.
* utils.c (strlen_paddr, paddr, paddr_nz, paddress): Likewise.
* ui-out.c (ui_out_field_core_addr): Likewise.
* tracepoint.c (tracepoints_info): Likewise.
* symtab.c (print_msymbol_info): Likewise.
* solib-irix.c (irix_current_sos)
(irix_open_symbol_file_object): Likewise.
* remote.c (build_remote_gdbarch_data): Likewise.
* prologue-value.c (make_pv_area): Likewise.
* procfs.c (info_mappings_callback): Likewise.
* printcmd.c (print_scalar_formatted)
(deprecated_print_address_numeric): Likewise.
* memattr.c (mem_info_command): Likewise.
* linux-nat.c (linux_nat_info_proc_cmd): Likewise.
* gdbtypes.c (build_flt, gdbtypes_post_init): Likewise.
* exec.c (print_section_info): Likewise.
* dwarf2read.c (read_subrange_type): Likewise.
* dwarf2loc.c (find_location_expression): Likewise.
* dwarf2expr.c (dwarf2_read_address, unsigned_address_type)
(signed_address_type, execute_stack_op): Likewise.
* breakpoint.c (print_one_breakpoint, breakpoint_1): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

22 files changed:
gdb/ChangeLog
gdb/breakpoint.c
gdb/dwarf2expr.c
gdb/dwarf2loc.c
gdb/dwarf2read.c
gdb/exec.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbtypes.c
gdb/linux-nat.c
gdb/memattr.c
gdb/printcmd.c
gdb/procfs.c
gdb/prologue-value.c
gdb/remote.c
gdb/solib-irix.c
gdb/symtab.c
gdb/tracepoint.c
gdb/ui-out.c
gdb/utils.c
gdb/valops.c

index f642adb18da751b5497667d1d24e66df6aad2e20..22cab682747126488007df9d153eedbfb9a9526b 100644 (file)
@@ -1,3 +1,29 @@
+2007-06-13  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (TARGET_ADDR_BIT): Replace by gdbarch_addr_bit.
+       * valops.c (value_cast): Likewise.
+       * utils.c (strlen_paddr, paddr, paddr_nz, paddress): Likewise.
+       * ui-out.c (ui_out_field_core_addr): Likewise.
+       * tracepoint.c (tracepoints_info): Likewise.
+       * symtab.c (print_msymbol_info): Likewise.
+       * solib-irix.c (irix_current_sos)
+       (irix_open_symbol_file_object): Likewise.
+       * remote.c (build_remote_gdbarch_data): Likewise.
+       * prologue-value.c (make_pv_area): Likewise.
+       * procfs.c (info_mappings_callback): Likewise.
+       * printcmd.c (print_scalar_formatted)
+       (deprecated_print_address_numeric): Likewise.
+       * memattr.c (mem_info_command): Likewise.
+       * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
+       * gdbtypes.c (build_flt, gdbtypes_post_init): Likewise.
+       * exec.c (print_section_info): Likewise.
+       * dwarf2read.c (read_subrange_type): Likewise.
+       * dwarf2loc.c (find_location_expression): Likewise.
+       * dwarf2expr.c (dwarf2_read_address, unsigned_address_type)
+       (signed_address_type, execute_stack_op): Likewise.
+       * breakpoint.c (print_one_breakpoint, breakpoint_1): Likewise.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-13  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (TARGET_ARCHITECTURE): Replace by gdbarch_bfd_arch_info.
index c8e1b4a4d8c0f5bf6bab5196270c92e8a6e510fb..5e36d93acd69788f28ffbc212411905d45955f6a 100644 (file)
@@ -3443,7 +3443,7 @@ print_one_breakpoint (struct breakpoint *b,
   strcpy (wrap_indent, "                           ");
   if (addressprint)
     {
-      if (TARGET_ADDR_BIT <= 32)
+      if (gdbarch_addr_bit (current_gdbarch) <= 32)
        strcat (wrap_indent, "           ");
       else
        strcat (wrap_indent, "                   ");
@@ -3802,7 +3802,7 @@ breakpoint_1 (int bnum, int allflag)
        {
          if (nr_printable_breakpoints > 0)
            annotate_field (4);
-         if (TARGET_ADDR_BIT <= 32)
+         if (gdbarch_addr_bit (current_gdbarch) <= 32)
            ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */
          else
            ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */
index 92d9e16e359d337fcafee0d38ca1c703722a1ee9..ab2b109dfa620898655ee98435be3b2f2f34b4b6 100644 (file)
@@ -202,10 +202,10 @@ dwarf2_read_address (gdb_byte *buf, gdb_byte *buf_end, int *bytes_read)
 {
   CORE_ADDR result;
 
-  if (buf_end - buf < TARGET_ADDR_BIT / TARGET_CHAR_BIT)
+  if (buf_end - buf < gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT)
     error (_("dwarf2_read_address: Corrupted DWARF expression."));
 
-  *bytes_read = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
+  *bytes_read = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT;
 
   /* For most architectures, calling extract_unsigned_integer() alone
      is sufficient for extracting an address.  However, some
@@ -233,7 +233,8 @@ dwarf2_read_address (gdb_byte *buf, gdb_byte *buf_end, int *bytes_read)
                              (unsigned_address_type (),
                               extract_unsigned_integer 
                                 (buf,
-                                 TARGET_ADDR_BIT / TARGET_CHAR_BIT)));
+                                 gdbarch_addr_bit (current_gdbarch)
+                                   / TARGET_CHAR_BIT)));
 
   return result;
 }
@@ -243,7 +244,7 @@ dwarf2_read_address (gdb_byte *buf, gdb_byte *buf_end, int *bytes_read)
 static struct type *
 unsigned_address_type (void)
 {
-  switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
+  switch (gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT)
     {
     case 2:
       return builtin_type_uint16;
@@ -262,7 +263,7 @@ unsigned_address_type (void)
 static struct type *
 signed_address_type (void)
 {
-  switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
+  switch (gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT)
     {
     case 2:
       return builtin_type_int16;
@@ -550,13 +551,16 @@ execute_stack_op (struct dwarf_expr_context *ctx,
            {
            case DW_OP_deref:
              {
-               gdb_byte *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+               gdb_byte *buf = alloca (gdbarch_addr_bit (current_gdbarch)
+                                         / TARGET_CHAR_BIT);
                int bytes_read;
 
                (ctx->read_mem) (ctx->baton, buf, result,
-                                TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+                                gdbarch_addr_bit (current_gdbarch)
+                                  / TARGET_CHAR_BIT);
                result = dwarf2_read_address (buf,
-                                             buf + (TARGET_ADDR_BIT
+                                             buf + (gdbarch_addr_bit
+                                                      (current_gdbarch)
                                                     / TARGET_CHAR_BIT),
                                              &bytes_read);
              }
@@ -564,12 +568,15 @@ execute_stack_op (struct dwarf_expr_context *ctx,
 
            case DW_OP_deref_size:
              {
-               gdb_byte *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+               gdb_byte *buf
+                  = alloca (gdbarch_addr_bit (current_gdbarch)
+                             / TARGET_CHAR_BIT);
                int bytes_read;
 
                (ctx->read_mem) (ctx->baton, buf, result, *op_ptr++);
                result = dwarf2_read_address (buf,
-                                             buf + (TARGET_ADDR_BIT
+                                             buf + (gdbarch_addr_bit
+                                                     (current_gdbarch)
                                                     / TARGET_CHAR_BIT),
                                              &bytes_read);
              }
index 320da9f99e433bad090f018ff8dae725632ddbff..c0c323b4ab6ce9dcf8af44f818439f81486d1483 100644 (file)
@@ -55,7 +55,7 @@ find_location_expression (struct dwarf2_loclist_baton *baton,
   CORE_ADDR low, high;
   gdb_byte *loc_ptr, *buf_end;
   int length;
-  unsigned int addr_size = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
+  unsigned int addr_size = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT;
   CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
   /* Adjust base_address for relocatable objects.  */
   CORE_ADDR base_offset = ANOFFSET (baton->objfile->section_offsets,
index 87ef4aac4cc6fa0f583292f07ad384bb9c253bc1..6f447a9f0d2cc96c695f1987cb20508cd15c859a 100644 (file)
@@ -4930,7 +4930,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
     {
       complaint (&symfile_complaints,
                 _("DW_AT_type missing from DW_TAG_subrange_type"));
-      base_type = dwarf_base_type (DW_ATE_signed, TARGET_ADDR_BIT / 8, cu);
+      base_type
+       = dwarf_base_type (DW_ATE_signed,
+                          gdbarch_addr_bit (current_gdbarch) / 8, cu);
     }
 
   if (cu->language == language_fortran)
index e2d6b995c90f13d4693a18eba3c181394996e8c4..4e68d1cf4435cd61321371299753be6a4016532d 100644 (file)
@@ -532,8 +532,8 @@ void
 print_section_info (struct target_ops *t, bfd *abfd)
 {
   struct section_table *p;
-  /* FIXME: 16 is not wide enough when TARGET_ADDR_BIT > 64.  */
-  int wid = TARGET_ADDR_BIT <= 32 ? 8 : 16;
+  /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64.  */
+  int wid = gdbarch_addr_bit (current_gdbarch) <= 32 ? 8 : 16;
 
   printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
   wrap_here ("        ");
index 8ea41b1f186bbc951b5aba7120221eb6c0b51bbb..2ffc659be6b1150433a57a6dda1b4a2fa70abefe 100644 (file)
@@ -650,11 +650,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: GDB_TM_FILE = %s\n",
                       gdb_tm_file);
-#ifdef TARGET_ADDR_BIT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
-                      XSTRING (TARGET_ADDR_BIT));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: addr_bit = %s\n",
                       paddr_d (current_gdbarch->addr_bit));
index ff52b36f6e0ed7ede1bc94915830e809dcc8be89..7fd12480fa11eefb6c6f6414927e3a2e365904ed 100644 (file)
@@ -124,10 +124,10 @@ extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struc
 
 /* For most targets, a pointer on the target and its representation as an
    address in GDB have the same size and "look the same".  For such a
-   target, you need only set gdbarch_ptr_bit and TARGET_ADDR_BIT
+   target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
    / addr_bit will be set from it.
   
-   If gdbarch_ptr_bit and TARGET_ADDR_BIT are different, you'll probably
+   If gdbarch_ptr_bit and gdbarch_addr_bit are different, you'll probably
    also need to set gdbarch_pointer_to_address and gdbarch_address_to_pointer
    as well.
   
@@ -140,12 +140,6 @@ extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
 
 extern int gdbarch_addr_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
-#if !defined (GDB_TM_FILE) && defined (TARGET_ADDR_BIT)
-#error "Non multi-arch definition of TARGET_ADDR_BIT"
-#endif
-#if !defined (TARGET_ADDR_BIT)
-#define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
-#endif
 
 /* Number of bits in a BFD_VMA for the target object file format. */
 
index 2c90ca18b485fab00390c08456eabfbc0ff6f650..a36b30e248523e59c1959440392b09be45e2fda4 100755 (executable)
@@ -403,17 +403,17 @@ v::const struct floatformat **:long_double_format:::::floatformats_ieee_double::
 
 # For most targets, a pointer on the target and its representation as an
 # address in GDB have the same size and "look the same".  For such a
-# target, you need only set gdbarch_ptr_bit and TARGET_ADDR_BIT
+# target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
 # / addr_bit will be set from it.
 #
-# If gdbarch_ptr_bit and TARGET_ADDR_BIT are different, you'll probably
+# If gdbarch_ptr_bit and gdbarch_addr_bit are different, you'll probably
 # also need to set gdbarch_pointer_to_address and gdbarch_address_to_pointer
 # as well.
 #
 # ptr_bit is the size of a pointer on the target
 v::int:ptr_bit:::8 * sizeof (void*):current_gdbarch->int_bit::0
 # addr_bit is the size of a target address as represented in gdb
-v:TARGET_ADDR_BIT:int:addr_bit:::8 * sizeof (void*):0:gdbarch_ptr_bit (current_gdbarch):
+v::int:addr_bit:::8 * sizeof (void*):0:gdbarch_ptr_bit (current_gdbarch):
 # Number of bits in a BFD_VMA for the target object file format.
 v::int:bfd_vma_bit:::8 * sizeof (void*):gdbarch_bfd_arch_info (current_gdbarch)->bits_per_address::0
 #
index 93c1e55eafa15b57c9f2a6e87b9306b407c506bf..d96d5feeadd0a34f8c56537204db6624cb99f4ef 100644 (file)
@@ -3574,7 +3574,7 @@ Show resolution of opaque struct/class/union types (if set before loading symbol
   builtin_type_void_func_ptr
     = lookup_pointer_type (lookup_function_type (builtin_type_void));
   builtin_type_CORE_ADDR =
-    init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
+    init_type (TYPE_CODE_INT, gdbarch_addr_bit (current_gdbarch) / 8,
               TYPE_FLAG_UNSIGNED,
               "__CORE_ADDR", (struct objfile *) NULL);
   builtin_type_bfd_vma =
@@ -3725,7 +3725,7 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
   builtin_type->builtin_func_ptr
     = lookup_pointer_type (lookup_function_type (builtin_type->builtin_void));
   builtin_type->builtin_core_addr =
-    init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
+    init_type (TYPE_CODE_INT, gdbarch_addr_bit (current_gdbarch) / 8,
               TYPE_FLAG_UNSIGNED,
               "__CORE_ADDR", (struct objfile *) NULL);
 
index 695dbb0bfc0d9bdf664f3ee862eed139cc033ef6..c2f67de169866aab2e92411d08d156a8169bfad0 100644 (file)
@@ -2862,7 +2862,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
          char permissions[8], device[8], filename[MAXPATHLEN];
 
          printf_filtered (_("Mapped address spaces:\n\n"));
-         if (TARGET_ADDR_BIT == 32)
+         if (gdbarch_addr_bit (current_gdbarch) == 32)
            {
              printf_filtered ("\t%10s %10s %10s %10s %7s\n",
                           "Start Addr",
@@ -2888,7 +2888,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
                 a generic local_address_string instead to print out
                 the addresses; that makes sense to me, too.  */
 
-             if (TARGET_ADDR_BIT == 32)
+             if (gdbarch_addr_bit (current_gdbarch) == 32)
                {
                  printf_filtered ("\t%#10lx %#10lx %#10x %#10x %7s\n",
                               (unsigned long) addr,    /* FIXME: pr_addr */
index f8e073226c1b8b85c2fe65cce1c2b5c5d70345d2..1fe9e90b9dca3318750be02337ee89259e3ae9bc 100644 (file)
@@ -434,10 +434,10 @@ mem_info_command (char *args, int from_tty)
   printf_filtered ("Num ");
   printf_filtered ("Enb ");
   printf_filtered ("Low Addr   ");
-  if (TARGET_ADDR_BIT > 32)
+  if (gdbarch_addr_bit (current_gdbarch) > 32)
     printf_filtered ("        ");
   printf_filtered ("High Addr  ");
-  if (TARGET_ADDR_BIT > 32)
+  if (gdbarch_addr_bit (current_gdbarch) > 32)
     printf_filtered ("        ");
   printf_filtered ("Attrs ");
   printf_filtered ("\n");
@@ -448,14 +448,14 @@ mem_info_command (char *args, int from_tty)
       printf_filtered ("%-3d %-3c\t",
                       m->number,
                       m->enabled_p ? 'y' : 'n');
-      if (TARGET_ADDR_BIT <= 32)
+      if (gdbarch_addr_bit (current_gdbarch) <= 32)
        tmp = hex_string_custom ((unsigned long) m->lo, 8);
       else
        tmp = hex_string_custom ((unsigned long) m->lo, 16);
       
       printf_filtered ("%s ", tmp);
 
-      if (TARGET_ADDR_BIT <= 32)
+      if (gdbarch_addr_bit (current_gdbarch) <= 32)
        {
        if (m->hi == 0)
          tmp = "0x100000000";
index 6da10aa19629432b7fc2d09117604fd1fcc1cbc9..b03c65ea09452cf07d1ea040bd6b55547211a9bf 100644 (file)
@@ -346,9 +346,9 @@ print_scalar_formatted (const void *valaddr, struct type *type,
 
   /* If the value is a pointer, and pointers and addresses are not the
      same, then at this point, the value's length (in target bytes) is
-     TARGET_ADDR_BIT/TARGET_CHAR_BIT, not TYPE_LENGTH (type).  */
+     gdbarch_addr_bit/TARGET_CHAR_BIT, not TYPE_LENGTH (type).  */
   if (TYPE_CODE (type) == TYPE_CODE_PTR)
-    len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
+    len = gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT;
 
   /* If we are printing it as unsigned, truncate it in case it is actually
      a negative signed value (e.g. "print/u (short)-1" should print 65535
@@ -669,7 +669,7 @@ deprecated_print_address_numeric (CORE_ADDR addr, int use_local,
     fputs_filtered (paddress (addr), stream);
   else
     {
-      int addr_bit = TARGET_ADDR_BIT;
+      int addr_bit = gdbarch_addr_bit (current_gdbarch);
 
       if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
        addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
index 7916944eef757c8313250142d331bffbfa156b32..cbb59b87bcc2162ddcef953f699094685af16e08 100644 (file)
@@ -5735,7 +5735,7 @@ info_mappings_callback (struct prmap *map, int (*ignore) (), void *unused)
 {
   char *data_fmt_string;
 
-  if (TARGET_ADDR_BIT == 32)
+  if (gdbarch_addr_bit (current_gdbarch) == 32)
     data_fmt_string   = "\t%#10lx %#10lx %#10x %#10x %7s\n";
   else
     data_fmt_string   = "  %#18lx %#18lx %#10x %#10x %7s\n";
index d95588a3dcabbfca65ec3ee8e3a381fb623b8c69..8576f38448525f9a75ed52a2771230ac7703b49d 100644 (file)
@@ -330,7 +330,8 @@ make_pv_area (int base_reg)
 
   /* Remember that shift amounts equal to the type's width are
      undefined.  */
-  a->addr_mask = ((((CORE_ADDR) 1 << (TARGET_ADDR_BIT - 1)) - 1) << 1) | 1;
+  a->addr_mask = ((((CORE_ADDR) 1
+                  << (gdbarch_addr_bit (current_gdbarch) - 1)) - 1) << 1) | 1;
 
   return a;
 }
index e7a7d35caa4f95b0b9fc4b96d364adddd4164691..9fa700e5857b3574f23b098fac9381b20474e869 100644 (file)
@@ -6411,7 +6411,7 @@ show_remote_cmd (char *args, int from_tty)
 static void
 build_remote_gdbarch_data (void)
 {
-  remote_address_size = TARGET_ADDR_BIT;
+  remote_address_size = gdbarch_addr_bit (current_gdbarch);
 }
 
 /* Function to be called whenever a new objfile (shlib) is detected.  */
index d060c2d72a5e00fe1fa1a8461e17efaa2409874d..a2a0d59dda0b8e56f9ab26b3f89f20fa08080136 100644 (file)
@@ -503,8 +503,12 @@ irix_current_sos (void)
        return 0;
     }
 
-  read_memory (debug_base, addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
-  lma = extract_mips_address (addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+  read_memory (debug_base,
+              addr_buf,
+              gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT);
+  lma = extract_mips_address (addr_buf,
+                             gdbarch_addr_bit (current_gdbarch)
+                               / TARGET_CHAR_BIT);
 
   while (lma)
     {
@@ -605,8 +609,12 @@ irix_open_symbol_file_object (void *from_ttyp)
     return 0;                  /* failed somehow...  */
 
   /* First link map member should be the executable.  */
-  read_memory (debug_base, addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
-  lma = extract_mips_address (addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+  read_memory (debug_base,
+              addr_buf,
+              gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT);
+  lma = extract_mips_address (addr_buf,
+                             gdbarch_addr_bit (current_gdbarch)
+                               / TARGET_CHAR_BIT);
   if (lma == 0)
     return 0;                  /* failed somehow...  */
 
index 8f3aa60018022e7be98d9a5062b7bf97e6dd6653..83ff9387556cf7a0d47246d8bdb421bc096f47c5 100644 (file)
@@ -3246,7 +3246,7 @@ print_msymbol_info (struct minimal_symbol *msymbol)
 {
   char *tmp;
 
-  if (TARGET_ADDR_BIT <= 32)
+  if (gdbarch_addr_bit (current_gdbarch) <= 32)
     tmp = hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol)
                             & (CORE_ADDR) 0xffffffff,
                             8);
index 02d2e80b7678f20a5ba1acf134bab8747d0cfa0a..b9b9f5ee8c6ba2dbc46c9127d434aaee21407e95 100644 (file)
@@ -480,7 +480,7 @@ tracepoints_info (char *tpnum_exp, int from_tty)
          printf_filtered ("Num Enb ");
          if (addressprint)
            {
-             if (TARGET_ADDR_BIT <= 32)
+             if (gdbarch_addr_bit (current_gdbarch) <= 32)
                printf_filtered ("Address    ");
              else
                printf_filtered ("Address            ");
@@ -490,7 +490,7 @@ tracepoints_info (char *tpnum_exp, int from_tty)
       strcpy (wrap_indent, "                           ");
       if (addressprint)
        {
-         if (TARGET_ADDR_BIT <= 32)
+         if (gdbarch_addr_bit (current_gdbarch) <= 32)
            strcat (wrap_indent, "           ");
          else
            strcat (wrap_indent, "                   ");
@@ -502,7 +502,7 @@ tracepoints_info (char *tpnum_exp, int from_tty)
        {
          char *tmp;
 
-         if (TARGET_ADDR_BIT <= 32)
+         if (gdbarch_addr_bit (current_gdbarch) <= 32)
            tmp = hex_string_custom (t->address & (CORE_ADDR) 0xffffffff, 
                                     8);
          else
index eec2d401d5876a7917d666b7a12a2caffe196ca8..a85ca48ea6ee6adaa11436bc3f6ffb68146ebc01 100644 (file)
@@ -493,7 +493,7 @@ ui_out_field_core_addr (struct ui_out *uiout,
                        CORE_ADDR address)
 {
   char addstr[20];
-  int addr_bit = TARGET_ADDR_BIT;
+  int addr_bit = gdbarch_addr_bit (current_gdbarch);
 
   /* Truncate address to match deprecated_print_address_numeric().  */
   if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
@@ -501,7 +501,7 @@ ui_out_field_core_addr (struct ui_out *uiout,
 
   /* FIXME: cagney/2002-05-03: Need local_address_string() function
      that returns the language localized string formatted to a width
-     based on TARGET_ADDR_BIT.  */
+     based on gdbarch_addr_bit.  */
   /* deprecated_print_address_numeric (address, 1, local_stream); */
   if (addr_bit <= 32)
     strcpy (addstr, hex_string_custom (address, 8));
index 6f3719adc6633e1b59302790cf8b02aa43a8a1cb..c8abeec02021399578141856f4a3505236311e1e 100644 (file)
@@ -2535,19 +2535,19 @@ get_cell (void)
 int
 strlen_paddr (void)
 {
-  return (TARGET_ADDR_BIT / 8 * 2);
+  return (gdbarch_addr_bit (current_gdbarch) / 8 * 2);
 }
 
 char *
 paddr (CORE_ADDR addr)
 {
-  return phex (addr, TARGET_ADDR_BIT / 8);
+  return phex (addr, gdbarch_addr_bit (current_gdbarch) / 8);
 }
 
 char *
 paddr_nz (CORE_ADDR addr)
 {
-  return phex_nz (addr, TARGET_ADDR_BIT / 8);
+  return phex_nz (addr, gdbarch_addr_bit (current_gdbarch) / 8);
 }
 
 const char *
@@ -2562,7 +2562,7 @@ paddress (CORE_ADDR addr)
      either zero or sign extended.  Should gdbarch_address_to_pointer or
      some ADDRESS_TO_PRINTABLE() be used to do the conversion?  */
 
-  int addr_bit = TARGET_ADDR_BIT;
+  int addr_bit = gdbarch_addr_bit (current_gdbarch);
 
   if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
     addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
index 1163756cd9ae7d60c7a322f9badf7691e8483404..35f6558f53ca907f297e846716c88d23ffb584db 100644 (file)
@@ -402,7 +402,7 @@ value_cast (struct type *type, struct value *arg2)
         otherwise occur when dealing with a target having two byte
         pointers and four byte addresses.  */
 
-      int addr_bit = TARGET_ADDR_BIT;
+      int addr_bit = gdbarch_addr_bit (current_gdbarch);
 
       LONGEST longest = value_as_long (arg2);
       if (addr_bit < sizeof (LONGEST) * HOST_CHAR_BIT)
This page took 0.05849 seconds and 4 git commands to generate.