-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ Support #13
Comments
Hi @nbruns1. There is no specific plans to support C++ applications at the moment. For sure the If you give it a look, I'd be happy to help. |
Here a quick hello world example that is not running :) It produces the following Error:
If we disable the memory_segmentation, then we get:
Is this the expected behavior? Did we overlook something? @RobinDavid |
Thanks! You did it right the issue is on our side. To test I just added to your script: from tritondse.probes.basic_trace import BasicDebugTrace
# in main
executor.cbm.register_probe(BasicDebugTrace())
# in __name__
tritondse.logging.enable(logging.DEBUG,"probe.basictrace") This print the execution trace. We are crashing Indeed we are not handling things correctly, my first guess is that we are no initializing the program context correctly (init, init_array etc) in |
@RobinDavid You’re welcome. Can you please explain how you know that TrintonDSE is crashing at this specific function call? Is there a way to enable the logging of the executed function calls? |
I just followed the various calls and saw that I ended up there. You can quickly create a reverse dict to get symbols associated to an address by manipulating the cle object. Here is a small snippet: reverse_syms = {}
def inst_callback(ex: SymbolicExecutor, ps: ProcessState, ins: 'Instruction'):
addr = ins.getAddress()
if addr in reverse_syms:
print(f"Enter: {reverse_syms[addr]}")
print(f"[tid:{ins.getThreadId()}] {ex.trace_offset} [0x{addr:x}]: {ins.getDisassembly()}")
def main(argv):
p = CleLoader(argv[1])
for sym in p.ld.symbols:
if sym.is_function:
reverse_syms[sym.rebased_addr] = sym.name
# [snip]
executor.cbm.register_pre_instruction_callback(inst_callback)
executor.load(p)
executor.run() This generated me the following trace:
Thus the memory violation seems to be performed by the |
Is it planned to support C++ applications, and what would be needed to develop the support?
The text was updated successfully, but these errors were encountered: