diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-09-18 08:17:29 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-09-18 08:17:29 +0200 |
commit | 5ec323b5228c83b15fdae81029eddab1b745703b (patch) | |
tree | f123001e6292e7b5b471e93c0cae963452a0f803 /loc2c.c | |
parent | bb5ba1d9bf1e83de32ea2da4975d4958e366c3da (diff) | |
download | systemtap-steved-5ec323b5228c83b15fdae81029eddab1b745703b.tar.gz systemtap-steved-5ec323b5228c83b15fdae81029eddab1b745703b.tar.xz systemtap-steved-5ec323b5228c83b15fdae81029eddab1b745703b.zip |
PR10417 Fix declare_noncontig_union struct emitting.
* loc2c.c (declare_noncontig_union): Only open struct when loc_noncontiguous.
Diffstat (limited to 'loc2c.c')
-rw-r--r-- | loc2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1407,12 +1407,12 @@ declare_noncontig_union (struct obstack *pool, int indent, obstack_printf (pool, "%*schar bytes[%" PRIu64 "];\n", indent * 2, "", loc->byte_size); - obstack_printf (pool, "%*sstruct {\n", indent++ * 2, ""); - if (loc->type == loc_noncontiguous) { Dwarf_Word offset = 0; struct location *p; + obstack_printf (pool, "%*sstruct {\n", indent++ * 2, ""); + for (p = loc->pieces; p != NULL; p = p->next) { obstack_printf (pool, "%*suint%" PRIu64 "_t p%" PRIu64 ";\n", |