From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [unavailable values part 1, 16/17] don't merge almost but not quite adjacent memory ranges to collect
Date: Mon, 14 Feb 2011 12:01:00 -0000 [thread overview]
Message-ID: <20110214120116.GI2454@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <201102071435.20804.pedro@codesourcery.com>
On Mon, 07 Feb 2011 15:35:20 +0100, Pedro Alves wrote:
> --- src.orig/gdb/tracepoint.c 2011-02-07 13:17:26.276706003 +0000
> +++ src/gdb/tracepoint.c 2011-02-07 13:27:53.276706002 +0000
> @@ -841,13 +841,12 @@ memrange_sortmerge (struct collection_li
> {
> for (a = 0, b = 1; b < memranges->next_memrange; b++)
> {
> - if (memranges->list[a].type == memranges->list[b].type &&
> - memranges->list[b].start - memranges->list[a].end <=
> - MAX_REGISTER_SIZE)
> + /* If memrange b overlaps or is adjacent to memrange a,
> + merge them. */
> + if (memranges->list[a].type == memranges->list[b].type
> + && memranges->list[b].start <= memranges->list[a].end)
> {
> - /* memrange b starts before memrange a ends; merge them. */
> - if (memranges->list[b].end > memranges->list[a].end)
> - memranges->list[a].end = memranges->list[b].end;
> + memranges->list[a].end = memranges->list[b].end;
> continue; /* next b, same a */
> }
> a++; /* next a */
It is an unrelated issue to this patch but this function is not a general
normalizer for overlapping ranges, with bug(s) similar to
normalize_mem_ranges. But maybe it does not have to be so general, all the
possible contents of the tracing protocol are unknown to me.
Thanks,
Jan
next prev parent reply other threads:[~2011-02-14 12:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 14:35 Pedro Alves
2011-02-14 12:01 ` Jan Kratochvil [this message]
2011-02-16 13:10 ` Pedro Alves
2011-02-16 18:00 ` Tom Tromey
2011-02-16 18:03 ` Pedro Alves
2011-02-16 18:07 ` Tom Tromey
2011-02-16 18:09 ` Pedro Alves
2011-02-16 18:09 ` Tom Tromey
2011-02-16 21:01 ` FYI: handle DW_OP_call_frame_cfa in AX compiler (Was: [unavailable values part 1, 16/17] don't merge almost but not quite adjacent memory ranges to collect) Tom Tromey
2011-02-16 21:31 ` FYI: handle DW_OP_call_frame_cfa in AX compiler Pedro Alves
2011-02-16 21:40 ` Tom Tromey
2011-02-16 23:27 ` Pedro Alves
2011-02-17 16:24 ` Tom Tromey
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=20110214120116.GI2454@host1.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.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