diff options
author | Pedro Alves <pedro@palves.net> | 2022-03-07 16:09:41 +0000 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2022-03-07 16:28:57 +0000 |
commit | 3db1354160aa48995ff37f032310213f0b1cf768 (patch) | |
tree | 90da7735fd22d33eeab42b7b56a3780c15a4d74a | |
parent | aacf24b4db3422632d6b62d473faf71f4e737072 (diff) | |
download | gdb-3db1354160aa48995ff37f032310213f0b1cf768.zip gdb-3db1354160aa48995ff37f032310213f0b1cf768.tar.gz gdb-3db1354160aa48995ff37f032310213f0b1cf768.tar.bz2 |
Remove unnecessary inferior lookup in infrun:handle_one
infrun.c:handle_one calls find_inferior_ptid unnecessarily, since we
already have a thread pointer handy, and the thread has a pointer to
the inferior. This commit removes the unnecessary lookup.
Change-Id: I2ae18601dd75346c6c91068e9a4f9a6484fb3339
-rw-r--r-- | gdb/infrun.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 85d8404..e3c1db7 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4845,8 +4845,7 @@ handle_one (const wait_one_event &event) /* This may be the first time we see the inferior report a stop. */ - inferior *inf = find_inferior_ptid (event.target, event.ptid); - if (inf->needs_setup) + if (t->inf->needs_setup) { switch_to_thread_no_regs (t); setup_inferior (0); |