diff options
author | Jan Vrany <jan.vrany@labware.com> | 2022-12-19 11:24:36 +0000 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-12-20 12:02:02 -0700 |
commit | a47dacc45bd8538e0a4c687e3d11468a51519a55 (patch) | |
tree | 013f47abb859fb81c423c328e5414fa9aa90f5a0 /zlib/example.c | |
parent | e110f63216814d18f1f7a1923f59c1bc7e4663fb (diff) | |
download | gdb-a47dacc45bd8538e0a4c687e3d11468a51519a55.zip gdb-a47dacc45bd8538e0a4c687e3d11468a51519a55.tar.gz gdb-a47dacc45bd8538e0a4c687e3d11468a51519a55.tar.bz2 |
gdb: fix command lookup in execute_command ()
Commit b5661ff2 ("gdb: fix possible use-after-free when
executing commands") used lookup_cmd_exact () to lookup
command again after its execution to avoid possible
use-after-free error.
However this change broke test gdb.base/define.exp which
defines a post-hook for subcommand ("target testsuite").
In this case, lookup_cmd_exact () returned NULL because
there's no command 'testsuite' in top-level commands.
This commit fixes this case by looking up the command again
using the original command line via lookup_cmd ().
Approved-By: Simon Marchi <simon.marchi@efficios.com>
(cherry picked from commit 37e5833da583310268dc1b04fc6839e81b987897)
Diffstat (limited to 'zlib/example.c')
0 files changed, 0 insertions, 0 deletions