5 def __init__(self
, f
, ctrl
=None):
9 def add_line(self
, addr
, line
):
10 line
= ("%08x " % addr
) + line
.indent
+ line
.render() + "\n"
12 if self
.ctrl
and self
.cnt
% 256 == 0:
13 self
.ctrl
.show_status("Writing: 0x%x" % addr
)
16 def write_func(APP
, addr
, prefix
="", feedback_obj
=None):
17 func
= APP
.aspace
.lookup_func(addr
)
19 funcname
= APP
.aspace
.get_label(func
.start
)
20 outfile
= prefix
+ funcname
+ ".lst"
21 with
open(outfile
, "w") as f
:
22 model
= TextSaveModel(f
, feedback_obj
)
23 for start
, end
in func
.get_ranges():
25 start
= engine
.render_from(model
, start
, 1)