Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEugene Tarassov2012-02-08 15:13:33 -0500
committerEugene Tarassov2012-02-08 15:13:33 -0500
commite3bfd1208972466c0cc1a4312840fcc93b7760ac (patch)
tree5519af6ee66b212ac918201f6dbf58f84a5c06e6 /tests
parent85a2a35b36605737cec489fa66668c8cb5226f0d (diff)
downloadorg.eclipse.tcf.agent-e3bfd1208972466c0cc1a4312840fcc93b7760ac.tar.gz
org.eclipse.tcf.agent-e3bfd1208972466c0cc1a4312840fcc93b7760ac.tar.xz
org.eclipse.tcf.agent-e3bfd1208972466c0cc1a4312840fcc93b7760ac.zip
TCF Agent: fixed: get_symbol_value() stopped working for symbols that are defined in ELF symbol section.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dwarf/tcf/backend/backend.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/test-dwarf/tcf/backend/backend.c b/tests/test-dwarf/tcf/backend/backend.c
index 39e87cd9..eb4d7595 100644
--- a/tests/test-dwarf/tcf/backend/backend.c
+++ b/tests/test-dwarf/tcf/backend/backend.c
@@ -345,6 +345,10 @@ static int symcmp(Symbol * x, Symbol * y) {
return strcmp(id, symbol2id(y));
}
+static int errcmp(int err, const char * msg) {
+ return strncmp(errno_to_str(err), msg, strlen(msg));
+}
+
static void test(void * args);
static void loc_var_func(void * args, Symbol * sym) {
@@ -455,11 +459,11 @@ static void loc_var_func(void * args, Symbol * sym) {
if ((get_symbol_register(sym, &ctx, &frame, &reg) < 0 || reg == NULL) &&
(get_symbol_value(sym, &value, &value_size, &value_big_endian) < 0 || value == NULL)) {
int err = errno;
- if (strncmp(errno_to_str(err), "Object location or value info not available", 43) == 0) return;
- if (strncmp(errno_to_str(err), "No object location info found", 29) == 0) return;
- if (strncmp(errno_to_str(err), "Object is not available", 23) == 0) return;
- if (strncmp(errno_to_str(err), "Division by zero in location", 28) == 0) return;
- if (strncmp(errno_to_str(err), "Cannot find loader debug", 24) == 0) return;
+ if (errcmp(err, "No object location or value info found") == 0) return;
+ if (errcmp(err, "No object location info found") == 0) return;
+ if (errcmp(err, "Object is not available at this location") == 0) return;
+ if (errcmp(err, "Division by zero in location") == 0) return;
+ if (errcmp(err, "Cannot find loader debug") == 0) return;
errno = err;
error_sym("get_symbol_value", sym);
}

Back to the top