diff --git a/chb/app/CHVersion.py b/chb/app/CHVersion.py index f7b0a210..a3250784 100644 --- a/chb/app/CHVersion.py +++ b/chb/app/CHVersion.py @@ -1 +1 @@ -chbversion: str = "0.3.0-20250826" +chbversion: str = "0.3.0-20250902" diff --git a/chb/cmdline/AnalysisManager.py b/chb/cmdline/AnalysisManager.py index 8a2fd65b..cd70751f 100644 --- a/chb/cmdline/AnalysisManager.py +++ b/chb/cmdline/AnalysisManager.py @@ -221,7 +221,8 @@ def disassemble( collectdiagnostics: bool = True, preamble_cutoff: int = 12, save_asm: str = "yes", - save_asm_cfg_info: bool = False) -> None: + save_asm_cfg_info: bool = False, + print_datasections: List[str] = []) -> None: cwd = os.getcwd() chklogger.logger.debug("change directory to %s", self.path) os.chdir(self.path) # temporary change in directory @@ -258,6 +259,8 @@ def disassemble( cmd.extend(["-so_library", s]) for ifile in self.ifilenames: cmd.extend(["-ifile", ifile]) + for ds in print_datasections: + cmd.extend(["-print_datasection", ds]) if save_xml: cmd.append("-save_disassembly_status_in_xml") cmd.extend(["-disassemble", self.filename]) diff --git a/chb/cmdline/chkx b/chb/cmdline/chkx index c17b7e29..f9095d9f 100755 --- a/chb/cmdline/chkx +++ b/chb/cmdline/chkx @@ -482,6 +482,11 @@ def parse() -> argparse.Namespace: + "listed in the userdata function entry points"), nargs="*", default=[]) + analyzecmd.add_argument( + "--print_datasections", + nargs="*", + default=[], + help="names or addresses of data sections to be included in assembly listing") analyzecmd.add_argument( "--gc_compact", type=int, diff --git a/chb/cmdline/commandutil.py b/chb/cmdline/commandutil.py index c49da187..9d9dec60 100644 --- a/chb/cmdline/commandutil.py +++ b/chb/cmdline/commandutil.py @@ -399,6 +399,7 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn: failonfunctionfailure: bool = args.fail_on_function_failure save_asm: bool = args.save_asm save_asm_cfg_info: bool = args.save_asm_cfg_info + print_datasections: List[str] = args.print_datasections thumb: List[str] = args.thumb preamble_cutoff: int = args.preamble_cutoff iterations: int = args.iterations @@ -552,7 +553,8 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn: verbose=verbose, collectdiagnostics=collectdiagnostics, preamble_cutoff=preamble_cutoff, - save_asm_cfg_info=save_asm_cfg_info) + save_asm_cfg_info=save_asm_cfg_info, + print_datasections=print_datasections) except subprocess.CalledProcessError as e: print_error(str(e.output)) print_error(str(e))