Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-06-27 21:12:35 -0400
committerEugene Tarassov2014-06-27 21:12:35 -0400
commit91e78c0cd07dd5452625220477d8440d0a398b38 (patch)
tree75d8cbba144d4837f20ac599224bba1bc5513df2
parent038ca13a0171249211c4be4cc1fba868ca753c63 (diff)
downloadorg.eclipse.tcf.agent-91e78c0cd07dd5452625220477d8440d0a398b38.tar.gz
org.eclipse.tcf.agent-91e78c0cd07dd5452625220477d8440d0a398b38.tar.xz
org.eclipse.tcf.agent-91e78c0cd07dd5452625220477d8440d0a398b38.zip
TCF Agent: fixed intermittent failures of diagnostic tests on PPC Linux
-rw-r--r--agent/Makefile.inc3
-rwxr-xr-xagent/agent.vcproj28
-rw-r--r--agent/machine/powerpc/tcf/cpudefs-mdep.c4
-rw-r--r--agent/tcf/framework/cache.c4
-rw-r--r--agent/tcf/framework/cache.h5
-rw-r--r--agent/tcf/services/stacktrace.c1
6 files changed, 43 insertions, 2 deletions
diff --git a/agent/Makefile.inc b/agent/Makefile.inc
index 719421ab..93d45a82 100644
--- a/agent/Makefile.inc
+++ b/agent/Makefile.inc
@@ -8,6 +8,9 @@ ifndef MACHINE
ifeq ($(MACHINE),armv6l)
MACHINE := arm
endif
+ ifeq ($(MACHINE),ppc64)
+ MACHINE := powerpc
+ endif
endif
INCDIRS = . system/$(OPSYS) machine/$(MACHINE)
diff --git a/agent/agent.vcproj b/agent/agent.vcproj
index 5b0cf297..6db338e6 100755
--- a/agent/agent.vcproj
+++ b/agent/agent.vcproj
@@ -1615,6 +1615,34 @@
>
</File>
</Filter>
+ <Filter
+ Name="powerpc"
+ >
+ <File
+ RelativePath=".\machine\powerpc\tcf\cpudefs-mdep.c"
+ >
+ </File>
+ <File
+ RelativePath=".\machine\powerpc\tcf\cpudefs-mdep.h"
+ >
+ </File>
+ <File
+ RelativePath=".\machine\powerpc\tcf\disassembler-powerpc.c"
+ >
+ </File>
+ <File
+ RelativePath=".\machine\powerpc\tcf\disassembler-powerpc.h"
+ >
+ </File>
+ <File
+ RelativePath=".\machine\powerpc\tcf\dwarfreloc-mdep.h"
+ >
+ </File>
+ <File
+ RelativePath=".\machine\powerpc\tcf\regset-mdep.h"
+ >
+ </File>
+ </Filter>
</Filter>
<File
RelativePath=".\tcf\config.h"
diff --git a/agent/machine/powerpc/tcf/cpudefs-mdep.c b/agent/machine/powerpc/tcf/cpudefs-mdep.c
index d0265235..a677d300 100644
--- a/agent/machine/powerpc/tcf/cpudefs-mdep.c
+++ b/agent/machine/powerpc/tcf/cpudefs-mdep.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 Stanislav Yakovlev.
+ * Copyright (c) 2013, 2014 Stanislav Yakovlev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
@@ -129,7 +129,7 @@ RegisterDefinition * get_PC_definition(Context * ctx) {
}
int crawl_stack_frame(StackFrame * frame, StackFrame * down) {
- return -1;
+ return 0;
}
#if ENABLE_add_cpudefs_disassembler
diff --git a/agent/tcf/framework/cache.c b/agent/tcf/framework/cache.c
index e0b4ea55..74d37c1e 100644
--- a/agent/tcf/framework/cache.c
+++ b/agent/tcf/framework/cache.c
@@ -229,6 +229,10 @@ unsigned cache_transaction_id(void) {
return current_client.id;
}
+unsigned cache_miss_count(void) {
+ return cache_miss_cnt;
+}
+
void cache_dispose(AbstractCache * cache) {
assert(is_dispatch_thread());
assert(cache->wait_list_cnt == 0);
diff --git a/agent/tcf/framework/cache.h b/agent/tcf/framework/cache.h
index a8045771..f257608d 100644
--- a/agent/tcf/framework/cache.h
+++ b/agent/tcf/framework/cache.h
@@ -166,6 +166,11 @@ extern void cache_set_def_channel(Channel * channel);
extern unsigned cache_transaction_id(void);
/*
+ * Return number of cache misses in the current transaction.
+ */
+extern unsigned cache_miss_count(void);
+
+/*
* Dispose a cache.
*/
extern void cache_dispose(AbstractCache * cache);
diff --git a/agent/tcf/services/stacktrace.c b/agent/tcf/services/stacktrace.c
index 39e516b1..b07d43a4 100644
--- a/agent/tcf/services/stacktrace.c
+++ b/agent/tcf/services/stacktrace.c
@@ -207,6 +207,7 @@ static int trace_stack(Context * ctx, StackTrace * stack, int max_frames) {
stack->complete = 1;
return 0;
}
+ assert(cache_miss_count() > 0);
errno = error;
return -1;
}

Back to the top