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: Extending RSP with vCont;n and vCont;f


On 10/02/2013 11:08 PM, ILG.Robert wrote:
void
_initialize_remote (void)
{
@@ -12168,6 +12274,34 @@
                   &setlist,
                   &showlist);

+  add_setshow_boolean_cmd ("next-stepping", class_run,
+                 &use_next_stepping, _("\
+  Enable or disable next stepping."), _("\
+  Show whether target-assisted next stepping is enabled."), _("\
+  If on, and the target supports it, when skipping over a source line, GDB\n\
+  tells the target to skip the next instruction itself instead of\n\
+  of issuing multiple single-steps.  This speeds up source level\n\
+  stepping.  If off, GDB always issues slower stepping mechanisms\n\
+  instead, even if next stepping is supported by the target.  The default is on."),

Due to lack of description of these two packets, I have to understand
them from the help message of the command.

IIUC, it is similar to range-stepping, vCont;r except that start and stop address are not provided to the stub. That means vCont;n requires a smarter stub to know enough line table information to decide where to stop.

An alternative to me is to teach your stub understand range stepping.

+                 set_next_stepping,
+                 show_next_stepping,
+                 &setlist,
+                 &showlist);
+
+  add_setshow_boolean_cmd ("finish-stepping", class_run,
+                 &use_finish_stepping, _("\
+  Enable or disable finish stepping."), _("\
+  Show whether target-assisted finish stepping is enabled."), _("\
+  If on, and the target supports it, when stepping out of a function, GDB\n\
+  tells the target to step out of the corresponding stack frame itself.\n\
+  This speeds up source level stepping. If off, GDB issues slower\n\
+  stepping mechanisms instead, even if finish\n\
+  stepping is supported by the target.  The default is on."),

GDB inserts a momentary breakpoint, resume the inferior and wait when
command "finish" is executed. I don't think GDB emits a large number of RSP packets in this process. Do you have an experiment that vCont;f
packet improves performance to some extent?

--
Yao (éå)


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