diff options
author | fche <fche> | 2005-11-04 21:46:14 +0000 |
---|---|---|
committer | fche <fche> | 2005-11-04 21:46:14 +0000 |
commit | 1472a4e17771f9076a7aa83c8cd2f4a1364a9a94 (patch) | |
tree | cc1617c76917678f7e1c622cb9894e84f490a9d5 /translate.cxx | |
parent | f7ad9b0424f404afa659108980065c24aaa5e3e4 (diff) | |
download | systemtap-steved-1472a4e17771f9076a7aa83c8cd2f4a1364a9a94.tar.gz systemtap-steved-1472a4e17771f9076a7aa83c8cd2f4a1364a9a94.tar.xz systemtap-steved-1472a4e17771f9076a7aa83c8cd2f4a1364a9a94.zip |
2005-11-04 Frank Ch. Eigler <fche@redhat.com>
* tapsets.cxx (dwarf_derived_probe::emit_registrations): Add
possible kprobe address prechecking logic. Set kretprobes
maxactive to zero.
* translate.cxx (emit_module_init): Set a more helpful default
probe_point value for use in registration errors. Exit properly
after registration failure of probe #0.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx index bdacdcca..0c1ce84f 100644 --- a/translate.cxx +++ b/translate.cxx @@ -825,9 +825,13 @@ c_unparser::emit_module_init () { o->newline() << "/* register probe #" << i << ", "; o->line() << session->probes[i]->locations.size() << " location(s) */"; - // default + + // By default, mark the first location as the site of possible + // registration failure. This is helpful since non-dwarf + // derived_probes tend to have only a single location. + assert (session->probes[i]->locations.size() > 0); o->newline() << "probe_point = " << - lex_cast_qstring (*session->probes[i]->tok) << ";"; + lex_cast_qstring (*session->probes[i]->locations[0]) << ";"; session->probes[i]->emit_registrations (o, i); o->newline() << "if (unlikely (rc)) {"; @@ -843,6 +847,8 @@ c_unparser::emit_module_init () // essential for kprobes. if (i > 0) o->newline() << "goto unregister_" << (i-1) << ";"; + else + o->newline() << "goto out;"; o->newline(-1) << "}"; } |