[PATCH] Initial DWARF64 support for .debug_line

Ed Maste emaste at freebsd.org
Mon Oct 21 11:55:03 PDT 2013


  I compiled the existing dwarfdump-inl-test.cc for FreeBSD mips64:

  % g++ --version
  g++ (GCC) 4.2.1 20070831 patched [FreeBSD]
  Copyright (C) 2007 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  % g++ -g dwarfdump-inl-test.cc -o dwarfdump-inl-test.freebsd-elf-mips64

  current state:
  ```
  % bin/llvm-dwarfdump --debug-dump=line dwarfdump-inl-test.freebsd-elf-mips64
  dwarfdump-inl-test.freebsd-elf-mips64:  file format ELF64-unknown


  .debug_line contents:
  %
  ```
  with this patch:
  ```
  % bin/llvm-dwarfdump --debug-dump=line dwarfdump-inl-test.freebsd-elf-mips64
  dwarfdump-inl-test.freebsd-elf-mips64:  file format ELF64-unknown


  .debug_line contents:
  Line table prologue:
     total_length: 0x00000212
          version: 2
  prologue_length: 0x000001ab
  min_inst_length: 1
  default_is_stmt: 1
        line_base: -5
       line_range: 14
      opcode_base: 13
  ...
  ```

  this only outputs the first CompileUnit though, perhaps because the parsing fails in another section in DWARFContext::parseCompileUnits().  Is it reasonable to add this dwarfdump-inl-test.freebsd-elf-mips64 binary and a basic test, fleshing it out when DWARF64 parsing for other sections is added?

  (the test file is 15638 bytes -- larger than the clang-compiled version, due to the lack of -gline-tables-only)

http://llvm-reviews.chandlerc.com/D1988



More information about the llvm-commits mailing list