beehive-lab / mambo

A low-overhead dynamic binary instrumentation and modification tool for ARM (both AArch32 and AArch64 support) and RISC-V (RV64GC).
Apache License 2.0
318 stars 69 forks source link

Add parent TID to dbm_thread #114

Closed AlphaDaze closed 6 months ago

AlphaDaze commented 6 months ago

Add a parent_tid to the dbm_thread structure. This value will be NULL for the initial thread.

There is currently no easy way to link a parent thread and child thread within a plugin.

This is useful for finding events for when a parent creates a child and when the child joins back. For example if Thread1 and Thread2 create a new thread each simultaneously, which new thread belongs to which parent?

IgWod commented 6 months ago

Thank you for your pull request!

The change looks good to me. There isn't really anything controversial about it and it looks like a useful thing to have.

@jkressel are you happy with it?

jkressel commented 6 months ago

@IgWod It looks good to me - useful functionality and doesn't seem to cause any issues. @AlphaDaze thank you for the PR!