summaryrefslogtreecommitdiffstats
path: root/elaborate.h
diff options
context:
space:
mode:
authorfche <fche>2005-11-01 16:13:35 +0000
committerfche <fche>2005-11-01 16:13:35 +0000
commit177a8ead26e48a61efd904103a9d189cb27009dd (patch)
treed27cfc1ba5928e3454cda6dca7b1bee30d9732b9 /elaborate.h
parentdc2729782a046ea5f60e74f48d1097d2fec4a16b (diff)
downloadsystemtap-steved-177a8ead26e48a61efd904103a9d189cb27009dd.tar.gz
systemtap-steved-177a8ead26e48a61efd904103a9d189cb27009dd.tar.xz
systemtap-steved-177a8ead26e48a61efd904103a9d189cb27009dd.zip
2005-11-01 Frank Ch. Eigler <fche@elastic.org>
PR 1425. * configure.ac: Look for rpm-devel headers and libs. * configure: Regenerated. * session.h: New file to contain systemtap_session decl. * staptree.h: Likewise evict statistics_decl. * elaborate.h: Corresponding changes. * main.cxx (usage): Elaborate. Re-enable "-r RELEASE" option. * parse.cxx (parser): Add systemtap_session& field. Update users. (scan_pp, eval_pp_conditional): New routines for preprocessing. (peek, next): Call it. (lexer::scan): Lex the preprocessor operators. (parser::parse): Include an extra level of exception catching for parse errors that occur during recovery. * parse.h: Corresponding changes. (parse_error): Allow explicit token parameter. * stap.1.in: Document preprocessing. * testsuite/parseok/fourteen.stp: New test.
Diffstat (limited to 'elaborate.h')
-rw-r--r--elaborate.h61
1 files changed, 2 insertions, 59 deletions
diff --git a/elaborate.h b/elaborate.h
index 0abc04e0..df021076 100644
--- a/elaborate.h
+++ b/elaborate.h
@@ -9,6 +9,7 @@
#ifndef ELABORATE_H
#define ELABORATE_H
+#include "session.h"
#include "staptree.h"
#include "parse.h"
#include <string>
@@ -19,7 +20,6 @@
// ------------------------------------------------------------------------
-struct systemtap_session;
struct derived_probe;
struct match_node;
@@ -191,64 +191,7 @@ match_node
// ------------------------------------------------------------------------
-
-class unparser;
-class translator_output;
-
-struct systemtap_session
-{
- systemtap_session ();
-
- // command line args
- std::vector<std::string> include_path;
- std::vector<std::string> macros;
- std::vector<std::string> args;
- std::string kernel_release;
- std::string runtime_path;
- std::string module_name;
- std::string output_file;
- std::string cmd;
- int target_pid;
- int last_pass;
- bool test_mode;
- bool verbose;
- bool keep_tmpdir;
- bool guru_mode;
- bool bulk_mode;
- int buffer_size;
-
- // temporary directory for module builds etc.
- // hazardous - it is "rm -rf"'d at exit
- std::string tmpdir;
- std::string translated_source; // C source code
-
- match_node* pattern_root;
- void register_library_aliases();
-
- // parse trees for the various script files
- stapfile* user_file;
- std::vector<stapfile*> library_files;
-
- // resolved globals/functions/probes for the run as a whole
- std::vector<stapfile*> files;
- std::vector<vardecl*> globals;
- std::vector<functiondecl*> functions;
- std::vector<derived_probe*> probes;
- std::vector<embeddedcode*> embeds;
- std::map<std::string, statistic_decl> stat_decls;
-
- // module-referencing file handles
- std::map<std::string,int> module_fds;
-
- // unparser data
- translator_output* op;
- unparser* up;
-
- unsigned num_errors;
- // void print_error (const parse_error& e);
- void print_error (const semantic_error& e);
-};
-
+/* struct systemtap_session moved to session.h */
int semantic_pass (systemtap_session& s);
void derive_probes (systemtap_session& s,