Expose dwarf constants for debug info generation
This commit is contained in:
parent
d8ffc18ffc
commit
93f8c70d19
4 changed files with 223 additions and 1 deletions
30
test/test_debuginfo.py
Normal file
30
test/test_debuginfo.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import os
|
||||
import unittest
|
||||
|
||||
from llvm.core import *
|
||||
from llvm import _dwarf
|
||||
|
||||
class TestDebugInfo(unittest.TestCase):
|
||||
|
||||
def test_dwarf_constants(self):
|
||||
dwarf_constants = vars(_dwarf)
|
||||
|
||||
# Version numbers
|
||||
self.assertIn("LLVMDebugVersion", dwarf_constants)
|
||||
self.assertIn("DWARF_VERSION", dwarf_constants)
|
||||
|
||||
# Tags
|
||||
self.assertIn("DW_TAG_compile_unit", dwarf_constants)
|
||||
|
||||
# Language identifiers
|
||||
self.assertIn("DW_LANG_Python", dwarf_constants)
|
||||
self.assertIn("DW_LANG_C89", dwarf_constants)
|
||||
self.assertIn("DW_LANG_C99", dwarf_constants)
|
||||
|
||||
# print sorted([constname for constname in dwarf_constants
|
||||
# if constname.startswith("DW_LANG_")])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# TestDebugInfo("test_dwarf_constants").debug()
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue