[PATCHv2,0/3] Changes to error reporting from the expression parser

Message ID cover.1704206350.git.aburgess@redhat.com
Headers
Series Changes to error reporting from the expression parser |

Message

Andrew Burgess Jan. 2, 2024, 2:43 p.m. UTC
  In V2:

  - Have split the "merging of error handling" into its own patch,
    adding the new error handling is in its own patch.

  - Reordered patches, the minor bug fix is now first, follow by the
    refactor, with the new functionality placed in the last patch.

  - Have dropped the whole <HERE> marker idea, and gone with the
    simpler 'error at end of ....' style message.  This means that no
    tests need updating -- I have added a couple of new tests, but
    everything else should continue to pass as before.

---

While working on another patch I wished that the error reporting from
the expression parser was better.  This series is my attempt to make
it better.

---

Andrew Burgess (3):
  gdb: don't try to style content in error calls
  gdb: merge error handling from different expression parsers
  gdb: improve error reporting from expression parser

 gdb/ada-exp.y                    |  2 +-
 gdb/c-exp.y                      |  5 +----
 gdb/d-exp.y                      |  5 +----
 gdb/f-exp.y                      |  5 +----
 gdb/go-exp.y                     |  5 +----
 gdb/m2-exp.y                     |  5 +----
 gdb/p-exp.y                      |  5 +----
 gdb/parse.c                      | 15 +++++++++++++++
 gdb/parser-defs.h                |  9 +++++++++
 gdb/procfs.c                     |  6 ++----
 gdb/testsuite/gdb.base/exprs.exp |  8 ++++++++
 11 files changed, 41 insertions(+), 29 deletions(-)


base-commit: 90827b4eefb06f6e0ab6cbac9eb94922e2cc8aee
  

Comments

John Baldwin Jan. 3, 2024, 7:52 p.m. UTC | #1
On 1/2/24 6:43 AM, Andrew Burgess wrote:
> In V2:
> 
>    - Have split the "merging of error handling" into its own patch,
>      adding the new error handling is in its own patch.
> 
>    - Reordered patches, the minor bug fix is now first, follow by the
>      refactor, with the new functionality placed in the last patch.
> 
>    - Have dropped the whole <HERE> marker idea, and gone with the
>      simpler 'error at end of ....' style message.  This means that no
>      tests need updating -- I have added a couple of new tests, but
>      everything else should continue to pass as before.
> 
> ---
> 
> While working on another patch I wished that the error reporting from
> the expression parser was better.  This series is my attempt to make
> it better.
> 
> ---
> 
> Andrew Burgess (3):
>    gdb: don't try to style content in error calls
>    gdb: merge error handling from different expression parsers
>    gdb: improve error reporting from expression parser
> 
>   gdb/ada-exp.y                    |  2 +-
>   gdb/c-exp.y                      |  5 +----
>   gdb/d-exp.y                      |  5 +----
>   gdb/f-exp.y                      |  5 +----
>   gdb/go-exp.y                     |  5 +----
>   gdb/m2-exp.y                     |  5 +----
>   gdb/p-exp.y                      |  5 +----
>   gdb/parse.c                      | 15 +++++++++++++++
>   gdb/parser-defs.h                |  9 +++++++++
>   gdb/procfs.c                     |  6 ++----
>   gdb/testsuite/gdb.base/exprs.exp |  8 ++++++++
>   11 files changed, 41 insertions(+), 29 deletions(-)
> 
> 
> base-commit: 90827b4eefb06f6e0ab6cbac9eb94922e2cc8aee

Modulo the one nit I mentioned for the first patch, (and with the
updated comment you noted in your reply to Lancelot SIX), these both
look good to me.

Approved-By: John Baldwin <jhb@FreeBSD.org>
  
Andrew Burgess Jan. 4, 2024, 9:43 a.m. UTC | #2
John Baldwin <jhb@FreeBSD.org> writes:

> On 1/2/24 6:43 AM, Andrew Burgess wrote:
>> In V2:
>> 
>>    - Have split the "merging of error handling" into its own patch,
>>      adding the new error handling is in its own patch.
>> 
>>    - Reordered patches, the minor bug fix is now first, follow by the
>>      refactor, with the new functionality placed in the last patch.
>> 
>>    - Have dropped the whole <HERE> marker idea, and gone with the
>>      simpler 'error at end of ....' style message.  This means that no
>>      tests need updating -- I have added a couple of new tests, but
>>      everything else should continue to pass as before.
>> 
>> ---
>> 
>> While working on another patch I wished that the error reporting from
>> the expression parser was better.  This series is my attempt to make
>> it better.
>> 
>> ---
>> 
>> Andrew Burgess (3):
>>    gdb: don't try to style content in error calls
>>    gdb: merge error handling from different expression parsers
>>    gdb: improve error reporting from expression parser
>> 
>>   gdb/ada-exp.y                    |  2 +-
>>   gdb/c-exp.y                      |  5 +----
>>   gdb/d-exp.y                      |  5 +----
>>   gdb/f-exp.y                      |  5 +----
>>   gdb/go-exp.y                     |  5 +----
>>   gdb/m2-exp.y                     |  5 +----
>>   gdb/p-exp.y                      |  5 +----
>>   gdb/parse.c                      | 15 +++++++++++++++
>>   gdb/parser-defs.h                |  9 +++++++++
>>   gdb/procfs.c                     |  6 ++----
>>   gdb/testsuite/gdb.base/exprs.exp |  8 ++++++++
>>   11 files changed, 41 insertions(+), 29 deletions(-)
>> 
>> 
>> base-commit: 90827b4eefb06f6e0ab6cbac9eb94922e2cc8aee
>
> Modulo the one nit I mentioned for the first patch, (and with the
> updated comment you noted in your reply to Lancelot SIX), these both
> look good to me.
>
> Approved-By: John Baldwin <jhb@FreeBSD.org>

I took another look at patch #1, I would have sworn I found two places
originally, but I can't find a second now .... not sure what happened
there.

Anyway, I updated the commit message to talk about a single problem
case, and pushed this series.

Thanks,
Andrew