public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* New linespec error messages
@ 2012-03-13 19:27 Keith Seitz
  2012-03-13 20:18 ` [Archer] " Joel Brobecker
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2012-03-13 19:27 UTC (permalink / raw)
  To: archer

Hi,

I'm nearly finished cleaning up my linespec rewrite. I have an enormous 
amount of bugs that I've fixed while writing some tests for it.

One thing that has evolved out of this work, though, is the ability to 
provide "better" error messages for the user. For example:

(gdb-head) b main.c:
Function "" not defined in "main.c".

(gdb-linespec-rewrite) b main.c:
malformed linespec error: unexpected EOF

Similarly, for other possible error conditions, my rewrite will 
(currently) output error messages such as:

malfomred linespec error: unexpected TOKEN[, "TOKEN_STRING"]

where TOKEN is one of the token types ("keyword", "string", "number", 
"EOF", "COLON", etc) and TOKEN_STRING is a string representation of what 
the user wrote. Here's another example:

(gdb-head) break main.c:3 +1000
Junk at end of arguments.

(gdb-linespec-rewrite) b main.c:3 +1000
malformed linespec error: unexpected number, "+1000"

Does anyone have any input on the text of these error messages? Any 
changes that maintainers might like?

Keith

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Archer] New linespec error messages
  2012-03-13 19:27 New linespec error messages Keith Seitz
@ 2012-03-13 20:18 ` Joel Brobecker
  2012-03-16 13:38   ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2012-03-13 20:18 UTC (permalink / raw)
  To: Keith Seitz; +Cc: archer

> Does anyone have any input on the text of these error messages? Any
> changes that maintainers might like?

I say, this looks pretty nice! The error message "unexpected EOF"
might be a little cryptic to a newcomer, but overall, neat!

-- 
Joel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Archer] New linespec error messages
  2012-03-13 20:18 ` [Archer] " Joel Brobecker
@ 2012-03-16 13:38   ` Daniel Jacobowitz
  2012-03-16 14:12     ` Keith Seitz
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2012-03-16 13:38 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Keith Seitz, archer

On Tue, Mar 13, 2012 at 4:17 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>
> > Does anyone have any input on the text of these error messages? Any
> > changes that maintainers might like?
>
> I say, this looks pretty nice! The error message "unexpected EOF"
> might be a little cryptic to a newcomer, but overall, neat!

I agree; it's not an EOF, anyway.  "unexpected end of line"?

I'm super excited to see the last of "Junk at end of arguments"!

--
Thanks,
Daniel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Archer] New linespec error messages
  2012-03-16 13:38   ` Daniel Jacobowitz
@ 2012-03-16 14:12     ` Keith Seitz
  2012-03-17  3:36       ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2012-03-16 14:12 UTC (permalink / raw)
  To: archer

On 03/16/2012 06:38 AM, Daniel Jacobowitz wrote:
> On Tue, Mar 13, 2012 at 4:17 PM, Joel Brobecker<brobecker@adacore.com>  wrote:
>>
>>> Does anyone have any input on the text of these error messages? Any
>>> changes that maintainers might like?
>>
>> I say, this looks pretty nice! The error message "unexpected EOF"
>> might be a little cryptic to a newcomer, but overall, neat!
>
> I agree; it's not an EOF, anyway.  "unexpected end of line"?

I wasn't either. I have already committed a change to this for 
"unexpected end of input".

So the question of the minute is, "line" or "input"? [I figure to try to 
get at least some of the trivia mostly settled by the time I submit the 
patch Very Soon Now (TM).

Keith

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Archer] New linespec error messages
  2012-03-16 14:12     ` Keith Seitz
@ 2012-03-17  3:36       ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2012-03-17  3:36 UTC (permalink / raw)
  To: Keith Seitz; +Cc: archer

On Fri, Mar 16, 2012 at 10:12 AM, Keith Seitz <keiths@redhat.com> wrote:
> On 03/16/2012 06:38 AM, Daniel Jacobowitz wrote:
>>
>> On Tue, Mar 13, 2012 at 4:17 PM, Joel Brobecker<brobecker@adacore.com>
>>  wrote:
>>>
>>>
>>>> Does anyone have any input on the text of these error messages? Any
>>>> changes that maintainers might like?
>>>
>>>
>>> I say, this looks pretty nice! The error message "unexpected EOF"
>>> might be a little cryptic to a newcomer, but overall, neat!
>>
>>
>> I agree; it's not an EOF, anyway.  "unexpected end of line"?
>
>
> I wasn't either. I have already committed a change to this for "unexpected
> end of input".
>
> So the question of the minute is, "line" or "input"? [I figure to try to get
> at least some of the trivia mostly settled by the time I submit the patch
> Very Soon Now (TM).

I like both options :-)

-- 
Thanks,
Daniel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-17  3:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-13 19:27 New linespec error messages Keith Seitz
2012-03-13 20:18 ` [Archer] " Joel Brobecker
2012-03-16 13:38   ` Daniel Jacobowitz
2012-03-16 14:12     ` Keith Seitz
2012-03-17  3:36       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).