Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorEugene Tarassov2015-06-10 20:41:23 -0400
committerEugene Tarassov2015-06-10 20:41:23 -0400
commit849324997c0c434f3804f7fab42978bc82b78f60 (patch)
tree755fd84d364e29b669bdb4f278089e07df696a0b /server
parentac487f2e09f5a65ddf78a0aef2b74a1becfa9ac6 (diff)
downloadorg.eclipse.tcf.agent-849324997c0c434f3804f7fab42978bc82b78f60.tar.gz
org.eclipse.tcf.agent-849324997c0c434f3804f7fab42978bc82b78f60.tar.xz
org.eclipse.tcf.agent-849324997c0c434f3804f7fab42978bc82b78f60.zip
TCF Server: fixed handling of targets that don't define DWARF register number for PC
Diffstat (limited to 'server')
-rw-r--r--server/tcf/services/context-proxy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tcf/services/context-proxy.c b/server/tcf/services/context-proxy.c
index bb516b5e..a2383aea 100644
--- a/server/tcf/services/context-proxy.c
+++ b/server/tcf/services/context-proxy.c
@@ -1218,7 +1218,7 @@ static void validate_mid_frame_reg_values_cache(Channel * c, void * args, int er
json_read_binary_start(&state, &c->inp);
for (r = 0; r < n; r++) {
RegisterDefinition * reg = fc->reg_defs[r];
- if (reg->size > 0 && reg->dwarf_id >= 0) {
+ if (reg->size > 0 && (reg->dwarf_id >= 0 || reg->role != NULL)) {
size_t pos = 0;
uint8_t * data = fc->reg_data.data + reg->offset;
uint8_t * mask = fc->reg_data.mask + reg->offset;
@@ -1291,7 +1291,7 @@ int read_reg_bytes(StackFrame * frame, RegisterDefinition * reg_def, unsigned of
write_stream(&c->out, '[');
for (n = 0; n < fc->reg_cnt; n++) {
RegisterDefinition * reg = fc->reg_defs[n];
- if (reg->size > 0 && reg->dwarf_id >= 0) {
+ if (reg->size > 0 && (reg->dwarf_id >= 0 || reg->role != NULL)) {
const char * id = register2id(fc->ctx->ctx, frame->frame, reg);
if (n > 0) write_stream(&c->out, ',');
write_stream(&c->out, '[');
@@ -1320,7 +1320,7 @@ int read_reg_bytes(StackFrame * frame, RegisterDefinition * reg_def, unsigned of
uint8_t * m_addr = frame->regs->mask + reg_def->offset;
for (i = 0; i < size; i++) {
if (m_addr[offs + i] != 0xff) {
- errno = ERR_INV_CONTEXT;
+ set_fmt_errno(ERR_INV_CONTEXT, "Value of register %s is unknown in the selected frame", reg_def->name);
return -1;
}
}

Back to the top