]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Do not capture updated 'pc' in add_local_symbols
authorTom Tromey <tom@tromey.com>
Tue, 15 Mar 2022 22:13:57 +0000 (16:13 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 15 Mar 2022 22:13:57 +0000 (16:13 -0600)
commit8f50b4b574b9f34c4f23ce6d6508f72e9c2f5a59
tree0613cc5e2a45d0d8c3428dc5f4f102f0f81c672a
parent6aa03e9c1769c8d925f4d23d72af93483bfd31f3
Do not capture updated 'pc' in add_local_symbols

Simon pointed out that commit 13835d88 ("Use function view when
iterating over block symbols") caused a regression.  The bug is that
the new closure captures 'pc' by reference, but later code updates
this variable -- but the earlier code did not update the callback
structure with the new value.

This patch restores the old behavior by using a new varible name in an
inner scope.
gdb/tracepoint.c