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