Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Perrin2015-02-16 10:48:16 +0000
committerBenoit Perrin2015-02-16 16:29:18 +0000
commita093f30a84cdf0604c19068da90ad42bd7e4f741 (patch)
tree6a6120358c6c9910e8d1f797993d30ef27c4b47f /agent/tcf/services/symbols_proxy.c
parent8fbd93b748a68998621a34cfa397625a59127a37 (diff)
downloadorg.eclipse.tcf.agent-a093f30a84cdf0604c19068da90ad42bd7e4f741.tar.gz
org.eclipse.tcf.agent-a093f30a84cdf0604c19068da90ad42bd7e4f741.tar.xz
org.eclipse.tcf.agent-a093f30a84cdf0604c19068da90ad42bd7e4f741.zip
Bug 459987 - Possible unnecessary symbol retrieval
When the Symbols service is located in the value-add, the function get_sym_context() of symbols_elf.c does not return an error when the function get_regs_PC() returns 0 because of cache miss exception thrown by underlying calls to the context proxy (context_read_reg() for example). Signed-off-by: Benoit Perrin <benoit.perrin@windriver.com>
Diffstat (limited to 'agent/tcf/services/symbols_proxy.c')
-rw-r--r--agent/tcf/services/symbols_proxy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/agent/tcf/services/symbols_proxy.c b/agent/tcf/services/symbols_proxy.c
index 28610906..d843e33a 100644
--- a/agent/tcf/services/symbols_proxy.c
+++ b/agent/tcf/services/symbols_proxy.c
@@ -615,6 +615,7 @@ static uint64_t get_symbol_ip(Context * ctx, int * frame, ContextAddress addr) {
ip = addr;
}
else if (is_top_frame(ctx, *frame)) {
+ unsigned cnt = cache_miss_count();
if (!ctx->stopped) {
exception(ERR_IS_RUNNING);
}
@@ -623,6 +624,12 @@ static uint64_t get_symbol_ip(Context * ctx, int * frame, ContextAddress addr) {
}
*frame = get_top_frame(ctx);
ip = get_regs_PC(ctx);
+ if (cache_miss_count() > cnt) {
+ /* The value of the PC (0) is incorrect. */
+ /* errno should already be set to a value different from 0 */
+ assert(errno != 0);
+ exception(errno);
+ }
}
else {
StackFrame * info = NULL;

Back to the top