From: Nick Alcock Date: Thu, 23 Jan 2014 23:21:24 +0000 (+0000) Subject: ctf: handle structure and union offsets in form DW_FORM_data1 X-Git-Tag: v4.1.12-92~313^2~47 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e7ae809f46c8a7d6fd40898db98cd7671961337b;p=users%2Fjedix%2Flinux-maple.git ctf: handle structure and union offsets in form DW_FORM_data1 GCC 4.8.0 and above have started to represent structure member offsets in the DW_AT_data_member_location attribute using DWARF forms DW_FORM_data1 and _data2 where possible: indeed, this is the common case, as most structure members are less than 64K into the structure: and every structure contains at least one member whose offset is represented this way. dwarf2ctf neglected to check for DW_FORM_data1, so the build failed when it hit the first structure in the kernel and realised that it didn't understand its offset. Fix trivial. Orabug: 18117464 Signed-off-by: Nick Alcock Reviewed-by: Chuck Anderson --- diff --git a/scripts/dwarf2ctf/dwarf2ctf.c b/scripts/dwarf2ctf/dwarf2ctf.c index 3f1d41ef0dfd..445728cd9d45 100644 --- a/scripts/dwarf2ctf/dwarf2ctf.c +++ b/scripts/dwarf2ctf/dwarf2ctf.c @@ -3105,6 +3105,7 @@ static ctf_id_t assemble_ctf_su_member(const char *module_name, dwarf_attr(die, DW_AT_data_member_location, &location_attr); switch (dwarf_whatform(&location_attr)) { + case DW_FORM_data1: case DW_FORM_data2: case DW_FORM_data4: case DW_FORM_data8: