From: Hui Zhu <teawater@gmail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] tracepoint remote.c:remote_trace_set_readonly_regions give up some regions if it is number is too big
Date: Wed, 15 Jun 2011 15:53:00 -0000 [thread overview]
Message-ID: <BANLkTim6eKpVGaD6bxBZ2k36NA8R+uLh+Q@mail.gmail.com> (raw)
In-Reply-To: <201106151127.12684.pedro@codesourcery.com>
On Wed, Jun 15, 2011 at 18:27, Pedro Alves <pedro@codesourcery.com> wrote:
> On Wednesday 15 June 2011 08:33:46, Hui Zhu wrote:
>> On Mon, Jun 13, 2011 at 20:21, Pedro Alves <pedro@codesourcery.com> wrote:
>> > Note that if your stub supports qXfer:traceframe-info:read, this packet
>> > is no longer necessary to support, as GDB will handle reading from
>> > readonly sections out of live memory itself. I think this
>> > means that the warning should only be output
>> > if remote_protocol_packets[PACKET_qXfer_traceframe_info].support
>> > is not PACKET_ENABLE?
>>
>> GDB can do that with itself? That is really cool.
>> All this function is implemented inside remote.c?
>
> No, it's in:
>
> target.c:memory_xfer_partial
> target.c:traceframe_available_memory
> target.c:memory_xfer_live_readonly_partial
>
>> What I suggest is if not need, don't send the QTro.
>
> Could work too. It would still be the same
> remote_protocol_packets[PACKET_qXfer_traceframe_info].support
> check...
>
>> And I suggest we always enable this check inside the function.
>
> That was never in question. I was only talking about silencing
> the _warning_.
Sorry for misunderstand your mean. I post a new patch for it. Please
help me review it.
>
>> 2011-06-15 Hui Zhu <teawater@gmail.com>
>>
>> * remote.c (remote_trace_set_readonly_regions): Add a check for
>> target_buf_size.
>
> Okay.
Checked in to 7.3 and trunk.
>
> --
> Pedro Alves
>
Thanks,
Hui
2011-06-15 Hui Zhu <teawater@gmail.com>
* remote.c (remote_trace_set_readonly_regions): Add check for
remote_protocol_packets[PACKET_qXfer_traceframe_info].support before
output warning.
---
remote.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/remote.c
+++ b/remote.c
@@ -10001,7 +10001,9 @@ remote_trace_set_readonly_regions (void)
sec_length = 1 + strlen (tmp1) + 1 + strlen (tmp2);
if (offset + sec_length + 1 > target_buf_size)
{
- warning (_("\
+ if (remote_protocol_packets[PACKET_qXfer_traceframe_info].support
+ != PACKET_ENABLE)
+ warning (_("\
Too many sections for read-only sections definition packet."));
break;
}
next prev parent reply other threads:[~2011-06-15 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-12 14:02 Hui Zhu
2011-06-13 12:21 ` Pedro Alves
2011-06-15 7:35 ` Hui Zhu
2011-06-15 10:27 ` Pedro Alves
2011-06-15 15:53 ` Hui Zhu [this message]
2011-06-15 16:27 ` Pedro Alves
2011-06-16 2:24 ` Hui Zhu
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=BANLkTim6eKpVGaD6bxBZ2k36NA8R+uLh+Q@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@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