Skip to content

Set breakpoints in libsystem_kernel.#52

Open
bwelling wants to merge 1 commit intoMic92:mainfrom
bwelling:breakpoint
Open

Set breakpoints in libsystem_kernel.#52
bwelling wants to merge 1 commit intoMic92:mainfrom
bwelling:breakpoint

Conversation

@bwelling
Copy link
Copy Markdown

@bwelling bwelling commented Mar 3, 2026

Explicitly specify the "libsystem_kernel.dylib" module when setting breakpoints. Without this, setting breakpoints by name for each syscall will end up creating a breakpoint for any method with the same name as the syscall, which can be pretty common.

For example, in a C++ program I was testing, the runtimes were:
no strace - 0.1 seconds
strace with this patch - 20 seconds
strace without this patch - 250 seconds

This was because there were thousands of calls to a method named link(), which was not the link(2) syscall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant