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,3 +1,3 @@
chbversion: str = "0.3.0-20260617"
chbversion: str = "0.3.0-20260619"

minimum_required_chb_version = "0.6.0_20260617"
3 changes: 2 additions & 1 deletion chb/app/Function.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2021-2025 Aarno Labs LLC
# Copyright (c) 2021-2026 Aarno Labs LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -622,6 +622,7 @@ def to_string(
opcodewidth: int = 25, # alignment width for opcode text
sp: bool = True,
proofobligations: bool = False,
formatstrings: bool = False,
typingrules: bool = False,
stacklayout: bool = False) -> str:
...
Expand Down
17 changes: 16 additions & 1 deletion chb/arm/ARMFunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2021-2025 Aarno Labs LLC
# Copyright (c) 2021-2026 Aarno Labs LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -294,6 +294,7 @@ def to_string(
opcodewidth: int = 40,
sp: bool = True,
proofobligations: bool = False,
formatstrings: bool = False,
typingrules: bool = False,
stacklayout: bool = False) -> str:
lines: List[str] = []
Expand All @@ -304,6 +305,20 @@ def to_string(
if proofobligations:
lines.append(str(self.proofobligations))
lines.append(".~" * 40)
if formatstrings:
fmtstrings = self.formatstrings.items()
if len(fmtstrings) > 0:
lines.append("Format strings:")
for (iaddr, (s, fmtspec)) in fmtstrings:
lines.append(
" "
+ iaddr
+ ": fmtstring: "
+ s
+ " (spec: "
+ str(fmtspec)
+ ")")
lines.append(".~" * 40)
for b in sorted(self.blocks):
lines.append(
self.blocks[b].to_string(
Expand Down
8 changes: 8 additions & 0 deletions chb/cmdline/chkx
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,10 @@ def parse() -> argparse.Namespace:
"--proofobligations",
action="store_true",
help="include proofobligations at the top of the function")
resultsfunctions.add_argument(
"--formatstrings",
action="store_true",
help="include format strings at the top of the function")
resultsfunctions.add_argument(
"--loglevel", "-log",
choices=UL.LogLevel.options(),
Expand Down Expand Up @@ -990,6 +994,10 @@ def parse() -> argparse.Namespace:
"--proofobligations",
action="store_true",
help="include proofobligations at the top of the function")
resultsfunction.add_argument(
"--formatstrings",
action="store_true",
help="include format strings at the top of the function")
resultsfunction.add_argument(
"--typingrules",
action="store_true",
Expand Down
4 changes: 4 additions & 0 deletions chb/cmdline/commandutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ def results_functions(args: argparse.Namespace) -> NoReturn:
opcodewidth: int = args.opcodewidth
stacklayout: bool = args.stacklayout
proofobligations: bool = args.proofobligations
formatstrings: bool = args.formatstrings
loglevel: str = args.loglevel
logfilename: Optional[str] = args.logfilename
logfilemode: str = args.logfilemode
Expand Down Expand Up @@ -1173,6 +1174,7 @@ def results_functions(args: argparse.Namespace) -> NoReturn:
opcodetxt=True,
opcodewidth=opcodewidth,
proofobligations=proofobligations,
formatstrings=formatstrings,
stacklayout=stacklayout))

except UF.CHBError as e:
Expand Down Expand Up @@ -1202,6 +1204,7 @@ def results_function(args: argparse.Namespace) -> NoReturn:
txtoutput: bool = not xjson
stacklayout: bool = args.stacklayout
proofobligations: bool = args.proofobligations
formatstrings: bool = args.formatstrings
typingrules: bool = args.typingrules
loglevel: str = args.loglevel
logfilename: Optional[str] = args.logfilename
Expand Down Expand Up @@ -1265,6 +1268,7 @@ def results_function(args: argparse.Namespace) -> NoReturn:
sp=True,
opcodetxt=True,
proofobligations=proofobligations,
formatstrings=formatstrings,
typingrules=typingrules,
stacklayout=stacklayout,
opcodewidth=opcodewidth))
Expand Down
3 changes: 2 additions & 1 deletion chb/mips/MIPSFunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
# Copyright (c) 2020-2021 Henny Sipma
# Copyright (c) 2021-2025 Aarno Labs LLC
# Copyright (c) 2021-2026 Aarno Labs LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -340,6 +340,7 @@ def to_string(
opcodewidth: int = 25,
sp: bool = True,
proofobligations: bool = False,
formatstrings: bool = False,
typingrules: bool = False,
stacklayout: bool = False) -> str:
lines: List[str] = []
Expand Down
3 changes: 2 additions & 1 deletion chb/pwr/PowerFunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2023-2025 Aarno Labs LLC
# Copyright (c) 2023-2026 Aarno Labs LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -182,6 +182,7 @@ def to_string(
opcodewidth: int = 40,
sp: bool = True,
proofobligations: bool = False,
formatstrings: bool = False,
typingrules: bool = False,
stacklayout: bool = False) -> str:
lines: List[str] = []
Expand Down
3 changes: 2 additions & 1 deletion chb/x86/X86Function.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
# Copyright (c) 2020 Henny Sipma
# Copyright (c) 2021-2025 Aarno Labs, LLC
# Copyright (c) 2021-2026 Aarno Labs, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -439,6 +439,7 @@ def to_string(
opcodewidth: int = 25,
sp: bool = True,
proofobligations: bool = False,
formatstrings: bool = False,
typingrules: bool = False,
stacklayout: bool = False) -> str:
lines: List[str] = []
Expand Down