Use JSON.stringify for dump args and return (#334)

This commit is contained in:
Ariel Miki Abraham
2020-03-19 18:28:20 +02:00
committed by GitHub
parent 26104a35fa
commit ac40784b7a
+2 -2
View File
@@ -159,7 +159,7 @@ export namespace hooking {
if (dargs && calleeArgTypes.length > 0) {
const argValues: string[] = [];
for (const h of arguments) {
argValues.push((h || "(none)").toString());
argValues.push(JSON.stringify(h || "(none)"));
}
send(
@@ -173,7 +173,7 @@ export namespace hooking {
// dump the return value
if (dret) {
const retValStr: string = (retVal || "(none)").toString();
const retValStr: string = JSON.stringify(retVal || "(none)");
send(c.blackBright(`[${job.identifier}] `) + `Return Value: ${c.red(retValStr)}`);
}