]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Suppress GDB output from new 'skip' commands [PR118260]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 9 May 2025 10:39:39 +0000 (11:39 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 12 May 2025 08:46:36 +0000 (09:46 +0100)
commita341d96add049e1ebc94e7350ff59e82b03043d2
treed657fcbec5e654dc6b053adc457abcef6e7457c9
parentfc135d41b1eb6a1736ac680d1928387b38db5193
libstdc++: Suppress GDB output from new 'skip' commands [PR118260]

I added some gdb.execute('skip -rfu ...') commands to the Python hook
loaded with libstdc++.so but this makes GDB print output like:

Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping.

This probably aren't interesting to users, so this change suppresses
that output by capturing the output into the gdb.execute return value
(which is then ignored). An exception is thrown if the gdb.execute
command fails, so this doesn't suppress any errors which might be
meaningful to users or libstdc++ developers.

libstdc++-v3/ChangeLog:

PR libstdc++/118260
* python/hook.in: Suppress output from gdb.execute calls to
register skips.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
(cherry picked from commit 31cbac3037b7811bd0df63f4a09aa981b250c4bf)
libstdc++-v3/python/hook.in