]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Get rid of pri::locexpr_opcode
authorPetr Machata <pmachata@redhat.com>
Fri, 25 Feb 2011 18:14:13 +0000 (19:14 +0100)
committerPetr Machata <pmachata@redhat.com>
Fri, 25 Feb 2011 18:14:13 +0000 (19:14 +0100)
dwarflint/check_debug_loc_range.cc
dwarflint/pri.cc
dwarflint/pri.hh

index e64b07c911ddb630556eebd4c572025541925918..af89c31df802198885c1b833663b4ea84a2db018 100644 (file)
@@ -35,7 +35,7 @@
 #include <cassert>
 #include <sstream>
 #include <algorithm>
-#include "../libdw/dwarf.h"
+#include "../libdw/c++/dwarf"
 
 #include "elf_file.hh"
 #include "check_debug_loc_range.hh"
@@ -767,7 +767,7 @@ namespace
       };
 
     std::cout << "XXX don't know how to handle opcode="
-             << pri::locexpr_opcode (opcode) << std::endl;
+             << elfutils::dwarf::ops::name (opcode) << std::endl;
 
     return rel_value;
   }
@@ -795,7 +795,7 @@ namespace
                             where, valuep, NULL))
       {
        wr_error (*where)
-         << "opcode \"" << pri::locexpr_opcode (opcode)
+         << "opcode \"" << elfutils::dwarf::ops::name (opcode)
          << "\": can't read " << str << " (form \""
          << *form << "\")." << std::endl;
        return false;
@@ -870,7 +870,7 @@ check_location_expression (dwarf_version const *ver,
        {
          wr_error (where)
            << "can't decode opcode \""
-           << pri::locexpr_opcode (opcode) << "\"." << std::endl;
+           << elfutils::dwarf::ops::name (opcode) << "\"." << std::endl;
          break;
        }
 
@@ -890,16 +890,16 @@ check_location_expression (dwarf_version const *ver,
 
            if (skip == 0)
              wr_message (where, cat (mc_loc, mc_acc_bloat, mc_impact_3))
-               << pri::locexpr_opcode (opcode)
+               << elfutils::dwarf::ops::name (opcode)
                << " with skip 0." << std::endl;
            else if (skip > 0 && !read_ctx_need_data (&ctx, (size_t)skip))
              wr_error (where)
-               << pri::locexpr_opcode (opcode)
+               << elfutils::dwarf::ops::name (opcode)
                << " branches out of location expression." << std::endl;
            /* Compare with the offset after the two-byte skip value.  */
            else if (skip < 0 && ((uint64_t)-skip) > read_ctx_get_offset (&ctx))
              wr_error (where)
-               << pri::locexpr_opcode (opcode)
+               << elfutils::dwarf::ops::name (opcode)
                << " branches before the beginning of location expression."
                << std::endl;
            else
@@ -915,7 +915,7 @@ check_location_expression (dwarf_version const *ver,
        case DW_OP_const8s:
          if (cu->head->address_size == 4)
            wr_error (where)
-             << pri::locexpr_opcode (opcode) << " on 32-bit machine."
+             << elfutils::dwarf::ops::name (opcode) << " on 32-bit machine."
              << std::endl;
          break;
 
@@ -927,7 +927,7 @@ check_location_expression (dwarf_version const *ver,
                  || opcode == DW_OP_plus_uconst)
              && (value1 > (uint64_t)(uint32_t)-1))
            wr_message (where, cat (mc_loc, mc_acc_bloat, mc_impact_3))
-             << pri::locexpr_opcode (opcode)
+             << elfutils::dwarf::ops::name (opcode)
              << " with operand " << pri::hex (value1)
              << " on a 32-bit machine." << std::endl;
        }
index ef8bd31a8340c4ddae969dd7181e817644421893..c246be55b56406fae3ba9c2dd4998be2e6237002 100644 (file)
@@ -38,10 +38,6 @@ pri::operator << (std::ostream &os, pri::pribase const &obj)
   return os << obj.m_s;
 }
 
-pri::locexpr_opcode::locexpr_opcode (int opcode)
-  : pribase (dwarf_locexpr_opcode_string (opcode))
-{}
-
 std::ostream &
 pri::operator << (std::ostream &os, pri::ref const &obj)
 {
index fe61af6638e48d5dc42594df571a36e5cdc3ca8d..67705f40c658dc2c00dfd6e83e41f0c3333bd7f3 100644 (file)
@@ -66,12 +66,6 @@ namespace pri
     {}
   };
 
-  struct locexpr_opcode
-    : public pribase
-  {
-    locexpr_opcode (int opcode);
-  };
-
   class ref
   {
     Dwarf_Off off;