From bd96be989fbdabde94451934b026634fc7721897 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Tue, 16 Aug 2022 06:41:16 -0700 Subject: [PATCH] Remove z.py --- z.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 z.py diff --git a/z.py b/z.py deleted file mode 100644 index 18f7d35..0000000 --- a/z.py +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------------------------------------- -# elftools -# -# Eli Bendersky (eliben@gmail.com) -# This code is in the public domain -#------------------------------------------------------------------------------- - -# Just a script for playing around with pyelftools during testing -# please ignore it! -# -from __future__ import print_function - -import sys, pprint -from elftools.elf.structs import ELFStructs -from elftools.elf.elffile import ELFFile -from elftools.elf.sections import * - -from elftools.elf.relocation import * - - -stream = open('test/testfiles/exe_simple64.elf', 'rb') - -efile = ELFFile(stream) -print('elfclass', efile.elfclass) -print('===> %s sections!' % efile.num_sections()) -print(efile.header) - -dinfo = efile.get_dwarf_info() -from elftools.dwarf.locationlists import LocationLists -from elftools.dwarf.descriptions import describe_DWARF_expr -llists = LocationLists(dinfo.debug_loc_sec.stream, dinfo.structs) -for loclist in llists.iter_location_lists(): - print('----> loclist!') - for li in loclist: - print(li) - print(describe_DWARF_expr(li.loc_expr, dinfo.structs)) - - -- 2.30.2