sidecar
sidecar copied to clipboard
After using sidecar to generate agent, Error loses source information
Link to test code: https://github.com/binsee/sidecar-ts-test
test for frida cli
binsee@bogon ~/CodeWork/test-sidecar main ± npm run cli
> [email protected] cli
> npm run cli:namespace
> [email protected] cli:namespace
> npm run build:namespace && frida node2 -l src/init-agent-script.js
> [email protected] build:namespace
> frida-compile -t tsconfig-agent.json src/agent/mod.ts -o src/init-agent-script.js -s demo
____
/ _ | Frida 15.1.17 - A world-class dynamic instrumentation toolkit
| (_| |
> _ | Commands:
/_/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://frida.re/docs/home/
. . . .
. . . . Connected to Local System (id=local)
Attaching...
Hello Tom!
[Local::node2 ]->
[Local::node2 ]-> demo.error()
error(): test error Error: test error
at error (src/agent/mod.ts:25)
at <eval> (<input>:1)
at eval (native)
at fridaEvaluate (/init-agent-script.js:56)
at apply (native)
at <anonymous> (frida/runtime/message-dispatcher.js:13)
at c (frida/runtime/message-dispatcher.js:23)
[Local::node2 ]->
at error (src/agent/mod.ts:25)
test for sidecar
✘ binsee@bogon ~/CodeWork/test-sidecar main ± npm run start:dev
> [email protected] start:dev
> npm run build && npm run start:run
> [email protected] build
> npm run build:namespace
> [email protected] build:namespace
> frida-compile -t tsconfig-agent.json src/agent/mod.ts -o src/init-agent-script.js -s demo
> [email protected] start:run
> cross-env BROLOG_LEVEL=info NODE_OPTIONS="--no-warnings --loader=ts-node/esm" node src/demo/main.ts
Hello Tom!
get Name: Tom
output() arg: hello world
Recv Hook [sayCallback]: 742593816 Tom say: hello world
error(): test error Error: test error
at error (/script1.js:252)
at __sidecar__error_Function_wrapper (/script1.js:338)
at apply (native)
at <anonymous> (frida/runtime/message-dispatcher.js:13)
at c (frida/runtime/message-dispatcher.js:23)
at error (/script1.js:252)
Link to https://github.com/huan/sidecar/issues/33