]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: remove use of a static buffer for building error strings
authorAndrew Burgess <aburgess@redhat.com>
Sun, 24 Sep 2023 12:37:06 +0000 (13:37 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 5 Oct 2023 11:21:46 +0000 (12:21 +0100)
commitb09dba5a5fcf061bf93c1e5a5c9fd56928c6340c
tree77d9fcd92c4e4662ad6ae6a7b0e6a601fdf32989
parent95cb8bf72b6f75e5b672131389ff7496bfa47ebe
gdb: remove use of a static buffer for building error strings

I noticed in procfs.c that we use a static buffer for building error
strings when we could easily use std::string and string_printf to
achieve the same result, this commit does that.

I ran into this while performing a further refactor/cleanup that will
be presented in a later patch in this series, and thought this was
worth splitting out into its own patch.

As far as I can tell, only Solaris uses procfs.c, so I did a test
build on a Solaris machine, and I don't believe that I've broken
anything.

There should be no user visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/procfs.c