]> Cypherpunks repositories - gostls13.git/commit
debug/dwarf: add unit tests for line table reader
authorAustin Clements <austin@google.com>
Fri, 6 Mar 2015 18:26:04 +0000 (13:26 -0500)
committerAustin Clements <austin@google.com>
Tue, 10 Mar 2015 02:32:48 +0000 (02:32 +0000)
commitfdd49d2be02fa62ecbf547e4224663b562077425
tree278f9f6a674c09409a6259c72afd09b2de6e2b70
parent339300926774c9e4868a04d1362c98b19706c7d1
debug/dwarf: add unit tests for line table reader

This adds simple ELF test binaries generated by gcc and clang and
compares the line tables returned by the line table reader against
tables based on the output of readelf.

The binaries were generated with
    # gcc --version | head -n1
    gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
    # gcc -g -o line-gcc.elf line*.c

    # clang --version | head -n1
    Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
    # clang -g -o line-clang.elf line*.c

Change-Id: Id210fdc1d007ac9719e8f5dc845f2b94eed12234
Reviewed-on: https://go-review.googlesource.com/7070
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/debug/dwarf/line_test.go [new file with mode: 0644]
src/debug/dwarf/testdata/line-clang.elf [new file with mode: 0755]
src/debug/dwarf/testdata/line-gcc.elf [new file with mode: 0755]
src/debug/dwarf/testdata/line1.c [new file with mode: 0644]
src/debug/dwarf/testdata/line1.h [new file with mode: 0644]
src/debug/dwarf/testdata/line2.c [new file with mode: 0644]