diff options
author | Petr Machata <pmachata@redhat.com> | 2011-04-19 12:56:10 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2011-04-19 12:56:10 +0200 |
commit | 8e24ba6ab4a83318dd9db821cb80a1bef934699d (patch) | |
tree | 766f08a176765965aef43142d9c7ac92544d675c | |
parent | 6dc33ae6e429195d9852d23ae3953125f8c09061 (diff) | |
download | elfutils-8e24ba6ab4a83318dd9db821cb80a1bef934699d.tar.gz |
dwarflint: where.* -> locus.*, drop locus::next
-rw-r--r-- | dwarflint/Makefile.am | 6 | ||||
-rw-r--r-- | dwarflint/addr-record.hh | 2 | ||||
-rw-r--r-- | dwarflint/checked_read.hh | 2 | ||||
-rw-r--r-- | dwarflint/checks.hh | 2 | ||||
-rw-r--r-- | dwarflint/die_locus.hh | 2 | ||||
-rw-r--r-- | dwarflint/locus.cc (renamed from dwarflint/where.cc) | 5 | ||||
-rw-r--r-- | dwarflint/locus.hh (renamed from dwarflint/where.hh) | 17 | ||||
-rw-r--r-- | dwarflint/messages.cc | 8 | ||||
-rw-r--r-- | dwarflint/messages.hh | 2 | ||||
-rw-r--r-- | dwarflint/misc.hh | 2 | ||||
-rw-r--r-- | dwarflint/reloc.hh | 2 |
11 files changed, 18 insertions, 32 deletions
diff --git a/dwarflint/Makefile.am b/dwarflint/Makefile.am index 995acfd6..8b2f99fc 100644 --- a/dwarflint/Makefile.am +++ b/dwarflint/Makefile.am @@ -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 diff --git a/dwarflint/addr-record.hh b/dwarflint/addr-record.hh index 16246e0f..1772c931 100644 --- a/dwarflint/addr-record.hh +++ b/dwarflint/addr-record.hh @@ -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 diff --git a/dwarflint/checked_read.hh b/dwarflint/checked_read.hh index f9b5d131..99941e8a 100644 --- a/dwarflint/checked_read.hh +++ b/dwarflint/checked_read.hh @@ -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 diff --git a/dwarflint/checks.hh b/dwarflint/checks.hh index d92f4f2d..4827cb7f 100644 --- a/dwarflint/checks.hh +++ b/dwarflint/checks.hh @@ -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" diff --git a/dwarflint/die_locus.hh b/dwarflint/die_locus.hh index a9420df0..180423be 100644 --- a/dwarflint/die_locus.hh +++ b/dwarflint/die_locus.hh @@ -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 { diff --git a/dwarflint/where.cc b/dwarflint/locus.cc index 830a72dc..8109e3c6 100644 --- a/dwarflint/where.cc +++ b/dwarflint/locus.cc @@ -23,12 +23,13 @@ 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) diff --git a/dwarflint/where.hh b/dwarflint/locus.hh index 70d14878..b3d82f9c 100644 --- a/dwarflint/where.hh +++ b/dwarflint/locus.hh @@ -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; } }; diff --git a/dwarflint/messages.cc b/dwarflint/messages.cc index fde1f692..c696aca4 100644 --- a/dwarflint/messages.cc +++ b/dwarflint/messages.cc @@ -244,17 +244,10 @@ message_criteria::and_not (message_term const &term) } 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; } diff --git a/dwarflint/messages.hh b/dwarflint/messages.hh index 6ce527ba..88ed3a84 100644 --- a/dwarflint/messages.hh +++ b/dwarflint/messages.hh @@ -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> diff --git a/dwarflint/misc.hh b/dwarflint/misc.hh index 4135e1a7..6be3dbd5 100644 --- a/dwarflint/misc.hh +++ b/dwarflint/misc.hh @@ -27,7 +27,7 @@ #define DWARFLINT_MISC_HH #include <cstring> -#include "where.hh" +#include "locus.hh" extern "C" { diff --git a/dwarflint/reloc.hh b/dwarflint/reloc.hh index 65effb3c..548aab56 100644 --- a/dwarflint/reloc.hh +++ b/dwarflint/reloc.hh @@ -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> |