Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoreutarass2011-08-31 17:21:44 -0400
committereutarass2011-08-31 17:21:44 -0400
commit479cf8ac4569031897d6d49bbd5e7b5156eadc0f (patch)
tree0bc8cb42cd78afd7aab2367084165e74ba476d6c /tests
parente50705828604d3ec2d8456c2be5eae4649221b15 (diff)
downloadorg.eclipse.tcf-479cf8ac4569031897d6d49bbd5e7b5156eadc0f.tar.gz
org.eclipse.tcf-479cf8ac4569031897d6d49bbd5e7b5156eadc0f.tar.xz
org.eclipse.tcf-479cf8ac4569031897d6d49bbd5e7b5156eadc0f.zip
TCF Agent: added support for OP_piece and OP_bit_piece in DWARF location expressions.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dwarf/backend/backend.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/test-dwarf/backend/backend.c b/tests/test-dwarf/backend/backend.c
index 3124cf656..bbdeb9421 100644
--- a/tests/test-dwarf/backend/backend.c
+++ b/tests/test-dwarf/backend/backend.c
@@ -185,6 +185,8 @@ static void print_time(struct timespec time_start, int cnt) {
static void test(void * args);
static void loc_var_func(void * args, Symbol * sym) {
+ int frame = 0;
+ Context * ctx = NULL;
RegisterDefinition * reg = NULL;
ContextAddress addr = 0;
ContextAddress size = 0;
@@ -196,24 +198,22 @@ static void loc_var_func(void * args, Symbol * sym) {
Symbol * base_type = NULL;
ContextAddress length = 0;
int64_t lower_bound = 0;
+ void * value = NULL;
+ size_t value_size = 0;
+ int value_big_endian = 0;
if (get_symbol_flags(sym, &flags) < 0) {
error("get_symbol_flags");
}
if (get_symbol_address(sym, &addr) < 0) {
- if (strncmp(errno_to_str(errno), "No object location info found", 29) == 0) return;
- if (strncmp(errno_to_str(errno), "Object is not available", 23) == 0) return;
- if (strncmp(errno_to_str(errno), "Object has no RT address", 24) == 0) return;
-
- if (strncmp(errno_to_str(errno), "Register variable", 17) == 0) {
- int frame = 0;
- Context * ctx = NULL;
- if (get_symbol_register(sym, &ctx, &frame, &reg) < 0) {
- error("get_symbol_register");
- }
- }
- else {
+ int err = errno;
+ if ((get_symbol_register(sym, &ctx, &frame, &reg) < 0 || reg == NULL) &&
+ (get_symbol_value(sym, &value, &value_size, &value_big_endian) < 0 || value == NULL)) {
+ 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), "Object has no RT address", 24) == 0) return;
+ errno = err;
error("get_symbol_address");
}
}
@@ -221,7 +221,7 @@ static void loc_var_func(void * args, Symbol * sym) {
error("get_symbol_size");
}
if (get_symbol_class(sym, &symbol_class) < 0) {
- error("get_symbol_type");
+ error("get_symbol_class");
}
if (get_symbol_type(sym, &type) < 0) {
error("get_symbol_type");

Back to the top