Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: gdb-patches <gdb-patches@sourceware.org>,
	Joel Brobecker <brobecker@adacore.com>
Subject: Re: [PATCH 2/2] [PR symtab/17602] Fix arguments to symbol_name_cmp
Date: Thu, 04 Dec 2014 15:57:00 -0000	[thread overview]
Message-ID: <CADPb22RnhGVRhRHdgeqfOLeE=-b2xhugYOZcUVqNrW2mG9MkwA@mail.gmail.com> (raw)
In-Reply-To: <87k327ocu6.fsf@br87z6lw.de.ibm.com>

On Thu, Dec 4, 2014 at 3:48 AM, Andreas Arnez <arnez@linux.vnet.ibm.com> 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.


      reply	other threads:[~2014-12-04 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  4:20 Doug Evans
2014-11-26  9:00 ` Yao Qi
2014-12-04 16:02   ` Doug Evans
2014-12-04 11:48 ` Andreas Arnez
2014-12-04 15:57   ` Doug Evans [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADPb22RnhGVRhRHdgeqfOLeE=-b2xhugYOZcUVqNrW2mG9MkwA@mail.gmail.com' \
    --to=dje@google.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox