Fixup error on empty .debug_pubtypes section (#215)
authorVasily E <laer.18@gmail.com>
Thu, 31 Jan 2019 14:17:14 +0000 (17:17 +0300)
committerEli Bendersky <eliben@users.noreply.github.com>
Thu, 31 Jan 2019 14:17:14 +0000 (06:17 -0800)
commiteeba82a4d41c2994eede5815abeb7ea78ac525e4
treea82862ab62b83d73da292bc0fd11792c2bb2c9b0
parent41c9c50198f9714b39cbdbb1dee64f0a9d237601
Fixup error on empty .debug_pubtypes section (#215)

* tox: explicitly set locale

Locale affects GNU binutils output translation which cause
run_readelf_tests.py to fail if system language is not English.

Signed-off-by: Efimov Vasily <real@ispras.ru>
* test: unittest reproducing error with empty ".debug_pubtypes" section

Signed-off-by: Efimov Vasily <real@ispras.ru>
* NameLUT: use `construct.If` to declare "name" field

This patch also fixes problem with empty first entry.

Signed-off-by: Efimov Vasily <real@ispras.ru>
* NameLUT._get_entries: remove unused `bytes_read`

Signed-off-by: Efimov Vasily <real@ispras.ru>
elftools/dwarf/namelut.py
test/test_pubtypes.py [new file with mode: 0644]
test/testfiles_for_unittests/empty_pubtypes/Makefile [new file with mode: 0644]
test/testfiles_for_unittests/empty_pubtypes/main [new file with mode: 0755]
test/testfiles_for_unittests/empty_pubtypes/main.c [new file with mode: 0644]
tox.ini