From 9bff13df400882d89bf9900eda3dac98f8cf9a81 Mon Sep 17 00:00:00 2001 From: compudj Date: Sun, 12 Mar 2006 20:46:06 +0000 Subject: [PATCH] state.c function bugfix git-svn-id: http://ltt.polymtl.ca/svn@1697 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/configure.in | 2 +- ltt/branches/poly/lttv/lttv/state.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ltt/branches/poly/configure.in b/ltt/branches/poly/configure.in index f17d60eb..7c17a982 100644 --- a/ltt/branches/poly/configure.in +++ b/ltt/branches/poly/configure.in @@ -23,7 +23,7 @@ AC_PREREQ(2.57) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) #AC_WITH_LTDL # not needed ? -AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.31-11032006) +AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.32-12032006) AM_CONFIG_HEADER(config.h) AM_PROG_LIBTOOL diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 07ecfc46..1eb3cf3c 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -1416,8 +1416,7 @@ static void push_function(LttvTracefileState *tfs, guint64 funcptr) new_func = &g_array_index(process->user_stack, guint64, depth); *new_func = funcptr; - process->current_function = - g_array_index(process->user_stack, guint64, depth - 1); + process->current_function = funcptr; } static void pop_function(LttvTracefileState *tfs, guint64 funcptr) @@ -1426,7 +1425,6 @@ static void pop_function(LttvTracefileState *tfs, guint64 funcptr) LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context; LttvProcessState *process = ts->running_process[cpu]; - guint depth = process->user_stack->len; if(process->current_function != funcptr){ g_info("Different functions (%lu.%09lu): ignore it\n", tfs->parent.timestamp.tv_sec, tfs->parent.timestamp.tv_nsec); @@ -1439,6 +1437,7 @@ static void pop_function(LttvTracefileState *tfs, guint64 funcptr) g_quark_to_string(process->state->s)); return; } + guint depth = process->user_stack->len; if(depth == 0){ g_info("Trying to pop last function on stack (%lu.%09lu): ignore it\n", -- 2.34.1