Re: [PATCH v3 2/2] compile: Add 'set compile-gcc'

Pedro Alves
2015-04-27T19:24:21Z

On 04/27/2015 06:54 PM, Jan Kratochvil wrote:
> On Mon, 27 Apr 2015 17:47:42 +0200, Pedro Alves wrote:
>> IIUC, gdb will always apply the same search as when this is set
>> empty? That is, the user can also set this to a regex. So it seems to me
>> that the documentation (manual and help) doesn't match the implementation?
>
> That it can be also a regex is an API bug because I wanted to make a minimal
> API change. Rather than officially documenting such bug I find then better to
> rather make a proper complex change to the API. Given that you requested an
> API rework anyway I will try to post the new API even with this change.

This overload had given me lots of pause, and trying to think it through
(it wasn't clear what the intention was), it seemed to me that it kind of made at
least some sense to allow specifying a different regex, but details of the search
algorithms are foggy to me. It probably really doesn't make sense to overload.
Given we now clearly understand how to add new methods and it isn't that complex,
and we're already bumping the API, yes, let's please avoid an overload hack
when we don't need it, avoiding such confusions.

Thanks,
Pedro Alves