summaryrefslogtreecommitdiff
path: root/extension_eppic.c
diff options
context:
space:
mode:
authorAravinda Prasad <aravinda@linux.vnet.ibm.com>2014-02-27 15:03:05 +0900
committerAtsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>2014-03-03 14:57:30 +0900
commitd1bd9f96f0cefb44c80745fe8246d652d2bf319f (patch)
tree996d98550d9b6158b676735e78c0f909b2bb4d3a /extension_eppic.c
parent2091af13acb46f36641ba2a5567c0e4ae09780cc (diff)
[PATCH] eppic: Properly resolve structure members.
makedumpfile/eppic was not able to resolve member of the structure in cases such as: struct abc { ... ... struct xyz ... } and eppic script: sample() { struct abc *a; struct xyz *x; x->member; } would fail to resolve "member" of structure xyz. However it works if "struct abc *a;" line is removed from eppic script. This patch fixes this issue. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Diffstat (limited to 'extension_eppic.c')
-rw-r--r--extension_eppic.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/extension_eppic.c b/extension_eppic.c
index 7e045c9..20d996d 100644
--- a/extension_eppic.c
+++ b/extension_eppic.c
@@ -24,6 +24,8 @@
#include "makedumpfile.h"
#include "extension_eppic.h"
+static int apigetctype(int, char *, type_t *);
+
/*
* Most of the functions included in this file performs similar
* functionality as in the applications/crash/eppic.c file part of
@@ -183,7 +185,15 @@ drilldown(ull offset, type_t *t)
goto label;
case DW_TAG_structure_type:
eppic_type_mkstruct(t);
- goto label;
+label:
+ eppic_type_setsize(t, GET_DIE_LENGTH(t_die_off, TRUE));
+ eppic_type_setidx(t, (ull)t_die_off);
+ tstr = GET_DIE_NAME(t_die_off);
+ /* Drill down further */
+ if (tstr)
+ apigetctype(V_STRUCT, tstr, t);
+ die_off = 0;
+ break;
/* Unknown TAG ? */
default:
die_off = t_die_off;
@@ -191,11 +201,6 @@ drilldown(ull offset, type_t *t)
}
}
-label:
- eppic_type_setsize(t, GET_DIE_LENGTH(t_die_off, TRUE));
- eppic_type_setidx(t, (ull)t_die_off);
- tstr = GET_DIE_NAME(t_die_off);
-
out:
eppic_setupidx(t, ref, nidx, idxlst);
if (fctflg)