Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEugene Tarassov2011-11-19 16:57:23 -0500
committerEugene Tarassov2011-11-19 16:57:23 -0500
commite49b42351007b048894274d837428179be78b5d7 (patch)
tree287ecd906a770a70a7d2ed826f1a4e050f9a1d48 /tests
parent557b1d175294bd4a85ca30ef60d8e4212e2f15e3 (diff)
downloadorg.eclipse.tcf.agent-e49b42351007b048894274d837428179be78b5d7.tar.gz
org.eclipse.tcf.agent-e49b42351007b048894274d837428179be78b5d7.tar.xz
org.eclipse.tcf.agent-e49b42351007b048894274d837428179be78b5d7.zip
TCF Agent: C++ support improvements.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dwarf/tcf/backend/backend.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/tests/test-dwarf/tcf/backend/backend.c b/tests/test-dwarf/tcf/backend/backend.c
index 3b54261b..1397e602 100644
--- a/tests/test-dwarf/tcf/backend/backend.c
+++ b/tests/test-dwarf/tcf/backend/backend.c
@@ -199,11 +199,14 @@ static void loc_var_func(void * args, Symbol * sym) {
void * value = NULL;
size_t value_size = 0;
int value_big_endian = 0;
+ char * name = NULL;
if (get_symbol_flags(sym, &flags) < 0) {
error("get_symbol_flags");
}
-
+ if (get_symbol_name(sym, &name) < 0) {
+ error("get_symbol_name");
+ }
if (get_symbol_address(sym, &addr) < 0) {
int err = errno;
if ((get_symbol_register(sym, &ctx, &frame, &reg) < 0 || reg == NULL) &&
@@ -215,15 +218,30 @@ static void loc_var_func(void * args, Symbol * sym) {
error("get_symbol_address");
}
}
- if (get_symbol_size(sym, &size) < 0) {
- error("get_symbol_size");
- }
if (get_symbol_class(sym, &symbol_class) < 0) {
error("get_symbol_class");
}
if (get_symbol_type(sym, &type) < 0) {
error("get_symbol_type");
}
+ if (get_symbol_size(sym, &size) < 0) {
+ int ok = 0;
+ if (name == NULL && type != NULL) {
+ char * type_name;
+ int type_flags;
+ if (get_symbol_name(type, &type_name) < 0) {
+ error("get_symbol_name");
+ }
+ if (get_symbol_flags(type, &type_flags) < 0) {
+ error("get_symbol_flags");
+ }
+ if (type_name != NULL && strcmp(type_name, "exception") == 0 && (type_flags & SYM_FLAG_CLASS_TYPE)) {
+ /* GCC does not tell size of std::exception class */
+ ok = 1;
+ }
+ }
+ if (!ok) error("get_symbol_size");
+ }
if (type != NULL) {
if (get_symbol_type_class(sym, &type_class) < 0) {
error("get_symbol_type_class");

Back to the top