Skip to content

Commit

Permalink
Fix calculation and check result of gum_stalker_run_on_thread_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 23, 2022
1 parent 699fc4e commit ed24121
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gum/backend-linux/gumprocess-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,11 @@ _gum_process_enumerate_threads (GumFoundThreadFunc func,

if (gum_thread_read_state (details.id, &details.state))
{
gum_stalker_run_on_thread_sync (stalker, details.id, gum_store_context,
&details);
carry_on = func (&details, user_data);
if (gum_stalker_run_on_thread_sync (stalker, details.id,
gum_store_context, &details))
{
carry_on = func (&details, user_data);
}
}

g_free (thread_name);
Expand Down Expand Up @@ -751,7 +753,7 @@ gum_store_user_time (guint64 * user_time)
if (getrusage(RUSAGE_THREAD, &usage) == 0)
{
result = usage.ru_utime.tv_sec;
result *= 100000;
result *= 1000000;
result += usage.ru_utime.tv_usec;
}
#endif
Expand Down

0 comments on commit ed24121

Please sign in to comment.