This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 19/40] Fix cp_find_first_component_aux bug
- From: Pedro Alves <palves at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>, gdb-patches at sourceware dot org
- Date: Mon, 17 Jul 2017 20:50:01 +0100
- Subject: Re: [PATCH 19/40] Fix cp_find_first_component_aux bug
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D9DE361E51
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D9DE361E51
- References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-20-git-send-email-palves@redhat.com> <596D0D2E.2080506@redhat.com>
--
Thanks,
Pedro Alves
On 07/17/2017 08:17 PM, Keith Seitz wrote:
> On 06/02/2017 05:22 AM, Pedro Alves wrote:
>> gdb/ChangeLog:
>> yyyy-mm-dd Pedro Alves <palves@redhat.com>
>>
>> * cp-support.c (cp_find_first_component_aux): Add missing case for
>> end of string.
>
> That's pretty obvious, even to me. Do we a test case would add anything? /me not so sure [but then it would be rather trivial to write, eh?]
There's a bunch later in the series in:
[PATCH 36/40] Add comprehensive C++ operator linespec/location/completion tests
(that's how I spotted the bug; gdb sometimes failed those tests.)
To confirm I added:
case '\0':
+ gdb_assert (0);
return index;
on top of the whole series, and reran that testcase:
Running src/gdb/testsuite/gdb.linespec/cpls-ops.exp ...
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: "b test_op_delete::operator" creates no bp locations: set breakpoint (GDB internal error)
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: "b test_op_delete::operator" creates no bp locations: matches
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: "b -function test_op_delete::operator" creates no bp locations: set breakpoint (GDB internal error)
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: "b -function test_op_delete::operator" creates no bp locations: matches
FAIL: gdb.linespec/cpls-ops.exp: operator-delete[]: "b test_op_delete_array::operator" creates no bp locations: set breakpoint (GDB internal error)
(...)
Unfortunately, that testcase won't work yet as is, until a few
patches more down the series (I think patch #34, even). With
patch #19 alone:
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: tab complete "b test_op_delete::operator delete " (timeout)
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: cmd complete "b test_op_delete::operator delete "
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: tab complete "b test_op_delete::operator delete (" (timeout)
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: cmd complete "b test_op_delete::operator delete ("
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: tab complete "b test_op_delete::operator delete ( void* " (timeout)
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: cmd complete "b test_op_delete::operator delete ( void* "
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: tab complete "b test_op_delete::operator delete ( void * " (timeout)
FAIL: gdb.linespec/cpls-ops.exp: operator-delete: cmd complete "b test_op_delete::operator delete ( void * "
(...)
Would you be OK with adding the fix without the test yet?
Thanks,
Pedro Alves