File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed
Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1- chbversion : str = "0.3.0-20250826 "
1+ chbversion : str = "0.3.0-20250902 "
Original file line number Diff line number Diff line change @@ -221,7 +221,8 @@ def disassemble(
221221 collectdiagnostics : bool = True ,
222222 preamble_cutoff : int = 12 ,
223223 save_asm : str = "yes" ,
224- save_asm_cfg_info : bool = False ) -> None :
224+ save_asm_cfg_info : bool = False ,
225+ print_datasections : List [str ] = []) -> None :
225226 cwd = os .getcwd ()
226227 chklogger .logger .debug ("change directory to %s" , self .path )
227228 os .chdir (self .path ) # temporary change in directory
@@ -258,6 +259,8 @@ def disassemble(
258259 cmd .extend (["-so_library" , s ])
259260 for ifile in self .ifilenames :
260261 cmd .extend (["-ifile" , ifile ])
262+ for ds in print_datasections :
263+ cmd .extend (["-print_datasection" , ds ])
261264 if save_xml :
262265 cmd .append ("-save_disassembly_status_in_xml" )
263266 cmd .extend (["-disassemble" , self .filename ])
Original file line number Diff line number Diff line change @@ -482,6 +482,11 @@ def parse() -> argparse.Namespace:
482482 + "listed in the userdata function entry points" ),
483483 nargs = "*" ,
484484 default = [])
485+ analyzecmd .add_argument (
486+ "--print_datasections" ,
487+ nargs = "*" ,
488+ default = [],
489+ help = "names or addresses of data sections to be included in assembly listing" )
485490 analyzecmd .add_argument (
486491 "--gc_compact" ,
487492 type = int ,
Original file line number Diff line number Diff line change @@ -399,6 +399,7 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn:
399399 failonfunctionfailure : bool = args .fail_on_function_failure
400400 save_asm : bool = args .save_asm
401401 save_asm_cfg_info : bool = args .save_asm_cfg_info
402+ print_datasections : List [str ] = args .print_datasections
402403 thumb : List [str ] = args .thumb
403404 preamble_cutoff : int = args .preamble_cutoff
404405 iterations : int = args .iterations
@@ -552,7 +553,8 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn:
552553 verbose = verbose ,
553554 collectdiagnostics = collectdiagnostics ,
554555 preamble_cutoff = preamble_cutoff ,
555- save_asm_cfg_info = save_asm_cfg_info )
556+ save_asm_cfg_info = save_asm_cfg_info ,
557+ print_datasections = print_datasections )
556558 except subprocess .CalledProcessError as e :
557559 print_error (str (e .output ))
558560 print_error (str (e ))
You can’t perform that action at this time.
0 commit comments