summaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
authorJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-01-31 20:27:59 +0100
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-01-31 20:27:59 +0100
commitc167c2a3a404f5166ffd70a15a09c97cd1883ee8 (patch)
tree12d2916bd2a58a20c9672a8d4c78974c5e9eb13d /src/config.h
parentab67022bd5b60c839cc5d8360cd0c0a7f8c21f83 (diff)
downloadlatrace-c167c2a3a404f5166ffd70a15a09c97cd1883ee8.tar.gz
latrace-c167c2a3a404f5166ffd70a15a09c97cd1883ee8.tar.xz
latrace-c167c2a3a404f5166ffd70a15a09c97cd1883ee8.zip
adding support for global symbol config
one global tree to rule them all - only one tree is searched during the plt entry/exit - symbols are added during the bind audit callback
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index 29c9c4f..c7f88ee 100644
--- a/src/config.h
+++ b/src/config.h
@@ -118,6 +118,7 @@ struct lt_config_shared {
int not_follow_fork;
int framesize_check;
unsigned int framesize;
+ int global_symbols;
/* for 'not_follow_fork' */
pid_t pid;
@@ -260,6 +261,15 @@ struct lt_thread {
struct lt_thread *next;
};
+struct lt_symbol {
+ struct lt_args_sym *args;
+
+ /* symbol name */
+ const char *name;
+ /* symbol address */
+ void *ptr;
+};
+
/* ctl */
int main_ctl(int argc, char **argv);
@@ -307,6 +317,12 @@ char* lt_objsearch(struct lt_config_audit *cfg, const char *name,
/* stack */
int lt_stack_framesize(struct lt_config_audit *cfg, La_regs *regs);
+/* symbol */
+struct lt_symbol* lt_symbol_bind(struct lt_config_shared *cfg,
+ void *ptr, const char *name);
+struct lt_symbol* lt_symbol_get(struct lt_config_shared *cfg,
+ void *ptr, const char *name);
+
#define PRINT(fmt, args...) \
do { \
char lpbuf[1024]; \
@@ -316,6 +332,7 @@ do { \
__LINE__, \
fmt); \
printf(lpbuf, ## args); \
+ fflush(NULL); \
} while(0)
#define PRINT_VERBOSE(cfg, cond, fmt, args...) \