From: Ian Jackson Date: Thu, 19 Oct 2017 00:52:56 +0000 (+0100) Subject: fishdescriptor: use lookup_type for the field list X-Git-Tag: archive/debian/6.0.0~1^2~22 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=6f3a1bd6659dd7e724db2e2f18f62bf331e63421 fishdescriptor: use lookup_type for the field list Signed-off-by: Ian Jackson --- diff --git a/fishdescriptor/py/fishdescriptor/indonor.py b/fishdescriptor/py/fishdescriptor/indonor.py index 6c799c0..f01f9eb 100644 --- a/fishdescriptor/py/fishdescriptor/indonor.py +++ b/fishdescriptor/py/fishdescriptor/indonor.py @@ -58,11 +58,11 @@ def parse_eval(expr): class DonorStructLayout(): def __init__(l, typename): - x = parse_eval('(%s){ }' % typename) + x = gdb.lookup_type(typename) l._typename = typename l._template = [ ] l._posns = { } - for f in x.type.fields(): + for f in x.fields(): l._posns[f.name] = len(l._template) try: f.type.fields(); blank = '{ }' except TypeError: blank = '0'