Skip to content

Commit 3ffe6bd

Browse files
author
Your Name
committed
Fix spurious names in traces
1 parent 71f7b2f commit 3ffe6bd

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frida-cshell",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "Frida's CShell",
55
"scripts": {
66
"prepare": "npm run build && npm run version && npm run package && npm run copy",

src/traces/trace.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export interface Trace {
77
}
88

99
export class Traces {
10-
private static readonly OFFSET_MAX = 1024;
11-
1210
private static byThreadId: Map<ThreadId, Trace> = new Map<ThreadId, Trace>();
1311

1412
public static has(threadId: ThreadId): boolean {
@@ -43,18 +41,8 @@ export class Traces {
4341
return `${Output.green(prefix.padEnd(40, '.'))} ${Output.yellow(Format.toHexString(address))}`;
4442
}
4543

46-
const lookup = DebugSymbol.fromName(debug.name);
47-
let offset = ptr(0);
48-
if (lookup !== null && lookup.address.compare(debug.address) < 0) {
49-
offset = debug.address.sub(lookup.address);
50-
}
5144
const prefix = debug.moduleName === null ? '' : `${debug.moduleName}!`;
52-
53-
let name = `${prefix}${debug.name}`;
54-
if (offset !== ptr(0) || offset.compare(Traces.OFFSET_MAX) < 0) {
55-
name = `${prefix}${debug.name}+0x${offset.toString(16)}`;
56-
}
57-
45+
const name = `${prefix}${debug.name}`;
5846
const symbol = `${Output.green(name.padEnd(40, '.'))} ${Output.yellow(Format.toHexString(debug.address))}`;
5947
if (debug.fileName !== null && debug.lineNumber !== null) {
6048
if (debug.fileName.length !== 0 && debug.lineNumber !== 0) {

0 commit comments

Comments
 (0)