Skip to content

Commit ba873ed

Browse files
committed
Run :ies only on app classes
1 parent e7ba497 commit ba873ed

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/agent/lib/info/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,18 @@ export function listEntrypointSymbols(args: string[]): string {
234234
const classes = ObjC.classes;
235235
Object.keys(classes).forEach(function (className: string) {
236236
var cls = ObjC.classes[className];
237+
if (cls.$moduleName !== null && cls.$moduleName !== "main") {
238+
return;
239+
}
237240
var methods = cls.$methods; // $ownMethods?
238241
methods.forEach(function (methodName) {
239242
try {
240243
var address = cls[methodName].implementation; // Get the implementation address
241-
console.log(" Method: " + methodName + " | Address: " + address);
242244
if (validEntrypoints.includes(methodName)) {
243245
symbols.push({ name: className + "." + methodName, address: address });
244246
}
245247
} catch (e) {
246-
console.error(" [Error getting implementation address for method " + methodName + "]: " + e);
248+
// ignored console.error(" [Error getting implementation address for method " + methodName + "]: " + e);
247249
}
248250
});
249251
});
@@ -253,8 +255,8 @@ export function listEntrypointSymbols(args: string[]): string {
253255
return "";
254256
}
255257
const entries = symbols
256-
.map((entry) => {
257-
return 'f entry.' + entry.name + ' = ' + entry.address;
258+
.map((symbol) => {
259+
return 'f entry.' + symbol.name + ' = ' + symbol.address;
258260
}).join('\n');
259261
return "fs+symbols\n" + entries + "\nfs-";
260262
}

0 commit comments

Comments
 (0)