aboutsummaryrefslogtreecommitdiff
path: root/texinfo/texinfo.tex
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2022-09-16 16:13:29 -0700
committerKevin Buettner <kevinb@redhat.com>2022-09-16 16:30:39 -0700
commit84e605558eb8a3aeec636e32de5d3573242d462e (patch)
treef81dfa89724f228fc8a21372a5224013ba5241c6 /texinfo/texinfo.tex
parent80eaec735e36598a312f9b184ee4f32bd6c0bab4 (diff)
downloadbinutils-84e605558eb8a3aeec636e32de5d3573242d462e.zip
binutils-84e605558eb8a3aeec636e32de5d3573242d462e.tar.gz
binutils-84e605558eb8a3aeec636e32de5d3573242d462e.tar.bz2
Suppress printing of superfluous BFD error messages
This commit adds a hook to the BFD error handler for suppressing identical messages which have been output once already. It's motivated by this Fedora bug... https://bugzilla.redhat.com/show_bug.cgi?id=2083315 ...in which over 900,000 BFD error messages are output when attaching to firefox. From the bug report, the messages all say: BFD: /usr/lib/debug/usr/lib64/firefox/libxul.so-100.0-2.fc35.x86_64.debug: attempt to load strings from a non-string section (number 38) Since there's no (additional) context which might assist the user in determining what's wrong, there's really no point in outputting more than one message. Of course, if BFD should output some other/different message, it should be output too, but all future messages identical to those already output should be suppressed. For the firefox problem, it turned out that there were only 37 sections, but something was referring to section #38. I haven't investigated further to find out how this came to be. Despite this problem, useful debugging might still be done, especially if the user doesn't care about debugging the problematic library. If it turns out that knowing the quantity of messages might be useful, I've implemented the suppression mechanism by keeping a count of each identical message. A new GDB command, perhaps a 'maintenance' command, could be added to print out each message along with the count. I haven't implemented this though because I'm not convinced of its utility. Also, the BFD message printer has support for BFD- specific format specifiers. The BFD message strings that GDB stores in its map are sufficient for distinguishing messages from each other, but are not identical to those output by BFD's default error handler. So, that problem would need to be solved too.
Diffstat (limited to 'texinfo/texinfo.tex')
0 files changed, 0 insertions, 0 deletions