This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Change pid_to_str to return std::string
- From: Tom Tromey <tom at tromey dot com>
- To: Tom Tromey <tromey at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 13 Mar 2019 13:48:50 -0600
- Subject: Re: [PATCH] Change pid_to_str to return std::string
- References: <20190228173610.3777-1-tromey@adacore.com>
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Tom> Currently the target pid_to_str method returns a const char *, so many
Tom> implementations have a static buffer that they update. This patch
Tom> changes these methods to return a std::string instead. I think this
Tom> is cleaner and avoids possible gotchas when calling pid_to_str on
Tom> different ptids in a single statement. (Though no such calls exist
Tom> currently.)
I'm checking this in now.
Tom