dwarfcmp_test_LDADD = $(dwarfcmp_LDADD)
dwarflint_SOURCES = dwarfstrings.c \
- dwarflint/main.cc dwarflint/dwarflint.hh dwarflint/misc.h \
+ dwarflint/main.cc \
+ dwarflint/dwarflint.cc dwarflint/dwarflint.hh dwarflint/misc.h \
dwarflint/low.c dwarflint/low.h \
dwarflint/expected-at.cc dwarflint/expected.hh \
dwarflint/coverage.cc dwarflint/coverage.h \
throw check_base::failed (""); //xxx
check_debug_info *info = NULL;
- info = toplev_check (lint, info);
+ info = lint.toplev_check (info);
if (info != NULL)
for (std::vector<cu>::iterator it = info->cus.begin ();
it != info->cus.end (); ++it)
if (!checked_read_uleb128 (ctx, ptr,
where, "directory index"))
return false;
+
if (*name == '/' && *ptr != 0)
wr_message (*where, cat (mc_impact_2, mc_line, mc_header))
<< ": file #" << nfile
<< " has absolute pathname, but refers to directory != 0."
<< std::endl;
+
if (*ptr > _m_include_directories.size ())
/* Not >=, dirs are indexed from 1. */
{
check_debug_aranges::check_debug_aranges (dwarflint &lint)
: _m_sec_aranges (lint.check (_m_sec_aranges))
{
- check_debug_info *info = toplev_check<check_debug_info> (lint);
+ check_debug_info *info = lint.toplev_check<check_debug_info> ();
coverage *cov = NULL;
if (info != NULL)
{
// stored in check_ranges, and that should have been requested
// explicitly. But for the time being...
if (info->cu_cov.need_ranges)
- toplev_check<check_debug_ranges> (lint);
+ lint.toplev_check<check_debug_ranges> ();
if (!info->cu_cov.need_ranges)
cov = &info->cu_cov.cov;
}
};
template <class T>
-T *
-toplev_check (dwarflint &lint,
- __attribute__ ((unused)) T *tag = NULL)
+inline T *
+dwarflint::toplev_check (__attribute__ ((unused)) T *tag)
{
try
{
- return lint.check<T> ();
+ return check<T> ();
}
catch (check_base::failed const &f)
{
virtual void run (dwarflint &lint)
{
- toplev_check <T> (lint);
+ lint.toplev_check <T> ();
}
};
--- /dev/null
+#include "dwarflint.hh"
+
+dwarflint::dwarflint (Elf *a_elf)
+ : _m_elf (a_elf)
+{
+ check_registrar::inst ()->enroll (*this);
+}
{
return check<T> ();
}
+
+ template <class T> T * toplev_check (T *tag = NULL);
};
#endif//DWARFLINT_HH
return 0;
}
-dwarflint::dwarflint (Elf *a_elf)
- : _m_elf (a_elf)
-{
- check_registrar::inst ()->enroll (*this);
-}
-
int
main (int argc, char *argv[])
{