From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12277 invoked by alias); 4 Dec 2014 15:57:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 12171 invoked by uid 89); 4 Dec 2014 15:57:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD,WEIRD_QUOTING autolearn=ham version=3.3.2 X-HELO: mail-vc0-f172.google.com Received: from mail-vc0-f172.google.com (HELO mail-vc0-f172.google.com) (209.85.220.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 04 Dec 2014 15:57:36 +0000 Received: by mail-vc0-f172.google.com with SMTP id hq11so8186155vcb.3 for ; Thu, 04 Dec 2014 07:57:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=r+diYkxUx5BSoQtqNvgquMI9bBMf8zM2MZNYvXLPrno=; b=F0zd1ZUVHUyYylyKN+6nysi4fMmEvl7F1CDUKcXFkiS5tcMU2jxFLr9Zsj8hLf5bZX 2eJPfOsOjyiIigrzn+/Ad0FwnC3BTC0zGIIUhCdyLO+i8ONMxT6pJlcOO7cdlKiuBwZ3 0ZOU+zFRBkWd+QQDnRPSquQ2UWEjGWM3q/ckVtkGcO717cL8ct8w6LpoyiRGsC30RYve ZjmjyCWepuvfCY0zNymGRs7QQIjzqExrKHjz596qEjoNZGsTpooRWG7pDgux/Txk5Dpj UQ3IhJlELsgkOBbS8EUzT2yo2vxEA3Om4GyhSXwcNZ5x/SlNlUHExE+BTAtjnFtnUVjc MC5Q== X-Gm-Message-State: ALoCoQlJwwes6iBrBMTOWl9eQVfRhs/OWiNZh0DE/fz4+esGtu3U/bBcY6LLv0Hxbr0lCH9G/QE1 MIME-Version: 1.0 X-Received: by 10.52.28.7 with SMTP id x7mr4866436vdg.27.1417708654493; Thu, 04 Dec 2014 07:57:34 -0800 (PST) Received: by 10.52.114.101 with HTTP; Thu, 4 Dec 2014 07:57:34 -0800 (PST) In-Reply-To: <87k327ocu6.fsf@br87z6lw.de.ibm.com> References: <87k327ocu6.fsf@br87z6lw.de.ibm.com> Date: Thu, 04 Dec 2014 15:57:00 -0000 Message-ID: Subject: Re: [PATCH 2/2] [PR symtab/17602] Fix arguments to symbol_name_cmp From: Doug Evans To: Andreas Arnez Cc: gdb-patches , Joel Brobecker Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00095.txt.bz2 On Thu, Dec 4, 2014 at 3:48 AM, Andreas Arnez wrote: > On Wed, Nov 26 2014, Doug Evans wrote: > >> diff --git a/gdb/linespec.c b/gdb/linespec.c >> index 5325702..35b0205 100644 >> --- a/gdb/linespec.c >> +++ b/gdb/linespec.c >> @@ -982,7 +982,12 @@ iterate_name_matcher (const char *name, void *d) >> { >> const struct symbol_matcher_data *data = d; >> >> - if (data->symbol_name_cmp (name, data->lookup_name) == 0) >> + /* The order of arguments we pass to symbol_name_cmp is important as >> + strcmp_iw, a typical value for symbol_name_cmp, only performs special >> + processing of '(' to remove overload info on the first argument and not >> + the second. The first argument is what the user provided, the second >> + argument is what came from partial syms / .gdb_index. */ >> + if (data->symbol_name_cmp (data->lookup_name, name) == 0) >> return 1; /* Expand this symbol's symbol table. */ >> return 0; /* Skip this symbol. */ >> } > > This seems to cause a regression for the Ada testcase "operator_bp.exp": > >> [...] >> FAIL: gdb.ada/operator_bp.exp: break "+" (got interactive prompt) >> FAIL: gdb.ada/operator_bp.exp: break "-" (got interactive prompt) >> FAIL: gdb.ada/operator_bp.exp: break "*" (got interactive prompt) >> FAIL: gdb.ada/operator_bp.exp: break "/" (got interactive prompt) >> FAIL: gdb.ada/operator_bp.exp: break "mod" (got interactive prompt) >> FAIL: gdb.ada/operator_bp.exp: break "rem" (got interactive prompt) >> FAIL: gdb.ada/operator_bp.exp: break "**" (got interactive prompt) >> [...] > > See https://sourceware.org/ml/gdb-testers/2014-q4/msg00126.html > > The problem occurs like this: > > (gdb) break "+" > Function ""+"" not defined. > Make breakpoint pending on future shared library load? (y or [n]) n > (gdb) FAIL: gdb.ada/operator_bp.exp: break "+" (got interactive prompt) > > When reverting the patch, the test succeeds again. Yeah, found that last night. The problem is ada-lang.c:wild_match takes arguments in the opposite order of strcmp_iw. Working on a patch.