aboutsummaryrefslogtreecommitdiff
path: root/gdb/aix-thread.c
diff options
context:
space:
mode:
authorAditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>2023-12-01 01:43:04 -0600
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2023-12-01 11:09:39 +0100
commitd7ac0027a4419b85cd6db4c6fc84d287e34f84a9 (patch)
tree4f0386a04c56bd78c94d9f5d3b159c938271f006 /gdb/aix-thread.c
parent1089d2017c71f9bca6e0135a7a59700274d7cfaa (diff)
downloadgdb-d7ac0027a4419b85cd6db4c6fc84d287e34f84a9.zip
gdb-d7ac0027a4419b85cd6db4c6fc84d287e34f84a9.tar.gz
gdb-d7ac0027a4419b85cd6db4c6fc84d287e34f84a9.tar.bz2
Remove unnecessary returns and unused variables in AIX.
This is a patch to simplify the pd_activate () in aix-thread.c incase of a failure to start a thread session , since pd_activate () now has return type void. Also this patch fixes the shadow declarartion warning in sync-threadlists.
Diffstat (limited to 'gdb/aix-thread.c')
-rw-r--r--gdb/aix-thread.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index c8147de..3eb8f57 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -829,7 +829,6 @@ sync_threadlists (pid_t pid)
pthread_t pthid;
pthdb_tid_t tid;
process_stratum_target *proc_target = current_inferior ()->process_target ();
- thread_info *tp;
struct aix_thread_variables *data;
data = get_thread_data_helper_for_pid (pid);
@@ -931,7 +930,7 @@ sync_threadlists (pid_t pid)
if (gptid.is_pid ())
{
- tp = proc_target->find_thread (gptid);
+ thread_info *tp = proc_target->find_thread (gptid);
thread_change_ptid (proc_target, gptid, pptid);
aix_thread_info *priv = new aix_thread_info;
priv->pdtid = pbuf[pi].pdtid;
@@ -1027,12 +1026,8 @@ pd_activate (pid_t pid)
status = pthdb_session_init (pid, data->arch64 ? PEM_64BIT : PEM_32BIT,
PTHDB_FLAG_REGS, &pd_callbacks,
&data->pd_session);
- if (status != PTHDB_SUCCESS)
- {
- return ptid_t (pid);
- }
- data->pd_active = 1;
- return;
+ if (status == PTHDB_SUCCESS)
+ data->pd_active = 1;
}
/* AIX implementation of update_thread_list. */
@@ -1746,7 +1741,6 @@ store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
uint64_t int64;
struct aix_thread_variables *data;
data = get_thread_data_helper_for_ptid (inferior_ptid);
- int ret;
__vmx_context_t vmx;
__vsx_context_t vsx;