[RFC] Using bt command in async mode

Nick Roberts nickrob@snap.net.nz
Tue Apr 1 22:30:00 GMT 2008


 > Nick> This patch allows the bt to be executed in async mode while the
 > Nick> inferior is executing.
 > 
 > Nick> ! 	    && strcmp (c->name, "interrupt") != 0
 > Nick> ! 	    && strcmp (c->name, "bt") != 0)
 > 
 > I've seen a couple patches recently that touch this conditional.
 > 
 > What do you think of this?  It moves the flag into the command object
 > instead of hard-coding it into a big 'if'.

Sure, the list will only get longer.  In the long run it might be a good
idea to add an argument to add_cmd and related functions.

Incidentally, the patch I've presented for bt isn't suitable for inclusion
as it uses:

+ 
+   if (restart)
+     continue_command ("&", 0);

If the user interrupts with 'bt' during a step, he presumably wants the step to
finish.  I'm not sure how easy it is for Gdb to jump the inferior back into
it's old state of execution.

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



More information about the Gdb-patches mailing list