Open ghost opened 3 years ago
The droption docs say that options have to be global variables. Please try with globals.
I exported options out of main functions: (both from front-end and from client side)
static droption_t<std::string> ...
But having the same issue.
I would suggest getting a callstack of the crash point. If it is in droption static constructors it seems odd to depend on the app.
How can I get a callback of the crash point?
How can I get a callback of the crash point?
There is general debugging info in the docs: https://dynamorio.org/page_debugging.html#autotoc_md150
For an early crash like this I would run drrun inside windbg and walk into the child from there; or maybe the first -msgbox_mask 15
point is early enough before the crash to attach there. The symbol loading scripts in the docs may not work at early points: I don't remember if this client init point is before or after that works. But if you walk in from the parent windbg will see dynamorio.dll and you probably don't need custom load commands.
Describe the bug I want to parse arguments send to client dll by a front-end (similar to
drrun.exe
) viadr_register_client
. To do this I'm usingdroption_parser_t
on client side to parse arguments, it works on simple hello worlds apps but have issues with real works apps, for example,notepad++
(64bit) crashes instantly, even if there is no other code thandroption_parser_t::parse_argv
.To Reproduce Steps to reproduce the behavior:
My custom front-end have following code to provide arguments to the client:
If I run my client dll without
droption_t
and just hardcode the two values it works as excepted, no crashes. My guess is that there is an issue how args are provided or how they are parsed{..}/my_front.exe -c ./yourclient.dll -- 'C:\Program Files\Notepad++\notepad++.exe'
Please also answer these questions:
{..}/drrun.exe -- 'C:\Program Files\Notepad++\notepad++.exe'
- Notepad++ runs as expected.drrun
doesn't provide any.Expected behavior Open Notepad++
Versions