Update Traditional Chinese translation for the binutils sub-directory.
[deliverable/binutils-gdb.git] / gdb / dwarf2loc.c
index 1ac56b273ad82fb1dabeceb93fdd8ed652648cd4..99cac03a54745c35f979de1dba349d475598291f 100644 (file)
@@ -1,6 +1,6 @@
 /* DWARF 2 location expression support for GDB.
 
-   Copyright (C) 2003-2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2020 Free Software Foundation, Inc.
 
    Contributed by Daniel Jacobowitz, MontaVista Software, Inc.
 
@@ -524,7 +524,7 @@ func_get_frame_base_dwarf_block (struct symbol *framefunc, CORE_ADDR pc,
 
   if (*length == 0)
     error (_("Could not find the frame base for \"%s\"."),
-          SYMBOL_NATURAL_NAME (framefunc));
+          framefunc->natural_name ());
 }
 
 static CORE_ADDR
@@ -1577,8 +1577,7 @@ rw_pieced_value (struct value *v, struct value *from)
   struct piece_closure *c
     = (struct piece_closure *) value_computed_closure (v);
   gdb::byte_vector buffer;
-  int bits_big_endian
-    = gdbarch_bits_big_endian (get_type_arch (value_type (v)));
+  bool bits_big_endian = type_byte_order (value_type (v)) == BFD_ENDIAN_BIG;
 
   if (from != NULL)
     {
@@ -2817,7 +2816,7 @@ access_memory (struct gdbarch *arch, struct agent_expr *expr, ULONGEST nbits)
   if (8 * nbytes == nbits)
     return;
 
-  if (gdbarch_bits_big_endian (arch))
+  if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG)
     {
       /* On a bits-big-endian machine, we want the high-order
         NBITS.  */
@@ -2867,7 +2866,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
   enum bfd_endian byte_order = gdbarch_byte_order (arch);
   ULONGEST bits_collected = 0;
   unsigned int addr_size_bits = 8 * addr_size;
-  int bits_big_endian = gdbarch_bits_big_endian (arch);
+  bool bits_big_endian = byte_order == BFD_ENDIAN_BIG;
 
   std::vector<int> offsets (op_end - op_ptr, -1);
 
@@ -3635,13 +3634,13 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
 
       if (!b)
        error (_("No block found for address for symbol \"%s\"."),
-              SYMBOL_PRINT_NAME (symbol));
+              symbol->print_name ());
 
       framefunc = block_linkage_function (b);
 
       if (!framefunc)
        error (_("No function found for block for symbol \"%s\"."),
-              SYMBOL_PRINT_NAME (symbol));
+              symbol->print_name ());
 
       func_get_frame_base_dwarf_block (framefunc, addr, &base_data, &base_size);
 
@@ -3655,7 +3654,7 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
          if (buf_end != base_data + base_size)
            error (_("Unexpected opcode after "
                     "DW_OP_breg%u for symbol \"%s\"."),
-                  frame_reg, SYMBOL_PRINT_NAME (symbol));
+                  frame_reg, symbol->print_name ());
        }
       else if (base_data[0] >= DW_OP_reg0 && base_data[0] <= DW_OP_reg31)
        {
@@ -4229,7 +4228,7 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr,
 
   if (bad || data > end)
     error (_("Corrupted DWARF2 expression for \"%s\"."),
-          SYMBOL_PRINT_NAME (symbol));
+          symbol->print_name ());
 }
 
 /* Print a natural-language description of SYMBOL to STREAM.  This
@@ -4282,7 +4281,7 @@ locexpr_generate_c_location (struct symbol *sym, string_file *stream,
   unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
 
   if (dlbaton->size == 0)
-    error (_("symbol \"%s\" is optimized out"), SYMBOL_NATURAL_NAME (sym));
+    error (_("symbol \"%s\" is optimized out"), sym->natural_name ());
 
   compile_dwarf_expr_to_c (stream, result_name,
                           sym, pc, gdbarch, registers_used, addr_size,
@@ -4428,7 +4427,7 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
        case DEBUG_LOC_BUFFER_OVERFLOW:
        case DEBUG_LOC_INVALID_ENTRY:
          error (_("Corrupted DWARF expression for symbol \"%s\"."),
-                SYMBOL_PRINT_NAME (symbol));
+                symbol->print_name ());
        default:
          gdb_assert_not_reached ("bad debug_loc_kind");
        }
@@ -4495,7 +4494,7 @@ loclist_generate_c_location (struct symbol *sym, string_file *stream,
 
   data = dwarf2_find_location_expression (dlbaton, &size, pc);
   if (size == 0)
-    error (_("symbol \"%s\" is optimized out"), SYMBOL_NATURAL_NAME (sym));
+    error (_("symbol \"%s\" is optimized out"), sym->natural_name ());
 
   compile_dwarf_expr_to_c (stream, result_name,
                           sym, pc, gdbarch, registers_used, addr_size,
This page took 0.027463 seconds and 4 git commands to generate.