summaryrefslogtreecommitdiffstats
path: root/setupdwfl.h
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-09-28 15:36:33 +0200
committerMark Wielaard <mjw@redhat.com>2009-09-28 15:36:33 +0200
commit3db9c8433e58812c9ce47df384e23841aca27894 (patch)
tree5af4c562d8bd9775075dcb6bf6ff3b4feb07f355 /setupdwfl.h
parentd498530cec1fcf4b71b1b27a068206fda18f3188 (diff)
downloadsystemtap-steved-3db9c8433e58812c9ce47df384e23841aca27894.tar.gz
systemtap-steved-3db9c8433e58812c9ce47df384e23841aca27894.tar.xz
systemtap-steved-3db9c8433e58812c9ce47df384e23841aca27894.zip
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.
Diffstat (limited to 'setupdwfl.h')
-rw-r--r--setupdwfl.h28
1 files changed, 28 insertions, 0 deletions
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 <set>
+#include <string>
+
+extern "C" {
+#include <elfutils/libdwfl.h>
+}
+
+Dwfl *setup_dwfl_kernel(const std::string &name,
+ unsigned *found,
+ systemtap_session &s);
+Dwfl *setup_dwfl_kernel(const std::set<std::string> &names,
+ unsigned *found,
+ systemtap_session &s);
+#endif