This is the mail archive of the gdb@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: Testing of reverse debug commands


On Sunday 12 July 2009 19:49:58, Marc Khouzam wrote:

> From a frontend perspective, the current 'record' command is not very
> good.

> First, there is no MI equivalent, although that is not a big deal.
> But since it does not report error, the frontend must always assumes
> that
> the command worked.

Are you sure that is the case with "record"?  I see `error' calls
in record.c:record_open.  If there are some missing, let's add them.

> Below you can see that using 'record stop' directly will give a ^done
> instead of an ^error when it fails (although there is an error message
> but we don't parse those in Eclipse).  Also, using -interpreter-exec
> is even worse as even the error message is gone.

Note that "record stop" is really a different command, although
it shares a common "record" prefix.

> 
> (gdb) 
> record stop
> &"record stop\n"
> ~"Process record is not started.\n"
> ^done
> (gdb) 

> So, I think some improvement would be nice for frontends.

So, is this really an error?  Hui seems to have thought
it wasn't.  Hui?  If it is, then it's just a matter of
changing the corresponding printf_unfiltered calls in
record.c to `error' calls (look for the "Process record is..." string).
Then MI will get an ^error,msg="foo", instead of a ~"foo" + ^done.

-- 
Pedro Alves


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