From 3db9c8433e58812c9ce47df384e23841aca27894 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 28 Sep 2009 15:36:33 +0200 Subject: Factor out duplicated code to setup kernel/module Dwfl from dwflpp/translate. * setupdwfl.h: New header file. * setupdwfl.cxx: New source file containing shared setup_dwfl_kernel() code. * dwflpp.cxx (dwfl_report_offline_predicate): Removed. (setup_kernel): Call setup_dwfl_kernel(). * translate.cxx (dwfl_report_offline_predicate2): Remove. (emit_symbol_data): Call setup_dwfl_kernel(). * Makefile.am (stap_SOURCES): Add setupdwfl.cxx. * Makefile.in: Regenerated. --- setupdwfl.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 setupdwfl.h (limited to 'setupdwfl.h') diff --git a/setupdwfl.h b/setupdwfl.h new file mode 100644 index 00000000..7884e4da --- /dev/null +++ b/setupdwfl.h @@ -0,0 +1,28 @@ +// Setup routines for creating fully populated DWFLs. Used in pass 2 and 3. +// Copyright (C) 2009 Red Hat, Inc. +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. +// +#ifndef SETUP_DWFLPP_H +#define SETUP_DWFLPP_H + +#include "config.h" +#include "session.h" + +#include +#include + +extern "C" { +#include +} + +Dwfl *setup_dwfl_kernel(const std::string &name, + unsigned *found, + systemtap_session &s); +Dwfl *setup_dwfl_kernel(const std::set &names, + unsigned *found, + systemtap_session &s); +#endif -- cgit