Don't read agent symbols when disabled
authorChristian Biesinger <cbiesinger@google.com>
Thu, 31 Oct 2019 00:10:13 +0000 (19:10 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Thu, 31 Oct 2019 20:46:01 +0000 (15:46 -0500)
commit8d6efaa20d9b44cc016ae0f55aeceabcfe7d4e68
treeaa5438f484f3357015e617c0fee2efa303cf390d
parent33cb1647d68d9a57e6659a9392044ee0276fc24e
Don't read agent symbols when disabled

This avoids unnecessary work, and becomes important with the patch in
https://sourceware.org/ml/gdb-patches/2019-10/msg01143.html

gdb/ChangeLog:

2019-10-31  Christian Biesinger  <cbiesinger@google.com>

* agent.c (set_can_use_agent): When the setting is turned on,
look up agent symbols if we don't have them yet.
(agent_new_objfile): Don't look up agent symbols when the agent
setting is off.

Change-Id: I6523a5640c95d38299998050a6c620e51096e8ed
gdb/ChangeLog
gdb/agent.c