We use GDBRemoteCommunication::ScopedTimeout in many places to change the packet timeout that is used for individual packets. If someone modifies the default timeout manually or the GDB remote server requests a longer timeout in a 'q' packet, then don't ever reduce a timeout for a packet since that could make things fail.
This patch checks the timeout to ensure the new timeout is larger before it modifies the timeout. The GDBRemoteCommunication::ScopedTimeout object also remembers if it did update the timeout and will restore the old timeout only if it did.