Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/7] Range stepping
@ 2013-03-11 12:52 Yao Qi
  2013-03-11 12:53 ` [PATCH 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE Yao Qi
                   ` (8 more replies)
  0 siblings, 9 replies; 44+ messages in thread
From: Yao Qi @ 2013-03-11 12:52 UTC (permalink / raw)
  To: gdb-patches

Hi,
When user types "next" command on the following line of source, 

   a = b + c + d * e - a;

GDB will single step every instruction belongs to this source line
and stop when program goes to the next line, the following is the
assembly of this source line

   0x08048434 <+65>:    mov    0x1c(%esp),%eax
   0x08048438 <+69>:    mov    0x30(%esp),%edx
   0x0804843c <+73>:    add    %eax,%edx
   0x0804843e <+75>:    mov    0x18(%esp),%eax
   0x08048442 <+79>:    imul   0x2c(%esp),%eax
   0x08048447 <+84>:    add    %edx,%eax
   0x08048449 <+86>:    sub    0x34(%esp),%eax
   0x0804844d <+90>:    mov    %eax,0x34(%esp)
   0x08048451 <+94>:    mov    0x1c(%esp),%eax

the following will happen between GDB and GDBserver in remote
debugging,

--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:3c840408;thread:p2e13.2e13;core:1;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:3e840408;thread:p2e13.2e13;core:2;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:42840408;thread:p2e13.2e13;core:2;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:47840408;thread:p2e13.2e13;core:0;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:49840408;thread:p2e13.2e13;core:0;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:4d840408;thread:p2e13.2e13;core:0;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:51840408;thread:p2e13.2e13;core:0;

There are some round-trip between GDB and GDBserver.  Isn't it boring
and inefficient? so GDB has to say something
different to GDBserver, that is, "keep stepping and report a stop
to me until program goes out of the range of [0x08048434, 0x08048451)"
then, the RSP traffic looks like this,

--> vCont;r8048434,8048451:p2db0.2db0;c
<-- T0505:68efffbf;04:30efffbf;08:51840408;thread:p2db0.2db0;core:1;

As we can see, GDB tells GDBserver a range of stepping, and GDBserver
only sends stop reply back when programs goes out of the range.
The number of packets is reduced dramatically, and as a result,
the performance of stepping a source line is improved.  We call it
"range stepping".

In this patch series, we add range stepping support in GDBserver on
x86/linux and in GDB.  GDB is able to send "vCont;r" packet for other
remote stubs if "vCont;r" is supported.  We tested GDB with GDBserver
on x86_64-linux, and also test mips-sde-elf GDB with a stub understands
range stepping.  No regressions.

Is it OK after the release branch is created?

-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2013-05-22 14:01 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-11 12:52 [PATCH 0/7] Range stepping Yao Qi
2013-03-11 12:53 ` [PATCH 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE Yao Qi
2013-05-14 19:24   ` Pedro Alves
2013-03-11 12:53 ` [PATCH 6/7] range stepping: test case Yao Qi
2013-05-14 18:32   ` Pedro Alves
2013-05-15  8:27     ` Yao Qi
2013-05-20 18:29       ` Pedro Alves
2013-05-22 14:01         ` Yao Qi
2013-03-11 12:53 ` [PATCH 5/7] range stepping: New command 'maint set range stepping' Yao Qi
2013-03-11 17:05   ` Eli Zaretskii
2013-03-18  3:10     ` Yao Qi
2013-03-18  5:39       ` Eli Zaretskii
2013-05-14 18:31   ` Pedro Alves
2013-03-11 12:53 ` [PATCH 4/7] range stepping: gdb Yao Qi
2013-05-14 18:31   ` Pedro Alves
2013-05-15  8:07     ` Yao Qi
2013-05-20 17:59       ` Pedro Alves
2013-03-11 12:53 ` [PATCH 3/7] range stepping: gdbserver on x86/linux Yao Qi
2013-05-14 18:30   ` Pedro Alves
2013-05-15  7:40     ` Yao Qi
2013-05-20 18:00       ` Pedro Alves
2013-05-22 10:06         ` Yao Qi
2013-03-11 12:53 ` [PATCH 7/7] range stepping: doc and NEWS Yao Qi
2013-03-11 13:38   ` Abid, Hafiz
2013-03-11 17:01   ` Eli Zaretskii
2013-05-14 18:32   ` Pedro Alves
2013-03-11 12:53 ` [PATCH 2/7] Move rs->support_vCont_t to a separate struct Yao Qi
2013-03-14 20:12 ` [PATCH 0/7] Range stepping Pedro Alves
2013-03-15 19:54   ` Pedro Alves
2013-03-22  2:25     ` Yao Qi
2013-03-22 20:24       ` Pedro Alves
2013-04-11  6:16 ` [PATCH 0/7 V2] " Yao Qi
2013-04-11  6:17   ` [PATCH 2/7] Move rs->support_vCont_t to a separate struct Yao Qi
2013-04-11  6:17   ` [PATCH 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE Yao Qi
2013-04-11  6:18   ` [PATCH 3/7] range stepping: gdbserver on x86/linux Yao Qi
2013-04-11  6:19   ` [PATCH 4/7] range stepping: gdb Yao Qi
2013-04-11 13:22     ` Yao Qi
2013-04-12 12:35       ` Yao Qi
2013-04-11  6:19   ` [PATCH 5/7] range stepping: New command 'maint set range stepping' Yao Qi
2013-04-11 23:00     ` Eli Zaretskii
2013-04-11  6:38   ` [PATCH 6/7] range stepping: test case Yao Qi
2013-04-11  7:30   ` [PATCH 7/7] range stepping: doc and NEWS Yao Qi
2013-04-11 23:00     ` Eli Zaretskii
2013-04-12 20:48   ` [PATCH 0/7 V2] Range stepping Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox