[RFA] tracepoint remote.c:remote_trace_set_readonly_regions give up some regions if it is number is too big
Hui Zhu
teawater@gmail.com
Wed Jun 15 15:53:00 GMT 2011
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;
}
More information about the Gdb-patches
mailing list