This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb: Fix "info os <unknown>" command
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Tom Tromey <tom at tromey dot com>, Paul Marechal <paul dot marechal at ericsson dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 21 Dec 2018 18:06:31 +0000
- Subject: Re: [PATCH] gdb: Fix "info os <unknown>" command
- References: <20181217221253.13314-1-paul.marechal@ericsson.com> <877eg2ss5u.fsf@tromey.com>
On 2018-12-21 12:31 p.m., Tom Tromey wrote:
>>>>>> "Paul" == Paul Marechal <paul.marechal@ericsson.com> writes:
>
> Paul> Running `info os someUnknownOsType` is crashing when gdb is built with
> Paul> -D_GLIBCXX_DEBUG:
>
> Paul> /usr/include/c++/5/debug/vector:439:error: attempt to
> Paul> access an element in
> Paul> an empty container.
>
> Thank you for the patch.
> Someday I hope to send a patch to enable -D_GLIBCXX_DEBUG by default
> when building gdb in not-release mode.
Yep, that would be nice!
> Paul> This is a regression in gdb 8.2 and this patch restores the behavior of
> Paul> previous versions.
>
> Perhaps it isn't too late to put this on the 8.2 branch, as it seems
> simple enough.
Yes, it's on the 8.2.1 list:
https://sourceware.org/ml/gdb-patches/2018-12/msg00167.html
> Paul> PR gdb/23974
> Paul> * target.c (target_read_stralloc): Check for empty vector.
>
> Paul> gdb/testsuite/ChangeLog:
>
> Paul> PR gdb/23974
> Paul> * gdb.base/info-os.exp: Check return for unknown "info os" type.
>
> This is ok.
Thanks for looking at it, I'll push it right now (on master and 8.2) on Paul's behalf.
Simon