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


> -----Original Message-----
> From: gdb-owner@sourceware.org 
> [mailto:gdb-owner@sourceware.org] On Behalf Of Michael Snyder
> Sent: July-12-09 1:15 PM
> To: Jan Kratochvil
> Cc: Joel Brobecker; gdb@sourceware.org; Hui Zhu
> Subject: Re: Testing of reverse debug commands
> 
> Jan Kratochvil wrote:
> > On Sun, 12 Jul 2009 10:01:45 +0200, Joel Brobecker wrote:
> >>>     gdb_test "record" "" "Turn on process record"
> >>>     # FIXME: command ought to acknowledge, so we can test 
> if it succeeded.
> >> This is just a shot in the dark since I really don't have much time
> >> to double-check this, but does gdb_test_multiple allow you 
> to verify
> >> that no output was generated? For some reason, I thought it did.
> > 
> > This one works but not sure if it cannot have some problems:
> > 
> > set cmd "set verbose 0"
> > gdb_test $cmd "[string_to_regexp $cmd]"
> 
> Hmm, ok, three people so far have responded with
> work-arounds (thanks).
> 
> Does that mean y'all lean toward NOT making the
> commands generate some output of their own?
> 
> Now would be the time to decide, before the first official release...

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.
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.

(gdb) 
record stop
&"record stop\n"
~"Process record is not started.\n"
^done
(gdb) 
-interpreter-exec console record stop
^done
(gdb) 

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

There is also a need to handle the default answers of queries
better for a frontend.  They are almost entirely used by PRecord.
I've been meaning to write a patch about that.  I'll try to 
get to it soon unless someone else gets to it first :-)

Marc


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