Skip to content

Commit

Permalink
Remove gum_stalker_is_run_on_thread_supported
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 19, 2023
1 parent 765c0b3 commit 759a25d
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 53 deletions.
7 changes: 0 additions & 7 deletions gum/backend-arm/gumstalker-arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6213,13 +6213,6 @@ gum_count_trailing_zeros (guint16 value)

#endif


gboolean
gum_stalker_is_run_on_thread_supported (void)
{
return TRUE;
}

gboolean
gum_stalker_run_on_thread (GumStalker * self,
GumThreadId thread_id,
Expand Down
6 changes: 0 additions & 6 deletions gum/backend-arm64/gumstalker-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -5898,12 +5898,6 @@ gum_is_bl_imm (guint32 insn)

#endif

gboolean
gum_stalker_is_run_on_thread_supported (void)
{
return TRUE;
}

gboolean
gum_stalker_run_on_thread (GumStalker * self,
GumThreadId thread_id,
Expand Down
6 changes: 0 additions & 6 deletions gum/backend-mips/gumstalker-mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,6 @@ gum_stalker_iterator_put_callout (GumStalkerIterator * self,
{
}

gboolean
gum_stalker_is_run_on_thread_supported (void)
{
return FALSE;
}

gboolean
gum_stalker_run_on_thread (GumStalker * self,
GumThreadId thread_id,
Expand Down
6 changes: 0 additions & 6 deletions gum/backend-x86/gumstalker-x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -6654,12 +6654,6 @@ gum_store_thread_exit_match (GumAddress address,

#endif

gboolean
gum_stalker_is_run_on_thread_supported (void)
{
return TRUE;
}

gboolean
gum_stalker_run_on_thread (GumStalker * self,
GumThreadId thread_id,
Expand Down
5 changes: 0 additions & 5 deletions gum/gumstalker.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,6 @@ gum_stalker_run_on_thread_sync (GumStalker * self,
{
RunOnThreadSyncCtx ctx;

if (!gum_stalker_is_run_on_thread_supported ())
{
return FALSE;
}

if (gum_process_get_current_thread_id () == thread_id)
{
return gum_stalker_run_on_thread (self, thread_id, func, user_data);
Expand Down
2 changes: 0 additions & 2 deletions gum/gumstalker.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ GUM_API void gum_stalker_observer_switch_callback (
GumStalkerObserver * observer, gpointer from_address,
gpointer start_address, gpointer from_insn, gpointer * target);

GUM_API gboolean gum_stalker_is_run_on_thread_supported (void);

GUM_API gboolean gum_stalker_run_on_thread (GumStalker * self,
GumThreadId thread_id, GumStalkerRunOnThreadFunc func, gpointer user_data);

Expand Down
7 changes: 0 additions & 7 deletions tests/core/arch-arm/stalker-arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ TESTLIST_BEGIN (stalker)
TESTENTRY (prefetch)
#endif
TESTGROUP_BEGIN ("RunOnThread")
TESTENTRY (run_on_thread_support)
TESTENTRY (run_on_thread_current)
TESTENTRY (run_on_thread_current_sync)
TESTENTRY (run_on_thread_other)
Expand Down Expand Up @@ -3803,12 +3802,6 @@ prefetch_read_blocks (int fd,

#endif

TESTCASE (run_on_thread_support)
{
gboolean supported = gum_stalker_is_run_on_thread_supported ();
g_assert_true (supported);
}

TESTCASE (run_on_thread_current)
{
GumThreadId thread_id = gum_process_get_current_thread_id ();
Expand Down
7 changes: 0 additions & 7 deletions tests/core/arch-arm64/stalker-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ TESTLIST_BEGIN (stalker)
TESTENTRY (observer)
#endif
TESTGROUP_BEGIN ("RunOnThread")
TESTENTRY (run_on_thread_support)
TESTENTRY (run_on_thread_current)
TESTENTRY (run_on_thread_current_sync)
TESTENTRY (run_on_thread_other)
Expand Down Expand Up @@ -2421,12 +2420,6 @@ gum_test_stalker_observer_increment_total (GumStalkerObserver * observer)

#endif

TESTCASE (run_on_thread_support)
{
gboolean supported = gum_stalker_is_run_on_thread_supported ();
g_assert_true (supported);
}

TESTCASE (run_on_thread_current)
{
GumThreadId thread_id = gum_process_get_current_thread_id ();
Expand Down
7 changes: 0 additions & 7 deletions tests/core/arch-x86/stalker-x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ TESTLIST_BEGIN (stalker)
TESTGROUP_END ()
#endif
TESTGROUP_BEGIN ("RunOnThread")
TESTENTRY (run_on_thread_support)
TESTENTRY (run_on_thread_current)
TESTENTRY (run_on_thread_current_sync)
TESTENTRY (run_on_thread_other)
Expand Down Expand Up @@ -3512,12 +3511,6 @@ test_check_followed (void)

#endif

TESTCASE (run_on_thread_support)
{
gboolean supported = gum_stalker_is_run_on_thread_supported ();
g_assert_true (supported);
}

TESTCASE (run_on_thread_current)
{
GumThreadId thread_id = gum_process_get_current_thread_id ();
Expand Down

0 comments on commit 759a25d

Please sign in to comment.