Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/tcf/framework/cpudefs.c')
-rw-r--r--agent/tcf/framework/cpudefs.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/agent/tcf/framework/cpudefs.c b/agent/tcf/framework/cpudefs.c
index 489f4e8e..0615739a 100644
--- a/agent/tcf/framework/cpudefs.c
+++ b/agent/tcf/framework/cpudefs.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2018 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007-2019 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
@@ -33,6 +33,32 @@
#include <tcf/framework/cpudefs-ext.h>
+void create_reg_children_refs(RegisterDefinition * defs) {
+#if ENABLE_RegisterChildrenRefs
+ RegisterDefinition * r = NULL;
+ RegisterDefinition ** p = NULL;
+ RegisterDefinition * c = NULL;
+ unsigned size = 0;
+ assert(defs->parent == NULL);
+ assert(defs->children == NULL);
+ for (r = defs; r->name != NULL; r++) size++;
+ p = (RegisterDefinition **)tmp_alloc_zero(sizeof(RegisterDefinition *) * size);
+ for (r = defs; r->name != NULL; r++) {
+ assert(r->sibling == NULL);
+ if (r->parent == NULL) {
+ if (c != NULL) c->sibling = r;
+ c = r;
+ }
+ else {
+ RegisterDefinition ** y = p + (r->parent - defs);
+ if (*y == NULL) r->parent->children = r;
+ else (*y)->sibling = r;
+ *y = r;
+ }
+ }
+#endif
+}
+
int read_reg_value(StackFrame * frame, RegisterDefinition * reg_def, uint64_t * value) {
uint8_t buf[8];
if (reg_def == NULL) {

Back to the top