Skip to content

Commit 80b5755

Browse files
committed
More 1516 chasing
1 parent 8289849 commit 80b5755

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

dwex/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from .treedlg import TreeDlg
2020

2121
# Sync with version in setup.py
22-
version = (4, 52)
22+
version = (4, 53)
2323
the_app = None
2424

2525
# TODO:

dwex/tree.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,17 @@ def find(self, start_pos, cond, cu_cond = False):
290290
tb = exc.__traceback__
291291
ctxt = dict()
292292
try:
293+
ctxt['cu_offset'] = cu.cu_offset
294+
ctxt['dwarf_config'] = cu.dwarfinfo.config
295+
abbrev_codes = set(d.abbrev_code for d in cu._dielist if not d.is_null())
296+
at = cu.get_abbrev_table()
297+
format_attr_in_abbrev = lambda a: (a.name, a.form, a.value) if a.value is not None else (a.name, a.form)
298+
format_abbr = lambda ab: (ab.decl.tag, ab._has_children, tuple(format_attr_in_abbrev(a) for a in ab.decl.attr_spec))
299+
ctxt['abbrevs'] = {c: format_abbr(at.get_abbrev(c)) for c in abbrev_codes}
293300
stm = cu.dwarfinfo.debug_info_sec.stream
294301
crash_pos = ctxt['crash_pos'] = stm.tell()
295-
last_die_index = bisect_left(cu._diemap, crash_pos)-1
296-
last_die = ctxt['last_die'] = cu._dielist[last_die_index]
297-
slice = stm.getbuffer()[last_die.offset:crash_pos+1]
298-
ctxt['sec_at_last_die'] = ' '.join("%02x" % b for b in slice)
302+
slice = stm.getbuffer()[cu.cu_offset:crash_pos+1]
303+
ctxt['cu_in_info'] = ' '.join("%02x" % b for b in slice)
299304
except Exception:
300305
pass
301306
report_crash(exc, tb, version, currentframe(), ctxt)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def run(self):
123123

124124
setup(
125125
name='dwex',
126-
version='4.52', # Sync with version in __main__
126+
version='4.53', # Sync with version in __main__
127127
packages=['dwex'],
128128
url="https://github.com/sevaa/dwex/",
129129
entry_points={"gui_scripts": ["dwex = dwex.__main__:main"]},

0 commit comments

Comments
 (0)