Oops, the introduction text is missing. Here it is: This patch is a small variation of the one I posted in the PR, which Paul approved. The testcase is Christopher's.
I haven't seen the debug_find_tree function used in any of contrib/* or gcc/gdbinit.in, so I have moved/renamed it without keeping the old name. Regression-tested on powerpc64le-unknown-linux-gnu, pushed.
