Project

General

Profile

Actions

Bug #1973

closed

ctfconvert VLA support is broken (again) for DWARF objects

Added by Jason King almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
2012-01-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

For objects containing variable length arrays, at least some versions of GCC generate DWARF data that ctfconvert cannot process, causing it to error out. This is currently preventing qemu from being able to successfully generate ctf data (object files containing VLAs have to be manually skipped).

Specifically, ctfconvert dies looking up the value of the DW_TAG_subrange_type tag (essentially, the array dimensions). gcc generates (at least in some instances) a tag that is has a REF form/class (essentially a pointer to instructions to read the value off the stack of a running instance) instead of a constant class (i.e. immediate value), which causes die_unsigned() to fail in usr/src/tools/ctf/convert/dwarf.c (even when the value isn't required).

The fix is to treat an unsupported form/class the same as if the tag doesn't exist (use the value of the 'req' parameter to die_unsigned() to determine if we merely return 0 or abort.

Actions #1

Updated by Rich Lowe over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

Resolved in r13744 commit:18167dc65232

Actions

Also available in: Atom PDF