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/RFC] Emit ^running via observer.


 > I've checked in the following, which differs from original by extra test
 > strictness.  

Thanks.

 >              Further, I've converted mi-async.exp to use the helper
 > functions. Nick, as it stands now it does not seem that mi-async.exp tests
 > async behaviour at all -- it merely changes that we get ^running for CLI
 > commands, and we get that in both sync and async mode. Do you think it
 > worthwhile to rename the test or move its content somewhere else?

The tests appear to fail now.  However, there is still a difference in output
for sync and async behaviour and this is what the test is for.

ASYNC:

(gdb) 
r
&"r\n"
~"Starting program: /home/nickrob/myprog \n"
=thread-created,id="1"
^running
*running,thread-id="all"
(gdb) 
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="1",frame={addr="0x08048706",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbfaf2db4"}],file="myprog.c",fullname="/home/nickrob/myprog.c",line="146"}


SYNC:

r
&"r\n"
~"Starting program: /home/nickrob/myprog \n"
=thread-created,id="1"
^running
*running,thread-id="all"
(gdb) 
~"\n"
~"Breakpoint 1, main (argc=1, argv=0xbf961424) at myprog.c:146\n"
~"146\tmain (int argc, char **argv) {\n"
*stopped
(gdb) 


i.e no reason, frame, file, etc fields.  It's important for the console in a
frontend that the CLI command generates the same MI output as the corresponding
MI command.

The async version now seems to be missing a final "(gdb) \n".  Maybe that's
why the tests are failing.


-- 
Nick                                           http://www.inet.net.nz/~nickrob


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