diff options
author | Rajan Arora <rarora@redhat.com> | 2009-04-22 12:10:37 -0400 |
---|---|---|
committer | Rajan Arora <rarora@redhat.com> | 2009-04-22 12:18:56 -0400 |
commit | a12a8a3f1b4f7cdb743aeaaa5ee6c5a4ff28bb7e (patch) | |
tree | 7e5d308b761946cb8c388cfee43ca46a2a587833 | |
parent | 247f1e1fa09953347a4e5313ae0022f151316dae (diff) | |
download | systemtap-steved-a12a8a3f1b4f7cdb743aeaaa5ee6c5a4ff28bb7e.tar.gz systemtap-steved-a12a8a3f1b4f7cdb743aeaaa5ee6c5a4ff28bb7e.tar.xz systemtap-steved-a12a8a3f1b4f7cdb743aeaaa5ee6c5a4ff28bb7e.zip |
PR 9941: Add predicate function callback to check for an early abort
* tapsets.cxx: Add dwfl_report_offline_predicate to check pending
interrupts for an early abort.
* tapsets.h: Declare it.
* translate.cxx: Add callback to function call.
-rw-r--r-- | tapsets.cxx | 11 | ||||
-rw-r--r-- | tapsets.h | 1 | ||||
-rw-r--r-- | translate.cxx | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index bfc1d541..4ab61942 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -668,6 +668,15 @@ enum line_t { ABSOLUTE, RELATIVE, RANGE, WILDCARD }; typedef vector<inline_instance_info> inline_instance_map_t; typedef vector<func_info> func_info_map_t; + +// PR 9941 introduces the need for a predicate + +int dwfl_report_offline_predicate (const char* modname, const char* filename) +{ + if (pending_interrupts) { return -1; } + return 1; +} + struct dwflpp { systemtap_session & sess; @@ -946,7 +955,7 @@ struct dwflpp int rc = dwfl_linux_kernel_report_offline (dwfl, elfutils_kernel_path.c_str(), - NULL); + &dwfl_report_offline_predicate); if (debuginfo_needed) dwfl_assert (string("missing ") + sess.architecture + @@ -17,6 +17,7 @@ struct derived_probe_group; void register_standard_tapsets(systemtap_session& sess); std::vector<derived_probe_group*> all_session_groups(systemtap_session& s); +int dwfl_report_offline_predicate (const char* modname, const char* filename); #endif // TAPSETS_H diff --git a/translate.cxx b/translate.cxx index 3fa8857b..87811e9f 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4871,7 +4871,7 @@ emit_symbol_data (systemtap_session& s) int rc = dwfl_linux_kernel_report_offline (dwfl, elfutils_kernel_path.c_str(), - NULL /* XXX: filtering callback */); + &dwfl_report_offline_predicate); dwfl_report_end (dwfl, NULL, NULL); if (rc == 0) // tolerate missing data; will warn user about it anyway { |