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 \
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 \
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
#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
#define DWARFLINT_CHECKED_READ_HH
#include "readctx.hh"
-#include "where.hh"
+#include "locus.hh"
#include "dwarf_version.hh"
enum error_code
#ifndef DWARFLINT_CHECKS_HH
#define DWARFLINT_CHECKS_HH
-#include "where.hh"
+#include "locus.hh"
#include "dwarflint.hh"
#include "checkdescriptor.hh"
#include "messages.hh"
#ifndef _DWARFLINT_DIE_LOCUS_H_
#define _DWARFLINT_DIE_LOCUS_H_
-#include "where.hh"
+#include "locus.hh"
#include "../libdw/c++/dwarf"
struct cu_locus_n {
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)
#include <stdlib.h>
#include <iosfwd>
#include <iostream>
-#include <sstream>
#include <cassert>
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 () {}
};
};
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> >
{
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>
{
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;
}
};
*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;
}
{
printf ("%s", loc.format ().c_str ());
vprintf (format, ap);
- format_chain (loc, "warning");
++error_count;
}
#ifndef DWARFLINT_MESSAGES_HH
#define DWARFLINT_MESSAGES_HH
-#include "where.hh"
+#include "locus.hh"
#include "libdw.h"
#include <string>
#include <iosfwd>
#define DWARFLINT_MISC_HH
#include <cstring>
-#include "where.hh"
+#include "locus.hh"
extern "C"
{
#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>