debug_ranges_sec=debug_sections[debug_ranges_sec_name],
debug_line_sec=debug_sections[debug_line_sec_name])
-
def get_machine_arch(self):
""" Return the machine architecture, as detected from the ELF header.
Not all architectures are supported at the moment.
from elftools.elf.elffile import ELFFile
+
class TestRangeLists(unittest.TestCase):
# Test the absence of .debug_ranges section
def test_range_list_absence(self):
self.assertTrue(elffile.has_dwarf_info())
self.assertIsNotNone(elffile.get_dwarf_info().range_lists())
+
if __name__ == '__main__':
unittest.main()
verdaux_iter, ref_verdef['verdaux']):
self.assertEqual(verdaux.name, ref_verdaux['name'])
+
if __name__ == '__main__':
unittest.main()
from elftools.elf.elffile import ELFFile
+
class TestMIPSSupport(unittest.TestCase):
def test_hello(self):
with open(os.path.join('test', 'testfiles_for_unittests',
self.assertEqual(elf.num_sections(), 25)
self.assertEqual(elf.num_segments(), 0)
+
if __name__ == '__main__':
unittest.main()