Project

General

Profile

Feature #12226

libctf needs to handle DW_AT_count based array sizing

Added by Robert Mustacchi about 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

There are two different ways to emit array sizes in dwarf. Clang opts to use the DW_AT_count field to indicate the number of entries that are in the array as opposed to gcc which uses an upper bound attribute. We should support this so we can properly convert and process clang arrays.

#1

Updated by Electric Monk 10 months ago

  • Gerrit CR set to 328
#2

Updated by Robert Mustacchi 9 months ago

This was tested by using the ctf test suite and verifying that it was clean for gcc 4.4.4, 7, and 8. In addition with the test suite improvements that exist for clang, clang8, clang9, and clang10 are all in similar shape with everything passing excepting existing bugs in clang's dwarf generation. I also diffed all the CTF across this change that was generated in the build and it didn't change excepting a small bit in libctf.

#3

Updated by Electric Monk 9 months ago

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

git commit 11551c95ce2b1db0e052ae7a25787421afdef4da

commit  11551c95ce2b1db0e052ae7a25787421afdef4da
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-07-30T18:35:47.000Z

    12226 libctf needs to handle DW_AT_count based array sizing
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Jason King <jason.king@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF