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
7 changes: 7 additions & 0 deletions chb/app/AppResultMetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ def fns_included(self) -> List[str]:
else:
return addrs.split(",")

@property
def include_callees(self) -> bool:
incnode = self.xnode.find("fns-included")
if incnode is None:
return False
return (incnode.get("include-callees", "no") == "yes")

@property
def fns_excluded(self) -> List[str]:
excnode = self.xnode.find("fns-excluded")
Expand Down
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-20260527"
chbversion: str = "0.3.0-20260603"

minimum_required_chb_version = "0.6.0_20260527"
23 changes: 16 additions & 7 deletions chb/cmdline/relationalcmds.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 @@ -275,17 +275,25 @@ def relational_prepare_command(args: argparse.Namespace) -> NoReturn:
# Determine functions analyzed in original binary
fns_include: List[str] = []
fns_exclude: List[str] = []
include_callees: bool = False
app1 = UC.get_app(path1, xfile1, xinfo1)
stats1 = app1.result_metrics
fncount1 = stats1.function_count
if len(stats1.fns_included) > 0:
fns_include = stats1.fns_included
UC.print_status_update(
"Only analyzing "
+ str(len(fns_include))
+ " out of "
+ str(fncount1)
+ " functions")
include_callees = stats1.include_callees
if include_callees:
UC.print_status_update(
"Analyzing "
+ str(len(fns_include))
+ " functions and their callees")
else:
UC.print_status_update(
"Only analyzing "
+ str(len(fns_include))
+ " out of "
+ str(fncount1)
+ " functions")
elif len(stats1.fns_excluded) > 0:
fns_exclude = stats1.fns_excluded
UC.print_status_update(
Expand All @@ -306,6 +314,7 @@ def relational_prepare_command(args: argparse.Namespace) -> NoReturn:
ifilenames=ifilenames,
fns_include=fns_include,
fns_exclude=fns_exclude,
fns_include_callees=include_callees,
use_ssa=xssa,
thumb=xcomparison.is_thumb)

Expand Down
12 changes: 12 additions & 0 deletions chb/invariants/VConstantValueVariable.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,18 @@ def call_target(self) -> CallTarget:
else:
raise UF.CHBError("Side-effect value does not have a call target.")

def to_json_result(self) -> JSONResult:
content: Dict[str, Any] = {}
content["kind"] = "se"
content["callsite"] = self.callsite
if self.has_call_target():
content["calltarget"] = str(self.call_target())
else:
content["calltarget"] = "none"
content["description"] = self.argument_desc
content["txtrep"] = self.__str__()
return JSONResult("auxvariable", content, "ok")

def __str__(self) -> str:
if self.has_call_target():
return 'se_' + str(self.call_target()) + '_' + self.argument_desc
Expand Down