Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chb/app/CHVersion.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
chbversion: str = "0.3.0-20250826"
chbversion: str = "0.3.0-20250902"
5 changes: 4 additions & 1 deletion chb/cmdline/AnalysisManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
Expand Down
5 changes: 5 additions & 0 deletions chb/cmdline/chkx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion chb/cmdline/commandutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down