summaryrefslogtreecommitdiff
path: root/rda/unix/thread-db.c
diff options
context:
space:
mode:
Diffstat (limited to 'rda/unix/thread-db.c')
-rw-r--r--rda/unix/thread-db.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rda/unix/thread-db.c b/rda/unix/thread-db.c
index b33608c95bf..4e4af7b2ca0 100644
--- a/rda/unix/thread-db.c
+++ b/rda/unix/thread-db.c
@@ -2221,6 +2221,10 @@ thread_db_get_thread_reg (struct gdbserv *serv,
GREGSET_T gregset;
td_err_e ret;
+ /* Initialize reg to 0 in the event that we return early due to a
+ register being unsupported. */
+ gdbserv_ulonglong_to_reg (serv, 0LL, reg);
+
if (thread == NULL)
thread = process->event_thread; /* Default to the event thread. */
@@ -2359,10 +2363,6 @@ thread_db_set_thread_reg (struct gdbserv *serv,
GREGSET_T gregset;
td_err_e ret;
- /* Initialize reg to 0 in the event that we return early due to a
- register being unsupported. */
- gdbserv_ulonglong_to_reg (serv, 0LL, reg);
-
if (thread == NULL)
thread = process->event_thread; /* Default to the event thread. */