From 7b1435808100639cc2168529954d2a4c8bdc325b Mon Sep 17 00:00:00 2001 From: compudj Date: Sat, 17 Dec 2005 23:43:21 +0000 Subject: [PATCH] use enums arch specific for syscall names git-svn-id: http://ltt.polymtl.ca/svn@1427 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/facilities/Makefile.am | 2 ++ ltt/branches/poly/facilities/kernel.xml | 10 ---------- ltt/branches/poly/ltt/parser.c | 9 +++++---- ltt/branches/poly/lttv/lttv/state.c | 8 +++++--- ltt/branches/poly/lttv/lttv/state.h | 1 + ltt/branches/poly/lttv/lttv/stats.c | 8 ++++---- .../poly/lttv/modules/gui/controlflow/drawing.c | 4 ++-- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/ltt/branches/poly/facilities/Makefile.am b/ltt/branches/poly/facilities/Makefile.am index e10a3da6..36521458 100644 --- a/ltt/branches/poly/facilities/Makefile.am +++ b/ltt/branches/poly/facilities/Makefile.am @@ -3,6 +3,7 @@ EXTRA_DIST = \ core.xml \ fs.xml \ ipc.xml \ +asm_i386_kernel.xml \ kernel.xml \ memory.xml \ network.xml \ @@ -15,6 +16,7 @@ facilities_DATA = \ core.xml \ fs.xml \ ipc.xml \ +asm_i386_kernel.xml \ kernel.xml \ memory.xml \ network.xml \ diff --git a/ltt/branches/poly/facilities/kernel.xml b/ltt/branches/poly/facilities/kernel.xml index 19285c56..84d39e4a 100644 --- a/ltt/branches/poly/facilities/kernel.xml +++ b/ltt/branches/poly/facilities/kernel.xml @@ -15,16 +15,6 @@ - - System call entry - Syscall entry number in entry.S - Address from which call was made - - - - System call exit - - Entry in a trap Trap number diff --git a/ltt/branches/poly/ltt/parser.c b/ltt/branches/poly/ltt/parser.c index 921c559a..b8f2a6a2 100644 --- a/ltt/branches/poly/ltt/parser.c +++ b/ltt/branches/poly/ltt/parser.c @@ -741,7 +741,7 @@ type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *inType, while(strcmp("label",token) == 0){ int *label_value = malloc(sizeof(int)); - str = allocAndCopy(getNameAttribute(in)); + str = allocAndCopy(getNameAttribute(in)); token = getValueStrAttribute(in); sequence_push(&(t->labels),str); @@ -972,7 +972,8 @@ char *getName(parse_file_t * in) char *token; token = getToken(in); - if(in->type != NAME) in->error(in,"Name token was expected"); + // Optional descriptions + // if(in->type != NAME) in->error(in,"Name token was expected"); return token; } @@ -1154,11 +1155,11 @@ char *getToken(parse_file_t * in) if(pos == BUFFER_SIZE) in->error(in, "number token too large"); in->type = NUMBER; } - else if(isalpha(car)) { + else if(isalnum(car) || car == '_' || car == '-') { in->buffer[0] = car; pos = 1; while((car = getc(fp)) != EOF && pos < BUFFER_SIZE) { - if(!(isalnum(car) || car == '_')) { + if(!(isalnum(car) || car == '_' || car == '-')) { ungetc(car,fp); break; } diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 22c1d3bf..0721f7c9 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -35,6 +35,7 @@ GQuark LTT_FACILITY_KERNEL, + LTT_FACILITY_ASM_I386_KERNEL, LTT_FACILITY_PROCESS, LTT_FACILITY_FS; @@ -768,7 +769,7 @@ create_name_tables(LttvTraceState *tcs) } #endif //0 if(lttv_trace_find_hook(tcs->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, NULL, NULL, &h)) return; @@ -1437,13 +1438,13 @@ void lttv_state_add_event_hooks(LttvTracesetState *self) hooks = g_array_set_size(hooks, 11); ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, syscall_entry, NULL, &g_array_index(hooks, LttvTraceHook, 0)); g_assert(!ret); ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT, 0, 0, 0, syscall_exit, NULL, &g_array_index(hooks, LttvTraceHook, 1)); g_assert(!ret); @@ -2155,6 +2156,7 @@ static void module_init() LTT_FACILITY_KERNEL = g_quark_from_string("kernel"); + LTT_FACILITY_ASM_I386_KERNEL = g_quark_from_string("asm_i386_kernel"); LTT_FACILITY_PROCESS = g_quark_from_string("process"); LTT_FACILITY_FS = g_quark_from_string("fs"); diff --git a/ltt/branches/poly/lttv/lttv/state.h b/ltt/branches/poly/lttv/lttv/state.h index 69f35edf..c6a373ab 100644 --- a/ltt/branches/poly/lttv/lttv/state.h +++ b/ltt/branches/poly/lttv/lttv/state.h @@ -57,6 +57,7 @@ extern GQuark LTT_FACILITY_KERNEL, + LTT_FACILITY_ASM_I386_KERNEL, LTT_FACILITY_PROCESS, LTT_FACILITY_FS; diff --git a/ltt/branches/poly/lttv/lttv/stats.c b/ltt/branches/poly/lttv/lttv/stats.c index 6416e300..d4321bce 100644 --- a/ltt/branches/poly/lttv/lttv/stats.c +++ b/ltt/branches/poly/lttv/lttv/stats.c @@ -808,14 +808,14 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self) g_array_set_size(hooks, 7); ret = lttv_trace_find_hook(ts->parent.parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, before_syscall_entry, NULL, &g_array_index(hooks, LttvTraceHook, 0)); g_assert(!ret); ret = lttv_trace_find_hook(ts->parent.parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT, 0, 0, 0, before_syscall_exit, NULL, &g_array_index(hooks, LttvTraceHook, 1)); @@ -862,14 +862,14 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self) g_array_set_size(hooks, 9); ret = lttv_trace_find_hook(ts->parent.parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, after_syscall_entry, NULL, &g_array_index(hooks, LttvTraceHook, 0)); g_assert(!ret); ret = lttv_trace_find_hook(ts->parent.parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT, 0, 0, 0, after_syscall_exit, NULL, &g_array_index(hooks, LttvTraceHook, 1)); diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c index 94f81089..b22931d6 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -224,7 +224,7 @@ void drawing_data_request(Drawing_t *drawing, /* before hooks */ ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, before_execmode_hook, events_request, @@ -232,7 +232,7 @@ void drawing_data_request(Drawing_t *drawing, g_assert(!ret); ret = lttv_trace_find_hook(ts->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT, + LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT, 0, 0, 0, before_execmode_hook, events_request, -- 2.34.1