[all-commits] [llvm/llvm-project] 359fae: [DebugInfo] Explicitly permit addr_size = 0x02 whe...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Mon Jun 22 03:12:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 359fae6eb094e8eacc466b9ce5802563771a3cb9
      https://github.com/llvm/llvm-project/commit/359fae6eb094e8eacc466b9ce5802563771a3cb9
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2020-06-22 (Mon, 22 Jun 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    A llvm/test/DebugInfo/Inputs/dwarfdump-16bit-addr.o
    A llvm/test/DebugInfo/dwarfdump-16bit-addr.test

  Log Message:
  -----------
  [DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data

Current LLVM implementation uses `MCAsmInfo::CodePointerSize` as addr_size when emitting the DWARF data. llvm-dwarfdump, on the other hand, handles `addr_size`s of 4 and 8 properly and considers all other sizes as an error. This works for most of mainline targets except for MSP430 and AVR.

msp430-gcc v8.3.1 emits DWARF32 with addr_size = 4 (DWARF32 does not imply addr_size = 4, 32 refers to internal offset width of 4 bytes) that is handled by llvm-dwarfdump already. Still, emitting 2-byte target pointers on MSP430 seems correct as well (but not for MSP430X that is supported by msp430-gcc but not by LLVM and has 20-bit address space).

This patch make it possible for MSP430 debug info support to be tested with llvm-dwarfdump.

Differential Revision: https://reviews.llvm.org/D82055




More information about the All-commits mailing list