]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: where.* -> locus.*, drop locus::next
authorPetr Machata <pmachata@redhat.com>
Tue, 19 Apr 2011 10:56:10 +0000 (12:56 +0200)
committerPetr Machata <pmachata@redhat.com>
Tue, 19 Apr 2011 10:56:10 +0000 (12:56 +0200)
dwarflint/Makefile.am
dwarflint/addr-record.hh
dwarflint/checked_read.hh
dwarflint/checks.hh
dwarflint/die_locus.hh
dwarflint/locus.cc [moved from dwarflint/where.cc with 95% similarity]
dwarflint/locus.hh [moved from dwarflint/where.hh with 89% similarity]
dwarflint/messages.cc
dwarflint/messages.hh
dwarflint/misc.hh
dwarflint/reloc.hh

index 995acfd62ea0866afafc18e47fc0630e43a9b561..8b2f99fc6c7b7009d5071c0187ccd60e73c98072 100644 (file)
@@ -61,6 +61,7 @@ dwarflint_SOURCES = \
        expected-at.cc expected.hh \
        files.cc files.hh \
        highlevel_check.cc highlevel_check.hh highlevel_check_i.hh \
+       locus.cc locus.hh \
        main.cc \
        messages.cc messages.hh \
        misc.cc misc.hh \
@@ -70,7 +71,6 @@ dwarflint_SOURCES = \
        reloc.cc reloc.hh \
        section_id.cc section_id.hh \
        sections.cc sections.hh sections_i.hh \
-       where.cc where.hh \
        wrap.cc wrap.hh \
        \
        check_debug_abbrev.cc check_debug_abbrev.hh check_debug_abbrev_i.hh \
@@ -98,10 +98,10 @@ locstats_SOURCES = \
        locstats.cc \
        die_locus.cc die_locus.hh \
        files.cc files.hh \
+       locus.cc locus.hh \
        option.cc option.hh option_i.hh \
        section_id.cc section_id.hh \
-       pri.cc pri.hh \
-       where.cc where.hh
+       pri.cc pri.hh
 
 tests_test_coverage_SOURCES = tests/test-coverage.cc coverage.cc pri.cc \
        ../src/dwarfstrings.c
index 16246e0f8d02ef8440cb6e841acc5b9c1cb200e3..1772c9315d42fa5f457430ce496787baf32dcd29 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdint.h>
 #include <vector>
 
-#include "where.hh"
+#include "locus.hh"
 
 /* Functions and data structures for address record handling.  We
    use that to check that all DIE references actually point to an
index f9b5d1312391c3bbe9e0a2200e5958eb6914be8c..99941e8a265d4f6dfcda436e03a089dadeb33896 100644 (file)
@@ -27,7 +27,7 @@
 #define DWARFLINT_CHECKED_READ_HH
 
 #include "readctx.hh"
-#include "where.hh"
+#include "locus.hh"
 #include "dwarf_version.hh"
 
 enum error_code
index d92f4f2d13a23ce097b16ed40455d611d51328aa..4827cb7f485204c026c040453c5979ed2f83b8ff 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef DWARFLINT_CHECKS_HH
 #define DWARFLINT_CHECKS_HH
 
-#include "where.hh"
+#include "locus.hh"
 #include "dwarflint.hh"
 #include "checkdescriptor.hh"
 #include "messages.hh"
index a9420df08bbc02837b48619fbdcdb84af6d9d634..180423be85c5aa05670a690bcfaef585e91b0d30 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef _DWARFLINT_DIE_LOCUS_H_
 #define _DWARFLINT_DIE_LOCUS_H_
 
-#include "where.hh"
+#include "locus.hh"
 #include "../libdw/c++/dwarf"
 
 struct cu_locus_n {
similarity index 95%
rename from dwarflint/where.cc
rename to dwarflint/locus.cc
index 830a72dc274e86b78887ab2819c6c7cadd19c3f2..8109e3c6126a91c2479a140d82ab9b713d8ff2f0 100644 (file)
    Network licensing program, please visit www.openinventionnetwork.com
    <http://www.openinventionnetwork.com>.  */
 
-#include "where.hh"
+#include "locus.hh"
 #include "section_id.hh"
+#include <sstream>
 
 std::string
 format_simple_locus (char const *(*N) (),
-                    void (*F) (std::stringstream &, uint64_t),
+                    void (*F) (std::ostream &, uint64_t),
                     bool brief,
                     section_id sec,
                     uint64_t off)
similarity index 89%
rename from dwarflint/where.hh
rename to dwarflint/locus.hh
index 70d148780cdf8a945a37016ee290f03bd52352e1..b3d82f9cda69f4d7ab644e2871529772b3f5e1e1 100644 (file)
@@ -32,7 +32,6 @@
 #include <stdlib.h>
 #include <iosfwd>
 #include <iostream>
-#include <sstream>
 #include <cassert>
 
 class locus
@@ -40,12 +39,6 @@ class locus
 public:
   virtual std::string format (bool brief = false) const = 0;
   virtual locus *clone () const = 0;
-
-  virtual locus const *next () const
-  {
-    return NULL;
-  }
-
   virtual ~locus () {}
 };
 
@@ -61,13 +54,13 @@ public:
 };
 
 std::string format_simple_locus (char const *(*N) (),
-                                void (*F) (std::stringstream &, uint64_t),
+                                void (*F) (std::ostream &, uint64_t),
                                 bool brief,
                                 section_id sec,
                                 uint64_t off);
 
 template<char const *(*N) (),
-        void (*F) (std::stringstream &, uint64_t)>
+        void (*F) (std::ostream &, uint64_t)>
 class simple_locus
   : public clonable_locus<simple_locus<N, F> >
 {
@@ -88,7 +81,7 @@ public:
 
 template<section_id S,
         char const *(*N) (),
-        void (*F) (std::stringstream &, uint64_t)>
+        void (*F) (std::ostream &, uint64_t)>
 class fixed_locus
   : public simple_locus<N, F>
 {
@@ -101,10 +94,10 @@ public:
 struct locus_simple_fmt {
   static char const *offset () { return "offset"; }
 
-  static void hex (std::stringstream &ss, uint64_t off) {
+  static void hex (std::ostream &ss, uint64_t off) {
     ss << "0x" << std::hex << off;
   }
-  static void dec (std::stringstream &ss, uint64_t off) {
+  static void dec (std::ostream &ss, uint64_t off) {
     ss << std::dec << off;
   }
 };
index fde1f6921f3fb83955e9b6db3b604124590f39a7..c696aca4d82b4f97477f5551ebc60b809cad0de5 100644 (file)
@@ -243,18 +243,11 @@ message_criteria::and_not (message_term const &term)
   *this *= tmp;
 }
 
-static void
-format_chain (locus const &loc, char const *)
-{
-  assert (loc.next () == NULL);
-}
-
 static void
 wr_verror (locus const &loc, const char *format, va_list ap)
 {
   printf ("error: %s", loc.format ().c_str ());
   vprintf (format, ap);
-  format_chain (loc, "error");
   ++error_count;
 }
 
@@ -263,7 +256,6 @@ wr_vwarning (locus const &loc, const char *format, va_list ap)
 {
   printf ("%s", loc.format ().c_str ());
   vprintf (format, ap);
-  format_chain (loc, "warning");
   ++error_count;
 }
 
index 6ce527bae1568af28e421b2986b4f5e495fad74e..88ed3a849c4fa2514dc071ad9bd2b6d1a63c656b 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef DWARFLINT_MESSAGES_HH
 #define DWARFLINT_MESSAGES_HH
 
-#include "where.hh"
+#include "locus.hh"
 #include "libdw.h"
 #include <string>
 #include <iosfwd>
index 4135e1a7a5dcf4e710fa117313ddae2093fc18a9..6be3dbd5ade2462b307adfce8efe68402fa2b32f 100644 (file)
@@ -27,7 +27,7 @@
 #define DWARFLINT_MISC_HH
 
 #include <cstring>
-#include "where.hh"
+#include "locus.hh"
 
 extern "C"
 {
index 65effb3cc3e2a5e1413cd25044710da485b7af90..548aab568871dcf36982213497725419f9db8a28 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef DWARFLINT_RELOC_H
 #define DWARFLINT_RELOC_H
 
-#include "where.hh"
+#include "locus.hh"
 #include "elf_file_i.hh"
 #include <libelf.h>
 #include <gelf.h>