Project

General

Profile

Actions

Bug #9864

closed

DWARF->CTF enum conversion needs to be careful of sign

Added by John Levon over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-10-03
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Equivalent of https://smartos.org/bugview/OS-7279 but for the old tools

Previously, our enumeration conversion simply used ctf_dwarf_signed(DW_AT_const_value. However, with newer GCC versions, this will produce - for example - -32768 when the real enum value is 32768.

Instead, we should check ctf_dwarf_unsigned() first - this fails for negative-valued enums, so we will end up with the right value whether it's positive or negative.


Related issues

Related to illumos gate - Feature #9996: use GCC 7 as default primary compilerClosedJohn Levon2018-11-21

Actions
Actions

Also available in: Atom PDF