Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-12-07 23:41:41 +0000
committereutarass2010-12-07 23:41:41 +0000
commitd896e257f143bcb9fa2bdc73089db120cedab0cb (patch)
treef006e51f28fc73fccad37e0dc87d9e658c36a4a2 /services/symbols_win32.c
parentad221ff3f274350fbd6992b0775caed9b8b3e232 (diff)
downloadorg.eclipse.tcf.agent-d896e257f143bcb9fa2bdc73089db120cedab0cb.tar.gz
org.eclipse.tcf.agent-d896e257f143bcb9fa2bdc73089db120cedab0cb.tar.xz
org.eclipse.tcf.agent-d896e257f143bcb9fa2bdc73089db120cedab0cb.zip
TCF Debugger: added Symbols service tests to diagnostic test suite.
TCF Agent: fixed missing size attribute in function symbols
Diffstat (limited to 'services/symbols_win32.c')
-rw-r--r--services/symbols_win32.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/services/symbols_win32.c b/services/symbols_win32.c
index ea67c8f8..195ce145 100644
--- a/services/symbols_win32.c
+++ b/services/symbols_win32.c
@@ -90,9 +90,9 @@ struct Symbol {
unsigned frame;
int sym_class;
ULONG64 module;
- ULONG index;
- const TypeInfo * info;
- const Symbol * base;
+ ULONG index; /* The symbol index in debug info section */
+ const TypeInfo * info; /* If not NULL, the symbol is basic type */
+ const Symbol * base; /* If not NULL, the symbol is array or pointer with this base type */
size_t length;
ContextAddress address;
};
@@ -489,8 +489,15 @@ int get_symbol_size(const Symbol * sym, ContextAddress * size) {
*size = sym->info->size;
return 0;
}
- if (get_type_tag(&type, &tag)) return -1;
- if (get_type_info(&type, TI_GET_LENGTH, &res) < 0) return -1;
+ if (sym->sym_class == SYM_CLASS_REFERENCE || sym->sym_class == SYM_CLASS_FUNCTION) {
+ SYMBOL_INFO * info = NULL;
+ if (get_sym_info(sym, sym->index, &info) < 0) return -1;
+ res = info->Size;
+ }
+ else {
+ if (get_type_tag(&type, &tag)) return -1;
+ if (get_type_info(&type, TI_GET_LENGTH, &res) < 0) return -1;
+ }
*size = (ContextAddress)res;
return 0;

Back to the top