]> sourceware.org Git - systemtap.git/blob - session.cxx
Merge branch 'master' into dsmith/task_finder2
[systemtap.git] / session.cxx
1 // session functions
2 // Copyright (C) 2010-2011 Red Hat Inc.
3 //
4 // This file is part of systemtap, and is free software. You can
5 // redistribute it and/or modify it under the terms of the GNU General
6 // Public License (GPL); either version 2, or (at your option) any
7 // later version.
8
9 #include "config.h"
10 #include "session.h"
11 #include "cache.h"
12 #include "elaborate.h"
13 #include "translate.h"
14 #include "buildrun.h"
15 #include "coveragedb.h"
16 #include "hash.h"
17 #include "task_finder.h"
18 #include "csclient.h"
19 #include "rpm_finder.h"
20 #include "util.h"
21 #include "git_version.h"
22
23 #include <cerrno>
24 #include <cstdlib>
25
26 extern "C" {
27 #include <getopt.h>
28 #include <limits.h>
29 #include <grp.h>
30 #include <sys/stat.h>
31 #include <sys/utsname.h>
32 #include <elfutils/libdwfl.h>
33 }
34
35 #if HAVE_NSS
36 extern "C" {
37 #include <nspr.h>
38 }
39 #endif
40
41 #include <string>
42
43 using namespace std;
44
45 /* getopt variables */
46 extern int optind;
47
48 #define PATH_TBD string("__TBD__")
49
50 #if HAVE_NSS
51 bool systemtap_session::NSPR_Initialized = false;
52 #endif
53
54 systemtap_session::systemtap_session ():
55 // NB: pointer members must be manually initialized!
56 // NB: don't forget the copy constructor too!
57 base_hash(0),
58 pattern_root(new match_node),
59 user_file (0),
60 be_derived_probes(0),
61 dwarf_derived_probes(0),
62 kprobe_derived_probes(0),
63 hwbkpt_derived_probes(0),
64 perf_derived_probes(0),
65 uprobe_derived_probes(0),
66 utrace_derived_probes(0),
67 itrace_derived_probes(0),
68 task_finder_derived_probes(0),
69 timer_derived_probes(0),
70 profile_derived_probes(0),
71 mark_derived_probes(0),
72 tracepoint_derived_probes(0),
73 hrtimer_derived_probes(0),
74 procfs_derived_probes(0),
75 op (0), up (0),
76 sym_kprobes_text_start (0),
77 sym_kprobes_text_end (0),
78 sym_stext (0),
79 module_cache (0),
80 last_token (0)
81 {
82 struct utsname buf;
83 (void) uname (& buf);
84 kernel_release = string (buf.release);
85 release = kernel_release;
86 kernel_build_tree = "/lib/modules/" + kernel_release + "/build";
87 architecture = machine = normalize_machine(buf.machine);
88
89 for (unsigned i=0; i<5; i++) perpass_verbose[i]=0;
90 verbose = 0;
91
92 have_script = false;
93 runtime_specified = false;
94 include_arg_start = -1;
95 timing = false;
96 guru_mode = false;
97 bulk_mode = false;
98 unoptimized = false;
99 suppress_warnings = false;
100 panic_warnings = false;
101 listing_mode = false;
102 listing_mode_vars = false;
103 dump_probe_types = false;
104
105 #ifdef ENABLE_PROLOGUES
106 prologue_searching = true;
107 #else
108 prologue_searching = false;
109 #endif
110
111 buffer_size = 0;
112 last_pass = 5;
113 module_name = "stap_" + lex_cast(getpid());
114 stapconf_name = "stapconf_" + lex_cast(getpid()) + ".h";
115 output_file = ""; // -o FILE
116 tmpdir_opt_set = false;
117 save_module = false;
118 modname_given = false;
119 keep_tmpdir = false;
120 cmd = "";
121 target_pid = 0;
122 use_cache = true;
123 use_script_cache = true;
124 poison_cache = false;
125 tapset_compile_coverage = false;
126 need_uprobes = false;
127 need_unwind = false;
128 need_symbols = false;
129 uprobes_path = "";
130 consult_symtab = false;
131 ignore_vmlinux = false;
132 ignore_dwarf = false;
133 load_only = false;
134 skip_badvars = false;
135 privilege = pr_stapdev;
136 omit_werror = false;
137 compatible = VERSION; // XXX: perhaps also process GIT_SHAID if available?
138 unwindsym_ldd = false;
139 client_options = false;
140 server_cache = NULL;
141 automatic_server_mode = false;
142 use_server_on_error = false;
143 try_server_status = try_server_unset;
144 use_remote_prefix = false;
145 systemtap_v_check = false;
146 download_dbinfo = 0;
147 native_build = true; // presumed
148
149 /* adding in the XDG_DATA_DIRS variable path,
150 * this searches in conjunction with SYSTEMTAP_TAPSET
151 * to locate stap scripts, either can be disabled if
152 * needed using env $PATH=/dev/null where $PATH is the
153 * path you want disabled
154 */
155 const char* s_p1 = getenv ("XDG_DATA_DIRS");
156 if ( s_p1 != NULL )
157 {
158 vector<string> dirs;
159 tokenize(s_p1, dirs, ":");
160 for(vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i)
161 {
162 include_path.push_back(*i + "/systemtap/tapset");
163 }
164 }
165
166 const char* s_p = getenv ("SYSTEMTAP_TAPSET");
167 if (s_p != NULL)
168 {
169 include_path.push_back (s_p);
170 }
171 else
172 {
173 include_path.push_back (string(PKGDATADIR) + "/tapset");
174 }
175
176 const char* s_r = getenv ("SYSTEMTAP_RUNTIME");
177 if (s_r != NULL)
178 runtime_path = s_r;
179 else
180 runtime_path = string(PKGDATADIR) + "/runtime";
181
182 const char* s_d = getenv ("SYSTEMTAP_DIR");
183 if (s_d != NULL)
184 data_path = s_d;
185 else
186 data_path = get_home_directory() + string("/.systemtap");
187 if (create_dir(data_path.c_str()) == 1)
188 {
189 const char* e = strerror (errno);
190 if (! suppress_warnings)
191 cerr << _F("Warning: failed to create systemtap data directory \"%s\":%s, disabling cache support.",
192 data_path.c_str(),e) << endl;
193 use_cache = use_script_cache = false;
194 }
195
196 if (use_cache)
197 {
198 cache_path = data_path + "/cache";
199 if (create_dir(cache_path.c_str()) == 1)
200 {
201 const char* e = strerror (errno);
202 if (! suppress_warnings)
203 cerr << _F("Warning: failed to create cache directory (\" %s \"): %s, disabling cache support.",
204 cache_path.c_str(),e) << endl;
205 use_cache = use_script_cache = false;
206 }
207 }
208
209 const char* s_tc = getenv ("SYSTEMTAP_COVERAGE");
210 if (s_tc != NULL)
211 tapset_compile_coverage = true;
212
213 const char* s_kr = getenv ("SYSTEMTAP_RELEASE");
214 if (s_kr != NULL) {
215 setup_kernel_release(s_kr);
216 }
217 }
218
219 systemtap_session::systemtap_session (const systemtap_session& other,
220 const string& arch,
221 const string& kern):
222 // NB: pointer members must be manually initialized!
223 // NB: this needs to consider everything that the base ctor does,
224 // plus copying any wanted implicit fields (strings, vectors, etc.)
225 base_hash(0),
226 pattern_root(new match_node),
227 user_file (other.user_file),
228 be_derived_probes(0),
229 dwarf_derived_probes(0),
230 kprobe_derived_probes(0),
231 hwbkpt_derived_probes(0),
232 perf_derived_probes(0),
233 uprobe_derived_probes(0),
234 utrace_derived_probes(0),
235 itrace_derived_probes(0),
236 task_finder_derived_probes(0),
237 timer_derived_probes(0),
238 profile_derived_probes(0),
239 mark_derived_probes(0),
240 tracepoint_derived_probes(0),
241 hrtimer_derived_probes(0),
242 procfs_derived_probes(0),
243 op (0), up (0),
244 sym_kprobes_text_start (0),
245 sym_kprobes_text_end (0),
246 sym_stext (0),
247 module_cache (0),
248 last_token (0)
249 {
250 release = kernel_release = kern;
251 kernel_build_tree = "/lib/modules/" + kernel_release + "/build";
252 architecture = machine = normalize_machine(arch);
253 setup_kernel_release(kern.c_str());
254 native_build = false; // assumed; XXX: could be computed as in check_options()
255
256 // These are all copied in the same order as the default ctor did above.
257
258 copy(other.perpass_verbose, other.perpass_verbose + 5, perpass_verbose);
259 verbose = other.verbose;
260
261 have_script = other.have_script;
262 runtime_specified = other.runtime_specified;
263 include_arg_start = other.include_arg_start;
264 timing = other.timing;
265 guru_mode = other.guru_mode;
266 bulk_mode = other.bulk_mode;
267 unoptimized = other.unoptimized;
268 suppress_warnings = other.suppress_warnings;
269 panic_warnings = other.panic_warnings;
270 listing_mode = other.listing_mode;
271 listing_mode_vars = other.listing_mode_vars;
272 dump_probe_types = other.dump_probe_types;
273
274 prologue_searching = other.prologue_searching;
275
276 buffer_size = other.buffer_size;
277 last_pass = other.last_pass;
278 module_name = other.module_name;
279 stapconf_name = other.stapconf_name;
280 output_file = other.output_file; // XXX how should multiple remotes work?
281 tmpdir_opt_set = false;
282 save_module = other.save_module;
283 modname_given = other.modname_given;
284 keep_tmpdir = other.keep_tmpdir;
285 cmd = other.cmd;
286 target_pid = other.target_pid; // XXX almost surely nonsense for multiremote
287 use_cache = other.use_cache;
288 use_script_cache = other.use_script_cache;
289 poison_cache = other.poison_cache;
290 tapset_compile_coverage = other.tapset_compile_coverage;
291 need_uprobes = false;
292 need_unwind = false;
293 need_symbols = false;
294 uprobes_path = "";
295 consult_symtab = other.consult_symtab;
296 ignore_vmlinux = other.ignore_vmlinux;
297 ignore_dwarf = other.ignore_dwarf;
298 load_only = other.load_only;
299 skip_badvars = other.skip_badvars;
300 privilege = other.privilege;
301 omit_werror = other.omit_werror;
302 compatible = other.compatible;
303 unwindsym_ldd = other.unwindsym_ldd;
304 client_options = other.client_options;
305 server_cache = NULL;
306 use_server_on_error = other.use_server_on_error;
307 try_server_status = other.try_server_status;
308 use_remote_prefix = other.use_remote_prefix;
309 systemtap_v_check = other.systemtap_v_check;
310 download_dbinfo = other.download_dbinfo;
311
312 include_path = other.include_path;
313 runtime_path = other.runtime_path;
314
315 // NB: assuming that "other" created these already
316 data_path = other.data_path;
317 cache_path = other.cache_path;
318
319 tapset_compile_coverage = other.tapset_compile_coverage;
320
321
322 // These are fields that were left to their default ctor, but now we want to
323 // copy them from "other". In the same order as declared...
324 script_file = other.script_file;
325 cmdline_script = other.cmdline_script;
326 macros = other.macros;
327 args = other.args;
328 kbuildflags = other.kbuildflags;
329 globalopts = other.globalopts;
330
331 client_options_disallowed = other.client_options_disallowed;
332 server_status_strings = other.server_status_strings;
333 specified_servers = other.specified_servers;
334 server_trust_spec = other.server_trust_spec;
335 server_args = other.server_args;
336
337 unwindsym_modules = other.unwindsym_modules;
338 automatic_server_mode = other.automatic_server_mode;
339 }
340
341 systemtap_session::~systemtap_session ()
342 {
343 delete_map(subsessions);
344 delete pattern_root;
345 }
346
347 #if HAVE_NSS
348 void
349 systemtap_session::NSPR_init ()
350 {
351 if (! NSPR_Initialized)
352 {
353 PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1);
354 NSPR_Initialized = true;
355 }
356 }
357 #endif // HAVE_NSS
358
359 systemtap_session*
360 systemtap_session::clone(const string& arch, const string& release)
361 {
362 const string norm_arch = normalize_machine(arch);
363 if (this->architecture == norm_arch && this->kernel_release == release)
364 return this;
365
366 systemtap_session*& s = subsessions[make_pair(norm_arch, release)];
367 if (!s)
368 s = new systemtap_session(*this, norm_arch, release);
369 return s;
370 }
371
372 void
373 systemtap_session::version ()
374 {
375 clog << _F("Systemtap translator/driver (version %s/%s %s)\n"
376 "Copyright (C) 2005-2011 Red Hat, Inc. and others\n"
377 "This is free software; see the source for copying conditions.",
378 VERSION, dwfl_version(NULL), GIT_MESSAGE) << endl;
379 clog << _("enabled features:")
380 #ifdef HAVE_AVAHI
381 << " AVAHI"
382 #endif
383 #ifdef HAVE_LIBRPM
384 << " LIBRPM"
385 #endif
386 #ifdef HAVE_LIBSQLITE3
387 << " LIBSQLITE3"
388 #endif
389 #ifdef HAVE_NSS
390 << " NSS"
391 #endif
392 #ifdef HAVE_BOOST_SHARED_PTR_HPP
393 << " BOOST_SHARED_PTR"
394 #endif
395 #ifdef HAVE_TR1_UNORDERED_MAP
396 << " TR1_UNORDERED_MAP"
397 #endif
398 #ifdef ENABLE_PROLOGUES
399 << " PROLOGUES"
400 #endif
401 #ifdef ENABLE_NLS
402 << " NLS"
403 #endif
404 << endl;
405 }
406
407 void
408 systemtap_session::usage (int exitcode)
409 {
410 version ();
411 clog
412 << endl
413 //Session.cxx:287-390 detail systemtap usage from stap -h
414 << _F("Usage: stap [options] FILE Run script in file.\n"
415 " or: stap [options] - Run script on stdin.\n"
416 " or: stap [options] -e SCRIPT Run given script.\n"
417 " or: stap [options] -l PROBE List matching probes.\n"
418 " or: stap [options] -L PROBE List matching probes and local variables.\n\n"
419 "Options:\n"
420 " -- end of translator options, script options follow\n"
421 " -h --help show help\n"
422 " -V --version show version\n"
423 " -p NUM stop after pass NUM 1-5, instead of %d\n"
424 " (parse, elaborate, translate, compile, run)\n"
425 " -v add verbosity to all passes\n"
426 " --vp {N}+ add per-pass verbosity [", last_pass);
427 for (unsigned i=0; i<5; i++)
428 clog << (perpass_verbose[i] <= 9 ? perpass_verbose[i] : 9);
429 clog
430 << "]" << endl;
431 clog << _F(" -k keep temporary directory\n"
432 " -u unoptimized translation %s\n"
433 " -w suppress warnings %s\n"
434 " -W turn warnings into errors %s\n"
435 " -g guru mode %s\n"
436 " -P prologue-searching for function probes %s\n"
437 " -b bulk (percpu file) mode %s\n"
438 " -s NUM buffer size in megabytes, instead of %d\n"
439 " -I DIR look in DIR for additional .stp script files", (unoptimized ? _(" [set]") : ""),
440 (suppress_warnings ? _(" [set]") : ""), (panic_warnings ? _(" [set]") : ""),
441 (guru_mode ? _(" [set]") : ""), (prologue_searching ? _(" [set]") : ""),
442 (bulk_mode ? _(" [set]") : ""), buffer_size);
443 if (include_path.size() == 0)
444 clog << endl;
445 else
446 clog << _(", in addition to") << endl;
447 for (unsigned i=0; i<include_path.size(); i++)
448 clog << " " << include_path[i].c_str() << endl;
449 clog
450 << _F(" -D NM=VAL emit macro definition into generated C code\n"
451 " -B NM=VAL pass option to kbuild make\n"
452 " -G VAR=VAL set global variable to value\n"
453 //TRANSLATORS: translating 'runtime' is not advised
454 " -R DIR look in DIR for runtime, instead of\n"
455 " %s\n"
456 " -r DIR cross-compile to kernel with given build tree; or else\n"
457 " -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead of\n"
458 " %s\n"
459 " -a ARCH cross-compile to given architecture, instead of %s\n"
460 " -m MODULE set probe module name, instead of \n"
461 " %s\n"
462 " -o FILE send script output to file, instead of stdout. This supports\n"
463 " strftime(3) formats for FILE\n"
464 " -c CMD start the probes, run CMD, and exit when it finishes\n"
465 " -x PID sets target() to PID\n"
466 " -F run as on-file flight recorder with -o.\n"
467 " run as on-memory flight recorder without -o.\n"
468 " -S size[,n] set maximum of the size and the number of files.\n"
469 " -d OBJECT add unwind/symbol data for OBJECT file", runtime_path.c_str(), kernel_build_tree.c_str(), architecture.c_str(), module_name.c_str());
470 if (unwindsym_modules.size() == 0)
471 clog << endl;
472 else
473 clog << _(", in addition to") << endl;
474 {
475 vector<string> syms (unwindsym_modules.begin(), unwindsym_modules.end());
476 for (unsigned i=0; i<syms.size(); i++)
477 clog << " " << syms[i].c_str() << endl;
478 }
479 clog
480 << _F(" --ldd add unwind/symbol data for all referenced object files.\n"
481 " --all-modules\n"
482 " add unwind/symbol data for all loaded kernel objects.\n"
483 " -t collect probe timing information\n"
484 #ifdef HAVE_LIBSQLITE3
485 " -q generate information on tapset coverage\n"
486 #endif /* HAVE_LIBSQLITE3 */
487 " --privilege=PRIVILEGE_LEVEL\n"
488 " check the script for constructs not allowed at the given privilege level\n"
489 " --unprivileged\n"
490 " equivalent to --privilege=stapusr\n"
491 #if 0 /* PR6864: disable temporarily; should merge with -d somehow */
492 " --kelf make do with symbol table from vmlinux\n"
493 " --kmap[=FILE]\n"
494 " make do with symbol table from nm listing\n"
495 #endif
496 // Formerly present --ignore-{vmlinux,dwarf} options are for testsuite use
497 // only, and don't belong in the eyesight of a plain user.
498 " --compatible=VERSION\n"
499 " suppress incompatible language/tapset changes beyond VERSION,\n"
500 " instead of %s\n"
501 " --check-version\n"
502 " displays warnings where a syntax element may be \n"
503 " version dependent\n"
504 " --skip-badvars\n"
505 " substitute zero for bad context $variables\n"
506 " --use-server[=SERVER-SPEC]\n"
507 " specify systemtap compile-servers\n"
508 " --list-servers[=PROPERTIES]\n"
509 " report on the status of the specified compile-servers:\n"
510 " all,specified,online,trusted,signer,compatible\n"
511 #if HAVE_NSS
512 " --trust-servers[=TRUST-SPEC]\n"
513 " add/revoke trust of specified compile-servers:\n"
514 " ssl,signer,all-users,revoke,no-prompt\n"
515 " --use-server-on-error[=yes/no]\n"
516 " retry compilation using a compile server upon compilation error\n"
517 #endif
518 " --remote=HOSTNAME\n"
519 " run pass 5 on the specified ssh host.\n"
520 " may be repeated for targeting multiple hosts.\n"
521 " --remote-prefix\n"
522 " prefix each line of remote output with a host index.\n"
523 " --tmpdir=NAME\n"
524 " specify name of temporary directory to be used.\n"
525 " --download-debuginfo[=OPTION]\n"
526 " automatically download debuginfo using ABRT.\n"
527 " yes,no,ask,<timeout value>\n"
528 " --dump-probe-types\n"
529 " show a list of available probe types.\n"
530 , compatible.c_str()) << endl
531 ;
532
533 time_t now;
534 time (& now);
535 struct tm* t = localtime (& now);
536 if (t && t->tm_mon*3 + t->tm_mday*173 == 0xb6)
537 clog << morehelp << endl;
538
539 exit (exitcode);
540 }
541
542 int
543 systemtap_session::parse_cmdline (int argc, char * const argv [])
544 {
545 client_options_disallowed = "";
546 while (true)
547 {
548 int long_opt = 0;
549 char * num_endptr;
550
551 // NB: when adding new options, consider very carefully whether they
552 // should be restricted from stap clients (after --client-options)!
553 #define LONG_OPT_KELF 1
554 #define LONG_OPT_KMAP 2
555 #define LONG_OPT_IGNORE_VMLINUX 3
556 #define LONG_OPT_IGNORE_DWARF 4
557 #define LONG_OPT_VERBOSE_PASS 5
558 #define LONG_OPT_SKIP_BADVARS 6
559 #define LONG_OPT_UNPRIVILEGED 7
560 #define LONG_OPT_OMIT_WERROR 8
561 #define LONG_OPT_CLIENT_OPTIONS 9
562 #define LONG_OPT_HELP 10
563 #define LONG_OPT_DISABLE_CACHE 11
564 #define LONG_OPT_POISON_CACHE 12
565 #define LONG_OPT_CLEAN_CACHE 13
566 #define LONG_OPT_COMPATIBLE 14
567 #define LONG_OPT_LDD 15
568 #define LONG_OPT_USE_SERVER 16
569 #define LONG_OPT_LIST_SERVERS 17
570 #define LONG_OPT_TRUST_SERVERS 18
571 #define LONG_OPT_ALL_MODULES 19
572 #define LONG_OPT_REMOTE 20
573 #define LONG_OPT_CHECK_VERSION 21
574 #define LONG_OPT_USE_SERVER_ON_ERROR 22
575 #define LONG_OPT_VERSION 23
576 #define LONG_OPT_REMOTE_PREFIX 24
577 #define LONG_OPT_TMPDIR 25
578 #define LONG_OPT_DOWNLOAD_DEBUGINFO 26
579 #define LONG_OPT_DUMP_PROBE_TYPES 27
580 #define LONG_OPT_PRIVILEGE 28
581 // NB: also see find_hash(), usage(), switch stmt below, stap.1 man page
582 static struct option long_options[] = {
583 { "kelf", 0, &long_opt, LONG_OPT_KELF },
584 { "kmap", 2, &long_opt, LONG_OPT_KMAP },
585 { "ignore-vmlinux", 0, &long_opt, LONG_OPT_IGNORE_VMLINUX },
586 { "ignore-dwarf", 0, &long_opt, LONG_OPT_IGNORE_DWARF },
587 { "skip-badvars", 0, &long_opt, LONG_OPT_SKIP_BADVARS },
588 { "vp", 1, &long_opt, LONG_OPT_VERBOSE_PASS },
589 { "unprivileged", 0, &long_opt, LONG_OPT_UNPRIVILEGED },
590 #define OWE5 "tter"
591 #define OWE1 "uild-"
592 #define OWE6 "fu-kb"
593 #define OWE2 "i-kno"
594 #define OWE4 "st"
595 #define OWE3 "w-be"
596 { OWE4 OWE6 OWE1 OWE2 OWE3 OWE5, 0, &long_opt, LONG_OPT_OMIT_WERROR },
597 { "client-options", 0, &long_opt, LONG_OPT_CLIENT_OPTIONS },
598 { "help", 0, &long_opt, LONG_OPT_HELP },
599 { "disable-cache", 0, &long_opt, LONG_OPT_DISABLE_CACHE },
600 { "poison-cache", 0, &long_opt, LONG_OPT_POISON_CACHE },
601 { "clean-cache", 0, &long_opt, LONG_OPT_CLEAN_CACHE },
602 { "compatible", 1, &long_opt, LONG_OPT_COMPATIBLE },
603 { "ldd", 0, &long_opt, LONG_OPT_LDD },
604 { "use-server", 2, &long_opt, LONG_OPT_USE_SERVER },
605 { "list-servers", 2, &long_opt, LONG_OPT_LIST_SERVERS },
606 { "trust-servers", 2, &long_opt, LONG_OPT_TRUST_SERVERS },
607 { "use-server-on-error", 2, &long_opt, LONG_OPT_USE_SERVER_ON_ERROR },
608 { "all-modules", 0, &long_opt, LONG_OPT_ALL_MODULES },
609 { "remote", 1, &long_opt, LONG_OPT_REMOTE },
610 { "remote-prefix", 0, &long_opt, LONG_OPT_REMOTE_PREFIX },
611 { "check-version", 0, &long_opt, LONG_OPT_CHECK_VERSION },
612 { "version", 0, &long_opt, LONG_OPT_VERSION },
613 { "tmpdir", 1, &long_opt, LONG_OPT_TMPDIR },
614 { "download-debuginfo", 2, &long_opt, LONG_OPT_DOWNLOAD_DEBUGINFO },
615 { "dump-probe-types", 0, &long_opt, LONG_OPT_DUMP_PROBE_TYPES },
616 { "privilege", 1, &long_opt, LONG_OPT_PRIVILEGE },
617 { NULL, 0, NULL, 0 }
618 };
619 int grc = getopt_long (argc, argv, "hVvtp:I:e:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:WG:",
620 long_options, NULL);
621 // NB: when adding new options, consider very carefully whether they
622 // should be restricted from stap clients (after --client-options)!
623
624 if (grc < 0)
625 break;
626 bool push_server_opt = false;
627 switch (grc)
628 {
629 case 'V':
630 push_server_opt = true;
631 version ();
632 exit (0);
633
634 case 'v':
635 push_server_opt = true;
636 for (unsigned i=0; i<5; i++)
637 perpass_verbose[i] ++;
638 verbose ++;
639 break;
640
641 case 'G':
642 // Make sure the global option is only composed of the
643 // following chars: [_=a-zA-Z0-9]
644 assert_regexp_match("-G parameter", optarg, "^[a-z_][a-z0-9_]*=[a-z0-9_-]+$");
645
646 globalopts.push_back (string(optarg));
647 break;
648
649 case 't':
650 push_server_opt = true;
651 timing = true;
652 break;
653
654 case 'w':
655 push_server_opt = true;
656 suppress_warnings = true;
657 break;
658
659 case 'W':
660 push_server_opt = true;
661 panic_warnings = true;
662 break;
663
664 case 'p':
665 last_pass = (int)strtoul(optarg, &num_endptr, 10);
666 if (*num_endptr != '\0' || last_pass < 1 || last_pass > 5)
667 {
668 cerr << _("Invalid pass number (should be 1-5).") << endl;
669 return 1;
670 }
671 if (listing_mode && last_pass != 2)
672 {
673 cerr << _("Listing (-l) mode implies pass 2.") << endl;
674 return 1;
675 }
676 push_server_opt = true;
677 break;
678
679 case 'I':
680 if (client_options)
681 client_options_disallowed += client_options_disallowed.empty () ? "-I" : ", -I";
682 if (include_arg_start == -1)
683 include_arg_start = include_path.size ();
684 include_path.push_back (string (optarg));
685 break;
686
687 case 'd':
688 push_server_opt = true;
689 {
690 // At runtime user module names are resolved through their
691 // canonical (absolute) path.
692 const char *mpath = canonicalize_file_name (optarg);
693 if (mpath == NULL) // Must be a kernel module name
694 mpath = optarg;
695 unwindsym_modules.insert (string (mpath));
696 // PR10228: trigger vma tracker logic early if -d /USER-MODULE/
697 // given. XXX This is actually too early. Having a user module
698 // is a good indicator that something will need vma tracking.
699 // But it is not 100%, this really should only trigger through
700 // a user mode tapset /* pragma:vma */ or a probe doing a
701 // variable lookup through a dynamic module.
702 if (mpath[0] == '/')
703 enable_vma_tracker (*this);
704 break;
705 }
706
707 case 'e':
708 if (have_script)
709 {
710 cerr << _("Only one script can be given on the command line.")
711 << endl;
712 return 1;
713 }
714 push_server_opt = true;
715 cmdline_script = string (optarg);
716 have_script = true;
717 break;
718
719 case 'o':
720 // NB: client_options not a problem, since pass 1-4 does not use output_file.
721 push_server_opt = true;
722 output_file = string (optarg);
723 break;
724
725 case 'R':
726 if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-R", "--client-options") << endl; return 1; }
727 runtime_specified = true;
728 runtime_path = string (optarg);
729 break;
730
731 case 'm':
732 if (client_options)
733 client_options_disallowed += client_options_disallowed.empty () ? "-m" : ", -m";
734 module_name = string (optarg);
735 save_module = true;
736 modname_given = true;
737 {
738 // If the module name ends with '.ko', chop it off since
739 // modutils doesn't like modules named 'foo.ko.ko'.
740 if (endswith(module_name, ".ko"))
741 {
742 module_name.erase(module_name.size() - 3);
743 cerr << _F("Truncating module name to '%s'", module_name.c_str()) << endl;
744 }
745
746 // Make sure an empty module name wasn't specified (-m "")
747 if (module_name.empty())
748 {
749 cerr << _("Module name cannot be empty.") << endl;
750 return 1;
751 }
752
753 // Make sure the module name is only composed of the
754 // following chars: [a-z0-9_]
755 assert_regexp_match("-m parameter", module_name, "^[a-z0-9_]+$");
756
757 // Make sure module name isn't too long.
758 if (module_name.size() >= (MODULE_NAME_LEN - 1))
759 {
760 module_name.resize(MODULE_NAME_LEN - 1);
761 cerr << _F("Truncating module name to '%s'", module_name.c_str()) << endl;
762 }
763 }
764
765 push_server_opt = true;
766 use_script_cache = false;
767 break;
768
769 case 'r':
770 if (client_options) // NB: no paths!
771 assert_regexp_match("-r parameter from client", optarg, "^[a-z0-9_.-]+$");
772 push_server_opt = true;
773 setup_kernel_release(optarg);
774 break;
775
776 case 'a':
777 assert_regexp_match("-a parameter", optarg, "^[a-z0-9_-]+$");
778 push_server_opt = true;
779 architecture = string(optarg);
780 break;
781
782 case 'k':
783 if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-k", "--client-options") << endl; return 1; }
784 keep_tmpdir = true;
785 use_script_cache = false; /* User wants to keep a usable build tree. */
786 break;
787
788 case 'g':
789 push_server_opt = true;
790 guru_mode = true;
791 break;
792
793 case 'P':
794 push_server_opt = true;
795 prologue_searching = true;
796 break;
797
798 case 'b':
799 push_server_opt = true;
800 bulk_mode = true;
801 break;
802
803 case 'u':
804 push_server_opt = true;
805 unoptimized = true;
806 break;
807
808 case 's':
809 buffer_size = (int) strtoul (optarg, &num_endptr, 10);
810 if (*num_endptr != '\0' || buffer_size < 1 || buffer_size > 4095)
811 {
812 cerr << _("Invalid buffer size (should be 1-4095).") << endl;
813 return 1;
814 }
815 push_server_opt = true;
816 break;
817
818 case 'c':
819 push_server_opt = true;
820 cmd = string (optarg);
821 if (cmd == "")
822 {
823 // This would mess with later code deciding to pass -c
824 // through to staprun
825 cerr << _("Empty CMD string invalid.") << endl;
826 return 1;
827 }
828 break;
829
830 case 'x':
831 target_pid = (int) strtoul(optarg, &num_endptr, 10);
832 if (*num_endptr != '\0')
833 {
834 cerr << _("Invalid target process ID number.") << endl;
835 return 1;
836 }
837 push_server_opt = true;
838 break;
839
840 case 'D':
841 assert_regexp_match ("-D parameter", optarg, "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$");
842 if (client_options)
843 client_options_disallowed += client_options_disallowed.empty () ? "-D" : ", -D";
844 push_server_opt = true;
845 macros.push_back (string (optarg));
846 break;
847
848 case 'S':
849 assert_regexp_match ("-S parameter", optarg, "^[0-9]+(,[0-9]+)?$");
850 push_server_opt = true;
851 size_option = string (optarg);
852 break;
853
854 case 'q':
855 if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-q", "--client-options") << endl; return 1; }
856 push_server_opt = true;
857 tapset_compile_coverage = true;
858 break;
859
860 case 'h':
861 usage (0);
862 break;
863
864 case 'L':
865 listing_mode_vars = true;
866 unoptimized = true; // This causes retention of variables for listing_mode
867 // fallthrough
868 case 'l':
869 suppress_warnings = true;
870 listing_mode = true;
871 last_pass = 2;
872 if (have_script)
873 {
874 cerr << _("Only one script can be given on the command line.")
875 << endl;
876 return 1;
877 }
878 push_server_opt = true;
879 cmdline_script = string("probe ") + string(optarg) + " {}";
880 have_script = true;
881 break;
882
883 case 'F':
884 push_server_opt = true;
885 load_only = true;
886 break;
887
888 case 'B':
889 if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-B", "--client-options") << endl; return 1; }
890 push_server_opt = true;
891 kbuildflags.push_back (string (optarg));
892 break;
893
894 case 0:
895 switch (long_opt)
896 {
897 case LONG_OPT_VERSION:
898 push_server_opt = true;
899 version ();
900 exit (0);
901 break;
902 case LONG_OPT_KELF:
903 push_server_opt = true;
904 consult_symtab = true;
905 break;
906 case LONG_OPT_KMAP:
907 // Leave consult_symtab unset for now, to ease error checking.
908 if (!kernel_symtab_path.empty())
909 {
910 cerr << _("You can't specify multiple --kmap options.") << endl;
911 return 1;
912 }
913 push_server_opt = true;
914 if (optarg)
915 kernel_symtab_path = optarg;
916 else
917 kernel_symtab_path = PATH_TBD;
918 break;
919 case LONG_OPT_IGNORE_VMLINUX:
920 push_server_opt = true;
921 ignore_vmlinux = true;
922 break;
923 case LONG_OPT_IGNORE_DWARF:
924 push_server_opt = true;
925 ignore_dwarf = true;
926 break;
927 case LONG_OPT_VERBOSE_PASS:
928 {
929 bool ok = true;
930 if (strlen(optarg) < 1 || strlen(optarg) > 5)
931 ok = false;
932 if (ok)
933 for (unsigned i=0; i<strlen(optarg); i++)
934 if (isdigit (optarg[i]))
935 perpass_verbose[i] += optarg[i]-'0';
936 else
937 ok = false;
938
939 if (! ok)
940 {
941 cerr << _("Invalid --vp argument: it takes 1 to 5 digits.") << endl;
942 return 1;
943 }
944 // NB: we don't do this: last_pass = strlen(optarg);
945 push_server_opt = true;
946 break;
947 }
948 case LONG_OPT_SKIP_BADVARS:
949 push_server_opt = true;
950 skip_badvars = true;
951 break;
952 case LONG_OPT_PRIVILEGE:
953 push_server_opt = true;
954 if (strcmp (optarg, "stapdev") == 0)
955 privilege = pr_stapdev;
956 else if (strcmp (optarg, "stapusr") == 0)
957 privilege = pr_stapusr;
958 else
959 {
960 cerr << _F("Invalid argument '%s' for --privilege.", optarg) << endl;
961 return 1;
962 }
963 /* NB: for server security, it is essential that once this flag is
964 set, no future flag be able to unset it. */
965 break;
966 case LONG_OPT_UNPRIVILEGED:
967 push_server_opt = true;
968 privilege = pr_stapusr;
969 /* NB: for server security, it is essential that once this flag is
970 set, no future flag be able to unset it. */
971 break;
972 case LONG_OPT_OMIT_WERROR:
973 push_server_opt = true;
974 omit_werror = true;
975 break;
976 case LONG_OPT_CLIENT_OPTIONS:
977 client_options = true;
978 break;
979 case LONG_OPT_TMPDIR:
980 if (client_options)
981 client_options_disallowed += client_options_disallowed.empty() ? "--tmpdir" : ", --tmpdir";
982 tmpdir_opt_set = true;
983 tmpdir = optarg;
984 break;
985 case LONG_OPT_DOWNLOAD_DEBUGINFO:
986 if(optarg)
987 {
988 if(strcmp(optarg, "no") == 0)
989 download_dbinfo = 0; //Disable feature
990 else if (strcmp(optarg, "yes") == 0)
991 download_dbinfo = INT_MAX; //Enable, No Timeout
992 /* NOTE: Timeout and Asking for Confirmation features below are not supported yet by abrt
993 * in version abrt-2.0.3-1.fc15.x86_64, Bugzilla: BZ730107 (timeout), BZ726192 ('-y') */
994 else if(atoi(optarg) > 0)
995 download_dbinfo = atoi(optarg); //Enable, Set timeout to optarg
996 else if (strcmp(optarg, "ask") == 0)
997 download_dbinfo = -1; //Enable, Ask for confirmation
998 else
999 {
1000 cerr << _F("ERROR: %s is not a valid value. Use 'yes', 'no', 'ask' or a timeout value.", optarg) << endl;
1001 return 1;
1002 }
1003 }
1004 else
1005 download_dbinfo = INT_MAX; //Enable, No Timeout
1006 break;
1007 case LONG_OPT_USE_SERVER:
1008 if (client_options)
1009 client_options_disallowed += client_options_disallowed.empty () ? "--use-server" : ", --use-server";
1010 if (optarg)
1011 specified_servers.push_back (optarg);
1012 else
1013 specified_servers.push_back ("");
1014 break;
1015 case LONG_OPT_USE_SERVER_ON_ERROR:
1016 if (client_options)
1017 client_options_disallowed += client_options_disallowed.empty () ? "--use-server-on-error" : ", --use-server-on-error";
1018 if (optarg)
1019 {
1020 string arg = optarg;
1021 for (unsigned i = 0; i < arg.size (); ++i)
1022 arg[i] = tolower (arg[i]);
1023 if (arg == "yes" || arg == "ye" || arg == "y")
1024 use_server_on_error = true;
1025 else if (arg == "no" || arg == "n")
1026 use_server_on_error = false;
1027 else
1028 cerr << _F("Invalid argument '%s' for --use-server-on-error.", optarg) << endl;
1029 }
1030 else
1031 use_server_on_error = true;
1032 break;
1033 case LONG_OPT_LIST_SERVERS:
1034 if (client_options)
1035 client_options_disallowed += client_options_disallowed.empty () ? "--list-servers" : ", --list-servers";
1036 if (optarg)
1037 server_status_strings.push_back (optarg);
1038 else
1039 server_status_strings.push_back ("");
1040 break;
1041 case LONG_OPT_TRUST_SERVERS:
1042 if (client_options)
1043 client_options_disallowed += client_options_disallowed.empty () ? "--trust-servers" : ", --trust-servers";
1044 if (optarg)
1045 server_trust_spec = optarg;
1046 else
1047 server_trust_spec = "ssl";
1048 break;
1049 case LONG_OPT_HELP:
1050 usage (0);
1051 break;
1052
1053 // The caching options should not be available to server clients
1054 case LONG_OPT_DISABLE_CACHE:
1055 if (client_options) {
1056 cerr << _F("ERROR: %s is invalid with %s", "--disable-cache", "--client-options") << endl;
1057 return 1;
1058 }
1059 use_cache = use_script_cache = false;
1060 break;
1061 case LONG_OPT_POISON_CACHE:
1062 if (client_options) {
1063 cerr << _F("ERROR: %s is invalid with %s", "--poison-cache", "--client-options") << endl;
1064 return 1;
1065 }
1066 poison_cache = true;
1067 break;
1068 case LONG_OPT_CLEAN_CACHE:
1069 if (client_options) {
1070 cerr << _F("ERROR: %s is invalid with %s", "--clean-cache", "--client-options") << endl;
1071 return 1;
1072 }
1073 clean_cache(*this);
1074 exit(0);
1075
1076 case LONG_OPT_COMPATIBLE:
1077 push_server_opt = true;
1078 compatible = optarg;
1079 break;
1080
1081 case LONG_OPT_LDD:
1082 if (client_options) {
1083 cerr << _F("ERROR: %s is invalid with %s", "--ldd", "--client-options") << endl;
1084 return 1;
1085 }
1086 push_server_opt = true;
1087 unwindsym_ldd = true;
1088 break;
1089
1090 case LONG_OPT_ALL_MODULES:
1091 if (client_options) {
1092 cerr << _F("ERROR: %s is invalid with %s", "--all-modules", "--client-options") << endl;
1093 return 1;
1094 }
1095 insert_loaded_modules();
1096 break;
1097
1098 case LONG_OPT_REMOTE:
1099 if (client_options) {
1100 cerr << _F("ERROR: %s is invalid with %s", "--remote", "--client-options") << endl;
1101 return 1;
1102 }
1103
1104 remote_uris.push_back(optarg);
1105 break;
1106
1107 case LONG_OPT_REMOTE_PREFIX:
1108 if (client_options) {
1109 cerr << _F("ERROR: %s is invalid with %s", "--remote-prefix", "--client-options") << endl;
1110 return 1;
1111 }
1112
1113 use_remote_prefix = true;
1114 break;
1115
1116 case LONG_OPT_CHECK_VERSION:
1117 push_server_opt = true;
1118 systemtap_v_check = true;
1119 break;
1120
1121 case LONG_OPT_DUMP_PROBE_TYPES:
1122 push_server_opt = true;
1123 dump_probe_types = true;
1124 break;
1125
1126 default:
1127 // NOTREACHED unless one added a getopt option but not a corresponding switch/case:
1128 cerr << _F("Unhandled long argument id %d", long_opt) << endl;
1129 return 1;
1130 }
1131 break;
1132
1133 case '?':
1134 // Invalid/unrecognized option given or argument required, but
1135 // not given. In both cases getopt_long() will have printed the
1136 // appropriate error message to stderr already.
1137 return 1;
1138 break;
1139
1140 default:
1141 // NOTREACHED unless one added a getopt option but not a corresponding switch/case:
1142 cerr << _F("Unhandled argument code %d", (char)grc) << endl;
1143 return 1;
1144 break;
1145 }
1146
1147 // Pass selected options on to the server, if any.
1148 if (push_server_opt)
1149 {
1150 if (grc == 0)
1151 server_args.push_back (string ("--") +
1152 long_options[long_opt - 1].name);
1153 else
1154 server_args.push_back (string ("-") + (char)grc);
1155 if (optarg)
1156 server_args.push_back (optarg);
1157 }
1158 }
1159
1160 return 0;
1161 }
1162
1163 void
1164 systemtap_session::check_options (int argc, char * const argv [])
1165 {
1166 for (int i = optind; i < argc; i++)
1167 {
1168 if (! have_script)
1169 {
1170 script_file = string (argv[i]);
1171 have_script = true;
1172 }
1173 else
1174 args.push_back (string (argv[i]));
1175 }
1176
1177 // need a user file
1178 // NB: this is also triggered if stap is invoked with no arguments at all
1179 if (! have_script)
1180 {
1181 // We don't need a script if --list-servers, --trust-servers or --dump-probe-types was
1182 // specified.
1183 if (server_status_strings.empty () && server_trust_spec.empty () && ! dump_probe_types)
1184 {
1185 cerr << _("A script must be specified.") << endl;
1186 usage(1);
1187 }
1188 }
1189
1190 #if ! HAVE_NSS
1191 if (client_options)
1192 cerr << _("WARNING: --client-options is not supported by this version of systemtap") << endl;
1193
1194 if (! server_trust_spec.empty ())
1195 {
1196 cerr << _("WARNING: --trust-servers is not supported by this version of systemtap") << endl;
1197 server_trust_spec.clear ();
1198 }
1199 #endif
1200
1201 if (runtime_specified && ! specified_servers.empty ())
1202 {
1203 cerr << _("Warning: Ignoring --use-server due to the use of -R") << endl;
1204 specified_servers.clear ();
1205 }
1206
1207 if (client_options && last_pass > 4)
1208 {
1209 last_pass = 4; /* Quietly downgrade. Server passed through -p5 naively. */
1210 }
1211 // If phase 5 has been requested and the user is a member of stapusr but not
1212 // stapdev, then add --unprivileged and --use-server to the invocation,
1213 // if not already specified.
1214 // XXX Eventually we could check remote hosts, but disable that case for now.
1215 if (last_pass > 4 && have_script && remote_uris.empty())
1216 {
1217 struct group *stgr = getgrnam ("stapusr");
1218 if (stgr && in_group_id (stgr->gr_gid))
1219 {
1220 stgr = getgrnam ("stapdev");
1221 if (! stgr || ! in_group_id (stgr->gr_gid))
1222 {
1223 automatic_server_mode = true;
1224 if (privilege != pr_stapusr)
1225 {
1226 if (perpass_verbose[0] > 1)
1227 cerr << _("Using --unprivileged for member of the group stapusr") << endl;
1228 privilege = pr_stapusr;
1229 server_args.push_back ("--unprivileged");
1230 }
1231 if (specified_servers.empty ())
1232 {
1233 if (perpass_verbose[0] > 1)
1234 cerr << _("Using --use-server for member of the group stapusr") << endl;
1235 specified_servers.push_back ("");
1236 }
1237 }
1238 }
1239 }
1240
1241 if (client_options && ! pr_contains (privilege, pr_stapdev) && ! client_options_disallowed.empty ())
1242 {
1243 cerr << _F("You can't specify %s when --privilege=%s is specified.",
1244 client_options_disallowed.c_str(),
1245 pr_name (privilege))
1246 << endl;
1247 usage (1);
1248 }
1249 if ((cmd != "") && (target_pid))
1250 {
1251 cerr << _F("You can't specify %s and %s together.", "-c", "-x") << endl;
1252 usage (1);
1253 }
1254 if (! pr_contains (privilege, pr_stapdev) && guru_mode)
1255 {
1256 cerr << _F("You can't specify %s and --privilege=%s together.", "-g", pr_name (privilege))
1257 << endl;
1258 usage (1);
1259 }
1260 if (!kernel_symtab_path.empty())
1261 {
1262 if (consult_symtab)
1263 {
1264 cerr << _F("You can't specify %s and %s together.", "--kelf", "--kmap") << endl;
1265 usage (1);
1266 }
1267 consult_symtab = true;
1268 if (kernel_symtab_path == PATH_TBD)
1269 kernel_symtab_path = string("/boot/System.map-") + kernel_release;
1270 }
1271 // Can't use --remote and --tmpdir together because with --remote,
1272 // there may be more than one tmpdir needed.
1273 if (!remote_uris.empty() && tmpdir_opt_set)
1274 {
1275 cerr << _F("You can't specify %s and %s together.", "--remote", "--tmpdir") << endl;
1276 usage(1);
1277 }
1278 // Warn in case the target kernel release doesn't match the running one.
1279 native_build = (release == kernel_release &&
1280 machine == architecture); // NB: squashed ARCH by PR4186 logic
1281
1282 if (last_pass > 4 && !native_build)
1283 {
1284 if(! suppress_warnings)
1285 cerr << _("WARNING: kernel release/architecture mismatch with host forces last-pass 4.") << endl;
1286 last_pass = 4;
1287 }
1288 if(download_dbinfo != 0 && access ("/usr/bin/abrt-action-install-debuginfo-to-abrt-cache", X_OK) < 0)
1289 {
1290 if(! suppress_warnings)
1291 cerr << _("WARNING: abrt-action-install-debuginfo-to-abrt-cache is not installed. Continuing without downloading debuginfo.") << endl;
1292 download_dbinfo = 0;
1293 }
1294
1295 // translate path of runtime to absolute path
1296 if (runtime_path[0] != '/')
1297 {
1298 char cwd[PATH_MAX];
1299 if (getcwd(cwd, sizeof(cwd)))
1300 {
1301 runtime_path = string(cwd) + "/" + runtime_path;
1302 }
1303 }
1304
1305 // Abnormal characters in our temp path can break us, including parts out
1306 // of our control like Kbuild. Let's enforce nice, safe characters only.
1307 const char *tmpdir = getenv("TMPDIR");
1308 if (tmpdir != NULL)
1309 assert_regexp_match("TMPDIR", tmpdir, "^[-/._0-9a-z]+$");
1310 }
1311
1312
1313 void
1314 systemtap_session::init_try_server ()
1315 {
1316 #if HAVE_NSS
1317 // If the option is disabled or we are a server or we are already using a
1318 // server, then never retry compilation using a server.
1319 if (! use_server_on_error || client_options || ! specified_servers.empty ())
1320 try_server_status = dont_try_server;
1321 else
1322 try_server_status = try_server_unset;
1323 #else
1324 // No client, so don't bother.
1325 try_server_status = dont_try_server;
1326 #endif
1327 }
1328
1329 void
1330 systemtap_session::set_try_server (int t)
1331 {
1332 if (try_server_status != dont_try_server)
1333 try_server_status = t;
1334 }
1335
1336
1337 void systemtap_session::insert_loaded_modules()
1338 {
1339 char line[1024];
1340 ifstream procmods ("/proc/modules");
1341 while (procmods.good()) {
1342 procmods.getline (line, sizeof(line));
1343 strtok(line, " \t");
1344 if (line[0] == '\0')
1345 break; // maybe print a warning?
1346 unwindsym_modules.insert (string (line));
1347 }
1348 procmods.close();
1349 unwindsym_modules.insert ("kernel");
1350 }
1351
1352 void
1353 systemtap_session::setup_kernel_release (const char* kstr)
1354 {
1355 // Sometimes we may get dupes here... e.g. a server may have a full
1356 // -r /path/to/kernel followed by a client's -r kernel.
1357 if (kernel_release == kstr)
1358 return; // nothing new here...
1359
1360 kernel_release = kernel_build_tree = kernel_source_tree = "";
1361 if (kstr[0] == '/') // fully specified path
1362 {
1363 kernel_build_tree = kstr;
1364 kernel_release = kernel_release_from_build_tree (kernel_build_tree, verbose);
1365
1366 // PR10745
1367 // Maybe it's a full kernel source tree, for purposes of PR10745.
1368 // In case CONFIG_DEBUG_INFO was set, we'd find it anyway with the
1369 // normal search in tapsets.cxx. Without CONFIG_DEBUG_INFO, we'd
1370 // need heuristics such as this one:
1371
1372 string some_random_source_only_file = kernel_build_tree + "/COPYING";
1373 ifstream epic (some_random_source_only_file.c_str());
1374 if (! epic.fail())
1375 {
1376 kernel_source_tree = kernel_build_tree;
1377 if (verbose > 2)
1378 clog << _F("Located kernel source tree (COPYING) at '%s'", kernel_source_tree.c_str()) << endl;
1379 }
1380 }
1381 else
1382 {
1383 kernel_release = string (kstr);
1384 if (!kernel_release.empty())
1385 kernel_build_tree = "/lib/modules/" + kernel_release + "/build";
1386
1387 // PR10745
1388 // Let's not look for the kernel_source_tree; it's definitely
1389 // not THERE. tapsets.cxx might try to find it later if tracepoints
1390 // need it.
1391 }
1392 }
1393
1394
1395 // Register all the aliases we've seen in library files, and the user
1396 // file, as patterns.
1397 void
1398 systemtap_session::register_library_aliases()
1399 {
1400 vector<stapfile*> files(library_files);
1401 files.push_back(user_file);
1402
1403 for (unsigned f = 0; f < files.size(); ++f)
1404 {
1405 stapfile * file = files[f];
1406 for (unsigned a = 0; a < file->aliases.size(); ++a)
1407 {
1408 probe_alias * alias = file->aliases[a];
1409 try
1410 {
1411 for (unsigned n = 0; n < alias->alias_names.size(); ++n)
1412 {
1413 probe_point * name = alias->alias_names[n];
1414 match_node * mn = pattern_root;
1415 for (unsigned c = 0; c < name->components.size(); ++c)
1416 {
1417 probe_point::component * comp = name->components[c];
1418 // XXX: alias parameters
1419 if (comp->arg)
1420 throw semantic_error(_F("alias component %s contains illegal parameter",
1421 comp->functor.c_str()));
1422 mn = mn->bind(comp->functor);
1423 }
1424 // PR 12916: All probe aliases are OK for all users. The actual
1425 // referenced probe points will be checked when the alias is resolved.
1426 mn->bind_privilege (pr_all);
1427 mn->bind(new alias_expansion_builder(alias));
1428 }
1429 }
1430 catch (const semantic_error& e)
1431 {
1432 semantic_error* er = new semantic_error (e); // copy it
1433 stringstream msg;
1434 msg << e.msg2;
1435 msg << _(" while registering probe alias ");
1436 alias->printsig(msg);
1437 er->msg2 = msg.str();
1438 print_error (* er);
1439 delete er;
1440 }
1441 }
1442 }
1443 }
1444
1445
1446 // Print this given token, but abbreviate it if the last one had the
1447 // same file name.
1448 void
1449 systemtap_session::print_token (ostream& o, const token* tok)
1450 {
1451 assert (tok);
1452
1453 if (last_token && last_token->location.file == tok->location.file)
1454 {
1455 stringstream tmpo;
1456 tmpo << *tok;
1457 string ts = tmpo.str();
1458 // search & replace the file name with nothing
1459 size_t idx = ts.find (tok->location.file->name);
1460 if (idx != string::npos)
1461 ts.replace (idx, tok->location.file->name.size(), "");
1462
1463 o << ts;
1464 }
1465 else
1466 o << *tok;
1467
1468 last_token = tok;
1469 }
1470
1471
1472
1473 void
1474 systemtap_session::print_error (const semantic_error& e)
1475 {
1476 string message_str[2];
1477 string align_semantic_error (" ");
1478
1479 // We generate two messages. The second one ([1]) is printed
1480 // without token compression, for purposes of duplicate elimination.
1481 // This way, the same message that may be generated once with a
1482 // compressed and once with an uncompressed token still only gets
1483 // printed once.
1484 for (int i=0; i<2; i++)
1485 {
1486 stringstream message;
1487
1488 message << _F("semantic error: %s", e.what ());
1489 if (e.tok1 || e.tok2)
1490 message << ": ";
1491 if (e.tok1)
1492 {
1493 if (i == 0) print_token (message, e.tok1);
1494 else message << *e.tok1;
1495 }
1496 message << e.msg2;
1497 if (e.tok2)
1498 {
1499 if (i == 0) print_token (message, e.tok2);
1500 else message << *e.tok2;
1501 }
1502 message << endl;
1503 message_str[i] = message.str();
1504 }
1505
1506 // Duplicate elimination
1507 if (seen_errors.find (message_str[1]) == seen_errors.end())
1508 {
1509 seen_errors.insert (message_str[1]);
1510 cerr << message_str[0];
1511
1512 if (e.tok1)
1513 print_error_source (cerr, align_semantic_error, e.tok1);
1514
1515 if (e.tok2)
1516 print_error_source (cerr, align_semantic_error, e.tok2);
1517 }
1518
1519 if (e.chain)
1520 print_error (* e.chain);
1521 }
1522
1523 void
1524 systemtap_session::print_error_source (std::ostream& message,
1525 std::string& align, const token* tok)
1526 {
1527 unsigned i = 0;
1528
1529 assert (tok);
1530 if (!tok->location.file)
1531 //No source to print, silently exit
1532 return;
1533
1534 unsigned line = tok->location.line;
1535 unsigned col = tok->location.column;
1536 const string &file_contents = tok->location.file->file_contents;
1537
1538 size_t start_pos = 0, end_pos = 0;
1539 //Navigate to the appropriate line
1540 while (i != line && end_pos != std::string::npos)
1541 {
1542 start_pos = end_pos;
1543 end_pos = file_contents.find ('\n', start_pos) + 1;
1544 i++;
1545 }
1546 //TRANSLATORS: Here were are printing the source string of the error
1547 message << align << _("source: ") << file_contents.substr (start_pos, end_pos-start_pos-1) << endl;
1548 message << align << " ";
1549 //Navigate to the appropriate column
1550 for (i=start_pos; i<start_pos+col-1; i++)
1551 {
1552 if(isspace(file_contents[i]))
1553 message << file_contents[i];
1554 else
1555 message << ' ';
1556 }
1557 message << "^" << endl;
1558 }
1559
1560 void
1561 systemtap_session::print_warning (const string& message_str, const token* tok)
1562 {
1563 // Duplicate elimination
1564 string align_warning (" ");
1565 if (seen_warnings.find (message_str) == seen_warnings.end())
1566 {
1567 seen_warnings.insert (message_str);
1568 clog << _("WARNING: ") << message_str;
1569 if (tok) { clog << ": "; print_token (clog, tok); }
1570 clog << endl;
1571 if (tok) { print_error_source (clog, align_warning, tok); }
1572 }
1573 }
1574
1575
1576 translator_output* systemtap_session::op_create_auxiliary()
1577 {
1578 static int counter = 0;
1579 string tmpname = this->tmpdir + "/" + this->module_name + "_aux_" + lex_cast(counter++) + ".c";
1580 translator_output* n = new translator_output (tmpname);
1581 auxiliary_outputs.push_back (n);
1582 return n;
1583 }
1584
1585
1586
1587 // --------------------------------------------------------------------------
1588
1589 /*
1590 Perngrq sebz fzvyrlgnc.fit, rkcbegrq gb n 1484k1110 fzvyrlgnc.cat,
1591 gurapr catgbcnz | cazfpnyr -jvqgu 160 |
1592 cczqvgure -qvz 4 -erq 2 -terra 2 -oyhr 2 | cczgbnafv -2k4 | bq -i -j19 -g k1 |
1593 phg -s2- -q' ' | frq -r 'f,^,\\k,' -r 'f, ,\\k,t' -r 'f,^,",' -r 'f,$,",'
1594 */
1595 const char*
1596 systemtap_session::morehelp =
1597 "\x1b\x5b\x30\x6d\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1598 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1599 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1600 "\x20\x20\x20\x60\x20\x20\x2e\x60\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1601 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20"
1602 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1603 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1604 "\x20\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x1b\x5b"
1605 "\x33\x33\x6d\x20\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1606 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1607 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1608 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x1b\x5b\x33\x33\x6d\x20\x60"
1609 "\x2e\x60\x1b\x5b\x33\x37\x6d\x20\x3a\x2c\x3a\x2e\x60\x20\x60\x20\x60\x20\x60"
1610 "\x2c\x3b\x2c\x3a\x20\x1b\x5b\x33\x33\x6d\x60\x2e\x60\x20\x1b\x5b\x33\x37\x6d"
1611 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20"
1612 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1613 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x1b\x5b\x33"
1614 "\x33\x6d\x20\x60\x20\x60\x20\x3a\x27\x60\x1b\x5b\x33\x37\x6d\x20\x60\x60\x60"
1615 "\x20\x20\x20\x60\x20\x60\x60\x60\x20\x1b\x5b\x33\x33\x6d\x60\x3a\x60\x20\x60"
1616 "\x20\x60\x20\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1617 "\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1618 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1619 "\x20\x2e\x1b\x5b\x33\x33\x6d\x60\x2e\x60\x20\x60\x20\x60\x20\x20\x1b\x5b\x33"
1620 "\x37\x6d\x20\x3a\x20\x20\x20\x60\x20\x20\x20\x60\x20\x20\x2e\x1b\x5b\x33\x33"
1621 "\x6d\x60\x20\x60\x2e\x60\x20\x60\x2e\x60\x20\x1b\x5b\x33\x37\x6d\x20\x20\x20"
1622 "\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x2e\x3a\x20\x20"
1623 "\x20\x20\x20\x20\x20\x20\x2e\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1624 "\x20\x20\x2e\x76\x53\x1b\x5b\x33\x34\x6d\x53\x1b\x5b\x33\x37\x6d\x53\x1b\x5b"
1625 "\x33\x31\x6d\x2b\x1b\x5b\x33\x33\x6d\x60\x20\x60\x20\x60\x20\x20\x20\x20\x1b"
1626 "\x5b\x33\x31\x6d\x3f\x1b\x5b\x33\x30\x6d\x53\x1b\x5b\x33\x33\x6d\x2b\x1b\x5b"
1627 "\x33\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x2e\x1b\x5b\x33\x30\x6d\x24\x1b\x5b"
1628 "\x33\x37\x6d\x3b\x1b\x5b\x33\x31\x6d\x7c\x1b\x5b\x33\x33\x6d\x20\x60\x20\x60"
1629 "\x20\x60\x20\x60\x1b\x5b\x33\x31\x6d\x2c\x1b\x5b\x33\x32\x6d\x53\x1b\x5b\x33"
1630 "\x37\x6d\x53\x53\x3e\x2c\x2e\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x2e"
1631 "\x3b\x27\x20\x20\x20\x20\x20\x20\x20\x20\x20\x60\x3c\x20\x20\x20\x20\x20\x20"
1632 "\x20\x20\x20\x2e\x2e\x3a\x1b\x5b\x33\x30\x6d\x26\x46\x46\x46\x48\x46\x1b\x5b"
1633 "\x33\x33\x6d\x60\x2e\x60\x20\x60\x20\x60\x20\x60\x1b\x5b\x33\x30\x6d\x4d\x4d"
1634 "\x46\x1b\x5b\x33\x33\x6d\x20\x20\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x1b\x5b"
1635 "\x33\x33\x6d\x20\x3a\x1b\x5b\x33\x30\x6d\x4d\x4d\x46\x1b\x5b\x33\x33\x6d\x20"
1636 "\x20\x20\x60\x20\x60\x2e\x60\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x30\x6d\x46"
1637 "\x46\x46\x24\x53\x46\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x20\x0a\x20\x20\x20"
1638 "\x20\x2e\x3c\x3a\x60\x20\x20\x20\x20\x2e\x3a\x2e\x3a\x2e\x2e\x3b\x27\x20\x20"
1639 "\x20\x20\x20\x20\x2e\x60\x2e\x3a\x60\x60\x3c\x27\x1b\x5b\x33\x31\x6d\x3c\x27"
1640 "\x1b\x5b\x33\x33\x6d\x20\x60\x20\x60\x20\x60\x20\x20\x20\x60\x3c\x1b\x5b\x33"
1641 "\x30\x6d\x26\x1b\x5b\x33\x31\x6d\x3f\x1b\x5b\x33\x33\x6d\x20\x1b\x5b\x33\x37"
1642 "\x6d\x20\x1b\x5b\x33\x33\x6d\x20\x20\x20\x20\x20\x1b\x5b\x33\x37\x6d\x60\x1b"
1643 "\x5b\x33\x30\x6d\x2a\x46\x1b\x5b\x33\x37\x6d\x27\x1b\x5b\x33\x33\x6d\x20\x60"
1644 "\x20\x60\x20\x60\x20\x60\x20\x1b\x5b\x33\x31\x6d\x60\x3a\x1b\x5b\x33\x37\x6d"
1645 "\x27\x3c\x1b\x5b\x33\x30\x6d\x23\x1b\x5b\x33\x37\x6d\x3c\x60\x3a\x20\x20\x20"
1646 "\x0a\x20\x20\x20\x20\x3a\x60\x3a\x60\x20\x20\x20\x60\x3a\x2e\x2e\x2e\x2e\x3c"
1647 "\x3c\x20\x20\x20\x20\x20\x20\x3a\x2e\x60\x3a\x60\x20\x20\x20\x60\x1b\x5b\x33"
1648 "\x33\x6d\x3a\x1b\x5b\x33\x31\x6d\x60\x1b\x5b\x33\x33\x6d\x20\x60\x2e\x60\x20"
1649 "\x60\x20\x60\x20\x60\x20\x60\x1b\x5b\x33\x37\x6d\x20\x20\x1b\x5b\x33\x33\x6d"
1650 "\x20\x60\x20\x20\x20\x60\x1b\x5b\x33\x37\x6d\x20\x60\x20\x60\x1b\x5b\x33\x33"
1651 "\x6d\x20\x60\x2e\x60\x20\x60\x2e\x60\x20\x60\x3a\x1b\x5b\x33\x37\x6d\x20\x20"
1652 "\x20\x60\x3a\x2e\x60\x2e\x20\x0a\x20\x20\x20\x60\x3a\x60\x3a\x60\x20\x20\x20"
1653 "\x20\x20\x60\x60\x60\x60\x20\x3a\x2d\x20\x20\x20\x20\x20\x60\x20\x60\x20\x20"
1654 "\x20\x20\x20\x60\x1b\x5b\x33\x33\x6d\x3a\x60\x2e\x60\x20\x60\x20\x60\x20\x60"
1655 "\x20\x60\x20\x20\x2e\x3b\x1b\x5b\x33\x31\x6d\x76\x1b\x5b\x33\x30\x6d\x24\x24"
1656 "\x24\x1b\x5b\x33\x31\x6d\x2b\x53\x1b\x5b\x33\x33\x6d\x2c\x60\x20\x60\x20\x60"
1657 "\x20\x60\x20\x60\x20\x60\x2e\x1b\x5b\x33\x31\x6d\x60\x1b\x5b\x33\x33\x6d\x3a"
1658 "\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x60\x2e\x60\x20\x20\x0a\x20\x20\x20\x60"
1659 "\x3a\x3a\x3a\x3a\x20\x20\x20\x20\x3a\x60\x60\x60\x60\x3a\x53\x20\x20\x20\x20"
1660 "\x20\x20\x3a\x2e\x60\x2e\x20\x20\x20\x20\x20\x1b\x5b\x33\x33\x6d\x3a\x1b\x5b"
1661 "\x33\x31\x6d\x3a\x1b\x5b\x33\x33\x6d\x2e\x60\x2e\x60\x20\x60\x2e\x60\x20\x60"
1662 "\x20\x3a\x1b\x5b\x33\x30\x6d\x24\x46\x46\x48\x46\x46\x46\x46\x46\x1b\x5b\x33"
1663 "\x31\x6d\x53\x1b\x5b\x33\x33\x6d\x2e\x60\x20\x60\x2e\x60\x20\x60\x2e\x60\x2e"
1664 "\x1b\x5b\x33\x31\x6d\x3a\x1b\x5b\x33\x33\x6d\x3a\x1b\x5b\x33\x37\x6d\x20\x20"
1665 "\x20\x2e\x60\x2e\x3a\x20\x20\x0a\x20\x20\x20\x60\x3a\x3a\x3a\x60\x20\x20\x20"
1666 "\x60\x3a\x20\x2e\x20\x3b\x27\x3a\x20\x20\x20\x20\x20\x20\x3a\x2e\x60\x3a\x20"
1667 "\x20\x20\x20\x20\x3a\x1b\x5b\x33\x33\x6d\x3c\x3a\x1b\x5b\x33\x31\x6d\x60\x1b"
1668 "\x5b\x33\x33\x6d\x2e\x60\x20\x60\x20\x60\x20\x60\x2e\x1b\x5b\x33\x30\x6d\x53"
1669 "\x46\x46\x46\x53\x46\x46\x46\x53\x46\x46\x1b\x5b\x33\x33\x6d\x20\x60\x20\x60"
1670 "\x20\x60\x2e\x60\x2e\x60\x3a\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x37\x6d\x20"
1671 "\x20\x20\x20\x3a\x60\x3a\x60\x20\x20\x0a\x20\x20\x20\x20\x60\x3c\x3b\x3c\x20"
1672 "\x20\x20\x20\x20\x60\x60\x60\x20\x3a\x3a\x20\x20\x20\x20\x20\x20\x20\x3a\x3a"
1673 "\x2e\x60\x20\x20\x20\x20\x20\x3a\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31\x6d"
1674 "\x3c\x3a\x60\x1b\x5b\x33\x33\x6d\x2e\x60\x2e\x60\x20\x60\x3a\x1b\x5b\x33\x30"
1675 "\x6d\x53\x46\x53\x46\x46\x46\x53\x46\x46\x46\x53\x1b\x5b\x33\x33\x6d\x2e\x60"
1676 "\x20\x60\x2e\x60\x2e\x60\x3a\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x33\x6d\x3b"
1677 "\x1b\x5b\x33\x37\x6d\x27\x20\x20\x20\x60\x3a\x3a\x60\x20\x20\x20\x0a\x20\x20"
1678 "\x20\x20\x20\x60\x3b\x3c\x20\x20\x20\x20\x20\x20\x20\x3a\x3b\x60\x20\x20\x20"
1679 "\x20\x20\x20\x20\x20\x20\x60\x3a\x60\x2e\x20\x20\x20\x20\x20\x3a\x1b\x5b\x33"
1680 "\x33\x6d\x3c\x3b\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x33\x6d\x3a\x1b\x5b\x33"
1681 "\x31\x6d\x3a\x1b\x5b\x33\x33\x6d\x2e\x60\x2e\x60\x20\x1b\x5b\x33\x31\x6d\x3a"
1682 "\x1b\x5b\x33\x30\x6d\x46\x53\x46\x53\x46\x53\x46\x53\x46\x1b\x5b\x33\x31\x6d"
1683 "\x3f\x1b\x5b\x33\x33\x6d\x20\x60\x2e\x60\x2e\x3a\x3a\x1b\x5b\x33\x31\x6d\x3c"
1684 "\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x37\x6d\x60\x20"
1685 "\x20\x20\x3a\x3a\x3a\x60\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x53\x3c"
1686 "\x20\x20\x20\x20\x20\x20\x3a\x53\x3a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1687 "\x20\x60\x3a\x3a\x60\x2e\x20\x20\x20\x20\x60\x3a\x1b\x5b\x33\x31\x6d\x3c\x1b"
1688 "\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31\x6d\x3c\x3b\x3c\x1b\x5b\x33\x33\x6d\x3a"
1689 "\x60\x2e\x60\x3c\x1b\x5b\x33\x30\x6d\x53\x46\x53\x24\x53\x46\x53\x24\x1b\x5b"
1690 "\x33\x33\x6d\x60\x3a\x1b\x5b\x33\x31\x6d\x3a\x1b\x5b\x33\x33\x6d\x3a\x1b\x5b"
1691 "\x33\x31\x6d\x3a\x3b\x3c\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31\x6d\x3c\x1b"
1692 "\x5b\x33\x33\x6d\x3a\x1b\x5b\x33\x37\x6d\x60\x20\x20\x2e\x60\x3a\x3a\x60\x20"
1693 "\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x3b\x3c\x2e\x2e\x2c\x2e\x2e\x20"
1694 "\x3a\x3c\x3b\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x60\x3a\x3a\x3a"
1695 "\x60\x20\x20\x20\x20\x20\x60\x3a\x1b\x5b\x33\x33\x6d\x3c\x3b\x1b\x5b\x33\x31"
1696 "\x6d\x3c\x3b\x3c\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33"
1697 "\x33\x6d\x3b\x1b\x5b\x33\x31\x6d\x3c\x3c\x1b\x5b\x33\x30\x6d\x53\x24\x53\x1b"
1698 "\x5b\x33\x31\x6d\x53\x1b\x5b\x33\x37\x6d\x27\x1b\x5b\x33\x33\x6d\x2e\x3a\x3b"
1699 "\x1b\x5b\x33\x31\x6d\x3c\x3b\x3c\x1b\x5b\x33\x33\x6d\x3a\x1b\x5b\x33\x31\x6d"
1700 "\x3c\x1b\x5b\x33\x33\x6d\x3a\x1b\x5b\x33\x37\x6d\x60\x20\x20\x20\x60\x2e\x3a"
1701 "\x3a\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x2e\x3a\x3a\x3c\x53\x3c\x3a\x60"
1702 "\x3a\x3a\x3a\x3a\x53\x1b\x5b\x33\x32\x6d\x53\x1b\x5b\x33\x37\x6d\x3b\x27\x3a"
1703 "\x3c\x2c\x2e\x20\x20\x20\x20\x20\x20\x20\x20\x20\x60\x3a\x3a\x3a\x3a\x2e\x60"
1704 "\x2e\x60\x2e\x60\x3a\x1b\x5b\x33\x33\x6d\x3c\x3a\x1b\x5b\x33\x31\x6d\x3c\x1b"
1705 "\x5b\x33\x33\x6d\x53\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b"
1706 "\x33\x31\x6d\x3c\x2c\x1b\x5b\x33\x33\x6d\x3c\x3b\x3a\x1b\x5b\x33\x31\x6d\x2c"
1707 "\x1b\x5b\x33\x33\x6d\x3c\x3b\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x33\x6d\x53"
1708 "\x1b\x5b\x33\x31\x6d\x3c\x1b\x5b\x33\x33\x6d\x3b\x3c\x1b\x5b\x33\x37\x6d\x3a"
1709 "\x60\x2e\x60\x2e\x3b\x1b\x5b\x33\x34\x6d\x53\x1b\x5b\x33\x37\x6d\x53\x3f\x27"
1710 "\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x2e\x60\x3a\x60\x3a\x3c\x53\x53\x3b\x3c"
1711 "\x3a\x60\x3a\x3a\x53\x53\x53\x3c\x3a\x60\x3a\x1b\x5b\x33\x30\x6d\x53\x1b\x5b"
1712 "\x33\x37\x6d\x2b\x20\x20\x20\x20\x20\x20\x60\x20\x20\x20\x3a\x1b\x5b\x33\x34"
1713 "\x6d\x53\x1b\x5b\x33\x30\x6d\x53\x46\x24\x1b\x5b\x33\x37\x6d\x2c\x60\x3a\x3a"
1714 "\x3a\x3c\x3a\x3c\x1b\x5b\x33\x33\x6d\x53\x1b\x5b\x33\x37\x6d\x3c\x1b\x5b\x33"
1715 "\x33\x6d\x53\x1b\x5b\x33\x31\x6d\x53\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31"
1716 "\x6d\x53\x3b\x53\x1b\x5b\x33\x33\x6d\x3b\x1b\x5b\x33\x31\x6d\x53\x1b\x5b\x33"
1717 "\x33\x6d\x53\x1b\x5b\x33\x37\x6d\x3c\x1b\x5b\x33\x33\x6d\x53\x1b\x5b\x33\x37"
1718 "\x6d\x3c\x53\x3c\x3a\x3a\x3a\x3a\x3f\x1b\x5b\x33\x30\x6d\x53\x24\x48\x1b\x5b"
1719 "\x33\x37\x6d\x27\x60\x20\x60\x20\x20\x20\x20\x20\x20\x0a\x2e\x60\x3a\x60\x2e"
1720 "\x60\x3a\x60\x2e\x60\x3a\x60\x2e\x60\x3a\x60\x2e\x60\x3a\x60\x2e\x1b\x5b\x33"
1721 "\x30\x6d\x53\x46\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x60\x20\x20\x20\x60\x20"
1722 "\x60\x3a\x1b\x5b\x33\x30\x6d\x3c\x46\x46\x46\x1b\x5b\x33\x37\x6d\x3f\x2e\x60"
1723 "\x3a\x60\x3a\x60\x3a\x60\x3a\x60\x3a\x3c\x3a\x60\x3a\x27\x3a\x60\x3a\x60\x3a"
1724 "\x60\x3a\x60\x3b\x1b\x5b\x33\x30\x6d\x53\x46\x48\x46\x1b\x5b\x33\x37\x6d\x27"
1725 "\x20\x60\x20\x60\x20\x60\x20\x20\x20\x20\x0a\x20\x3c\x3b\x3a\x2e\x60\x20\x60"
1726 "\x2e\x60\x20\x60\x2e\x60\x20\x60\x2e\x60\x2c\x53\x1b\x5b\x33\x32\x6d\x53\x1b"
1727 "\x5b\x33\x30\x6d\x53\x1b\x5b\x33\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1728 "\x20\x20\x60\x20\x60\x3c\x1b\x5b\x33\x30\x6d\x46\x46\x46\x1b\x5b\x33\x34\x6d"
1729 "\x2b\x1b\x5b\x33\x37\x6d\x3a\x20\x60\x20\x60\x20\x60\x2e\x60\x20\x60\x2e\x60"
1730 "\x20\x60\x2e\x60\x20\x60\x20\x60\x2c\x1b\x5b\x33\x30\x6d\x24\x46\x48\x46\x1b"
1731 "\x5b\x33\x37\x6d\x27\x20\x60\x20\x20\x20\x60\x20\x20\x20\x20\x20\x20\x0a\x20"
1732 "\x60\x3a\x1b\x5b\x33\x30\x6d\x53\x24\x1b\x5b\x33\x37\x6d\x53\x53\x53\x3b\x3c"
1733 "\x2c\x60\x2c\x3b\x3b\x53\x3f\x53\x1b\x5b\x33\x30\x6d\x24\x46\x3c\x1b\x5b\x33"
1734 "\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x60\x20\x60"
1735 "\x3c\x1b\x5b\x33\x30\x6d\x48\x46\x46\x46\x1b\x5b\x33\x37\x6d\x3f\x2e\x60\x20"
1736 "\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x3b\x76\x1b\x5b\x33\x30\x6d"
1737 "\x48\x46\x48\x46\x1b\x5b\x33\x37\x6d\x27\x20\x60\x20\x20\x20\x60\x20\x20\x20"
1738 "\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x60\x3c\x1b\x5b\x33\x30\x6d\x46\x24\x1b"
1739 "\x5b\x33\x37\x6d\x53\x53\x53\x53\x53\x53\x1b\x5b\x33\x30\x6d\x53\x24\x53\x46"
1740 "\x46\x46\x1b\x5b\x33\x37\x6d\x27\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1741 "\x20\x20\x20\x20\x20\x20\x20\x20\x60\x3c\x1b\x5b\x33\x30\x6d\x23\x46\x46\x46"
1742 "\x24\x1b\x5b\x33\x37\x6d\x76\x2c\x2c\x20\x2e\x20\x2e\x20\x2c\x2c\x76\x1b\x5b"
1743 "\x33\x30\x6d\x26\x24\x46\x46\x48\x3c\x1b\x5b\x33\x37\x6d\x27\x20\x20\x20\x20"
1744 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x60"
1745 "\x3c\x1b\x5b\x33\x30\x6d\x53\x46\x46\x24\x46\x24\x46\x46\x48\x46\x53\x1b\x5b"
1746 "\x33\x37\x6d\x20\x20\x20\x20\x20\x20\x20\x20\x2e\x60\x20\x60\x2e\x60\x2e\x60"
1747 "\x2e\x60\x2e\x60\x3a\x3a\x3a\x3a\x3a\x1b\x5b\x33\x30\x6d\x2a\x46\x46\x46\x48"
1748 "\x46\x48\x46\x48\x46\x46\x46\x48\x46\x48\x46\x48\x1b\x5b\x33\x37\x6d\x3c\x22"
1749 "\x2e\x60\x2e\x60\x2e\x60\x2e\x60\x2e\x60\x20\x20\x20\x20\x20\x20\x20\x20\x0a"
1750 "\x20\x20\x20\x20\x20\x20\x20\x60\x3a\x1b\x5b\x33\x30\x6d\x48\x46\x46\x46\x48"
1751 "\x46\x46\x46\x1b\x5b\x33\x37\x6d\x27\x20\x20\x20\x60\x20\x60\x2e\x60\x20\x60"
1752 "\x2e\x60\x2e\x60\x3a\x60\x3a\x60\x3a\x60\x3a\x60\x3a\x3a\x3a\x60\x3a\x3c\x3c"
1753 "\x1b\x5b\x33\x30\x6d\x3c\x46\x48\x46\x46\x46\x48\x46\x46\x46\x1b\x5b\x33\x37"
1754 "\x6d\x27\x3a\x60\x3a\x60\x3a\x60\x3a\x60\x2e\x60\x2e\x60\x20\x60\x2e\x60\x20"
1755 "\x60\x20\x60\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x60\x22\x1b\x5b"
1756 "\x33\x30\x6d\x2a\x46\x48\x46\x1b\x5b\x33\x37\x6d\x3f\x20\x20\x20\x60\x20\x60"
1757 "\x2e\x60\x20\x60\x2e\x60\x2e\x60\x3a\x60\x2e\x60\x3a\x60\x3a\x60\x3a\x60\x3a"
1758 "\x60\x3a\x60\x3a\x60\x3a\x60\x3a\x1b\x5b\x33\x30\x6d\x46\x46\x48\x46\x48\x46"
1759 "\x1b\x5b\x33\x37\x6d\x27\x3a\x60\x3a\x60\x3a\x60\x3a\x60\x2e\x60\x3a\x60\x2e"
1760 "\x60\x2e\x60\x20\x60\x2e\x60\x20\x60\x20\x60\x0a\x20\x20\x20\x20\x20\x20\x20"
1761 "\x20\x20\x20\x20\x60\x3c\x1b\x5b\x33\x30\x6d\x48\x46\x46\x1b\x5b\x33\x37\x6d"
1762 "\x2b\x60\x20\x20\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x2e\x60\x20"
1763 "\x60\x2e\x60\x20\x60\x2e\x60\x20\x60\x3a\x60\x2e\x60\x3b\x1b\x5b\x33\x30\x6d"
1764 "\x48\x46\x46\x46\x1b\x5b\x33\x37\x6d\x27\x2e\x60\x2e\x60\x20\x60\x2e\x60\x20"
1765 "\x60\x2e\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x20\x20\x60\x20\x20\x0a\x20"
1766 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x1b\x5b\x33\x30\x6d\x3c"
1767 "\x48\x46\x53\x1b\x5b\x33\x37\x6d\x2b\x3a\x20\x20\x20\x60\x20\x60\x20\x60\x20"
1768 "\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x2c\x1b"
1769 "\x5b\x33\x30\x6d\x24\x46\x48\x46\x1b\x5b\x33\x37\x6d\x3f\x20\x60\x20\x60\x20"
1770 "\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x60\x20\x20\x20\x60"
1771 "\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1772 "\x60\x22\x3c\x1b\x5b\x33\x30\x6d\x48\x24\x46\x46\x1b\x5b\x33\x37\x6d\x3e\x2c"
1773 "\x2e\x2e\x20\x20\x20\x20\x20\x20\x20\x20\x60\x20\x20\x20\x60\x20\x20\x20\x3b"
1774 "\x2c\x2c\x1b\x5b\x33\x30\x6d\x24\x53\x46\x46\x46\x1b\x5b\x33\x37\x6d\x27\x22"
1775 "\x20\x20\x60\x20\x20\x20\x60\x20\x20\x20\x60\x20\x20\x20\x20\x20\x20\x20\x20"
1776 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20"
1777 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x60\x22\x1b\x5b\x33\x30\x6d\x2a\x3c\x48"
1778 "\x46\x46\x24\x53\x24\x1b\x5b\x33\x37\x6d\x53\x53\x53\x3e\x3e\x3e\x3e\x3e\x53"
1779 "\x3e\x53\x1b\x5b\x33\x30\x6d\x24\x53\x24\x46\x24\x48\x46\x23\x1b\x5b\x33\x37"
1780 "\x6d\x27\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1781 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20"
1782 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1783 "\x60\x60\x22\x3c\x1b\x5b\x33\x30\x6d\x2a\x3c\x3c\x3c\x48\x46\x46\x46\x48\x46"
1784 "\x46\x46\x23\x3c\x1b\x5b\x33\x36\x6d\x3c\x1b\x5b\x33\x37\x6d\x3c\x27\x22\x22"
1785 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
1786 "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x1b"
1787 "\x5b\x30\x6d";
1788
1789 /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */
This page took 0.128935 seconds and 6 git commands to generate.