From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 6/7] range stepping: test case
Date: Mon, 20 May 2013 18:29:00 -0000 [thread overview]
Message-ID: <519A6B6A.1030107@redhat.com> (raw)
In-Reply-To: <519346F0.1030507@codesourcery.com>
On 05/15/2013 09:27 AM, Yao Qi wrote:
> On 05/15/2013 02:32 AM, Pedro Alves wrote:
>> I prefer this over the convenience variable hack. If we ever
>> make range stepping work on a target !remote, we can switch to
>> look at "set debug infrun 1" output or some new "set debug range-step"
>> output. I didn't understand your stated reason in v2 for
>> switching away from this. If it was that expect buffer
>> overflows, v3 has a tweak that likely fixes it.
>
> In our tests, when running tests with a problematic stub supporting range
> stepping, the range stepping of the stub falls back to the single stepping.
> This will generate a huge number of rsp packets, and the gdb.log will blow up
> to several giga-byte.
I see. Thanks, that's much more detailed info than just saying "it's unsafe".
I'm guessing the huge number of RSP packets comes from that big loop in the
test:
/* Generate a range that includes a loop, which is time consuming.
Variable C is used to terminate the loop earlier when GDB
wants. */
for (c = 1, a = 0; a < 65535 && c; a++) {for (b = 0; b < 65535 && c; b++) { d1 = d2 * a / b; d2 = d1 *
We could skip most of the range stepping tests if e.g., the
test that steps the short line FAILs:
/* A line of source will be generated to a number of
instructions by compiler. */
a = b + c + d * e - a; /* location 1 */
WDYT?
> We use convince variable to avoid this problem. On the other
> hand, I don't think it is a good idea to peek the GDB internal states by
> checking some rsp packets and personally I prefer the way that GDB is able to expose
> some internal states by some means (command "maint" and convince variables, for example).
I don't like using a convenience variable for this, as those are visible
to the user (show convenience).
"maint" seems better. But I'm not certain of it. An issue I have with it
is that from the log you just see the condensed report of what happened
(sent 4 vCont;r, should have been 3), while to diagnose the issue you'll
most likely need to get more info than that ("Okay, what was really sent?
What were the ranges? Were there signals interrupting the range? Etc."). I
have a suspicion we'll end up needing to end up with "set debug infrun 1"
on, and look at that too for some of the trickier cases, and end up with
different number of expected ranges depending on target on some cases.
The actual difference between v1 -> v2 wrt to the RSP packets vs
convenience var was surprisingly smaller than I anticipated. So how
about we go with RSP first, and see how things go from there?
--
Pedro Alves
next prev parent reply other threads:[~2013-05-20 18:29 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 12:52 [PATCH 0/7] Range stepping Yao Qi
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 2/7] Move rs->support_vCont_t to a separate struct 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 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 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 [this message]
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 1/7] New macro THREAD_WITHIN_SINGLE_STEP_RANGE Yao Qi
2013-05-14 19:24 ` Pedro Alves
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 5/7] range stepping: New command 'maint set range stepping' Yao Qi
2013-04-11 23:00 ` Eli Zaretskii
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: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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519A6B6A.1030107@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox