This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MI non-stop 04/11] Implement --thread and --frame.


> From:  Vladimir Prus <vladimir@codesourcery.com>
> Date:  Sat, 28 Jun 2008 21:34:57 +0400
> 
> Eli Zaretskii wrote:
> 
> >> From: Vladimir Prus <vladimir@codesourcery.com>
> >> Date: Sat, 28 Jun 2008 20:44:14 +0400
> >> 
> >> 
> >> +  if (parse->frame != -1 && !parse->thread == -1)
> >> +    error ("Cannot specify --frame without --thread");
> > 
> > Why is this error message not in _(), while all the rest are?
> > 
> > Btw, do we at all want error messages issued by MI commands
> > translated?  
> 
> I think we don't, but I'm not sure.
> 
> 
> > MI commands are invoked by a program, so error messages 
> > we generate should be understandable by a program, which probably
> > means they should not be translated.
> 
> It's a bit questionable. For example, the error you mention above
> is clearly a bug in frontend. Presenting a translated version of
> that message to the user is essentially pointless. On the other
> hand, "Thread is running", or "Memory not accessible" messages
> can be helpful for users. Do we need two error messages, maybe?

Maybe.  Do front ends show the error messages to the user, or do they
act on them themselves (or both)?

> >> +      if (strncmp (chp, "--thread", 8) == 0)
> > 
> > Please, let's not use literal constants in this context, let's use
> > sizeof instead.
> 
> sizeof? For all I know, sizeof("--thread") will be wrong here.

Why would it be wrong?

> >> +      parse->frame = strtol (chp, &chp, 10);
> > 
> > Do we really want to disallow non-decimal numbers here?  What about
> > hex frame numbers?
> 
> Why would frontend want to specify frame level in hex?

I dunno, does the MI spec mandate decimal here?  If it does, then my
comment is hereby withdrawn.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]