diff options
author | eutarass | 2011-04-07 17:20:13 +0000 |
---|---|---|
committer | eutarass | 2011-04-07 17:20:13 +0000 |
commit | 86959f736b3d7c1d62e95046eeb1e9c50d837a3c (patch) | |
tree | 8b34ddde1d517f4e91351b9c40424dbeb86e6932 /services/symbols.c | |
parent | b212a1a889fe7d5de8393dc8ea2623160661a887 (diff) | |
download | org.eclipse.tcf.agent-86959f736b3d7c1d62e95046eeb1e9c50d837a3c.tar.gz org.eclipse.tcf.agent-86959f736b3d7c1d62e95046eeb1e9c50d837a3c.tar.xz org.eclipse.tcf.agent-86959f736b3d7c1d62e95046eeb1e9c50d837a3c.zip |
Improved support for register variables:
1. New property for symbols and expression values: Register - register ID if the symbol or the value represents register variable.
2. Register name is shown in details pane of Variables and Expressions views.
3. Changing register variable value now works as expected.
Diffstat (limited to 'services/symbols.c')
-rw-r--r-- | services/symbols.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/services/symbols.c b/services/symbols.c index e053499c..ccfefbad 100644 --- a/services/symbols.c +++ b/services/symbols.c @@ -56,6 +56,9 @@ static void command_get_context_cache_client(void * x) { int64_t lower_bound = 0; ContextAddress offset = 0; ContextAddress address = 0; + RegisterDefinition * reg = NULL; + Context * reg_ctx = NULL; + int reg_frame = 0; void * value = NULL; size_t value_size = 0; @@ -79,6 +82,7 @@ static void command_get_context_cache_client(void * x) { } if (!has_offset && (sym_class == SYM_CLASS_REFERENCE || sym_class == SYM_CLASS_FUNCTION)) { has_address = get_symbol_address(sym, &address) == 0; + get_symbol_register(sym, ®_ctx, ®_frame, ®); } if (sym_class == SYM_CLASS_VALUE) { get_symbol_value(sym, &value, &value_size, &big_endian); @@ -187,6 +191,13 @@ static void command_get_context_cache_client(void * x) { write_stream(&c->out, ','); } + if (reg != NULL) { + json_write_string(&c->out, "Register"); + write_stream(&c->out, ':'); + json_write_string(&c->out, register2id(reg_ctx, reg_frame, reg)); + write_stream(&c->out, ','); + } + if (value != NULL) { json_write_string(&c->out, "Value"); write_stream(&c->out, ':'); |