* [PATCH] is_name_suffix("") is always non-zero
@ 2011-02-26 22:21 Andreas Schwab
2011-02-28 4:50 ` Joel Brobecker
2011-03-07 10:24 ` Joel Brobecker
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Schwab @ 2011-02-26 22:21 UTC (permalink / raw)
To: gdb-patches
is_name_suffix always returns non-zero when called with the empty
string. Probably this should be called with string1 instead.
Andreas.
2011-02-26 Andreas Schwab <schwab@linux-m68k.org>
* ada-lang.c (compare_names): Call is_name_suffix with string1
instead of string2.
--- gdb/ada-lang.c.~1.284.~ 2011-01-21 20:20:53.000000000 +0100
+++ gdb/ada-lang.c 2011-02-26 23:00:31.000000000 +0100
@@ -4740,7 +4740,7 @@ compare_names (const char *string1, cons
case '_':
if (*string2 == '\0')
{
- if (is_name_suffix (string2))
+ if (is_name_suffix (string1))
return 0;
else
return -1;
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] is_name_suffix("") is always non-zero
2011-02-26 22:21 [PATCH] is_name_suffix("") is always non-zero Andreas Schwab
@ 2011-02-28 4:50 ` Joel Brobecker
2011-02-28 9:51 ` Andreas Schwab
2011-03-07 10:24 ` Joel Brobecker
1 sibling, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2011-02-28 4:50 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
> 2011-02-26 Andreas Schwab <schwab@linux-m68k.org>
>
> * ada-lang.c (compare_names): Call is_name_suffix with string1
> instead of string2.
Thanks for spotting that. Was this from code inspection, or did you
hit a bug?
Your patch does look correct to me. But the implementation of that
function is a little obscure to me - I suspect that this is because
it is meant to work in contexts other than Ada. So I asked Paul
to review your patch for me.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] is_name_suffix("") is always non-zero
2011-02-28 4:50 ` Joel Brobecker
@ 2011-02-28 9:51 ` Andreas Schwab
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2011-02-28 9:51 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
Joel Brobecker <brobecker@adacore.com> writes:
>> 2011-02-26 Andreas Schwab <schwab@linux-m68k.org>
>>
>> * ada-lang.c (compare_names): Call is_name_suffix with string1
>> instead of string2.
>
> Thanks for spotting that. Was this from code inspection, or did you
> hit a bug?
The former.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] is_name_suffix("") is always non-zero
2011-02-26 22:21 [PATCH] is_name_suffix("") is always non-zero Andreas Schwab
2011-02-28 4:50 ` Joel Brobecker
@ 2011-03-07 10:24 ` Joel Brobecker
1 sibling, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2011-03-07 10:24 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
> 2011-02-26 Andreas Schwab <schwab@linux-m68k.org>
>
> * ada-lang.c (compare_names): Call is_name_suffix with string1
> instead of string2.
Paul just confirmed that this patch is OK.
Thanks for the fix...
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-07 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-26 22:21 [PATCH] is_name_suffix("") is always non-zero Andreas Schwab
2011-02-28 4:50 ` Joel Brobecker
2011-02-28 9:51 ` Andreas Schwab
2011-03-07 10:24 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox