From: Luis Gustavo <luis_gustavo@mentor.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix breakpoint updates for multi-inferior
Date: Tue, 07 Feb 2012 23:44:00 -0000 [thread overview]
Message-ID: <4F31B73A.7090606@mentor.com> (raw)
In-Reply-To: <4F20610B.5010403@mentor.com>
On 01/25/2012 06:07 PM, Luis Gustavo wrote:
> Hi,
>
> While working on the target-side condition evaluation patch, i stumbled
> upon the strange situation where GDB had more than a single "inserted"
> location in a list with multiple duplicate locations.
>
> Further investigation showed that the logic for finding the first
> inserted location at a specific address does not work when multiple
> inferiors are being debugged. This code is inside
> update_global_location_list (...).
>
> This is partly because we expect the list of locations to be sorted by
> breakpoint numbers and addresses.
>
> Suppose we're going through locations at address FOO, and we already
> defined the "first" for that set of locations. When a location does not
> match the "first" location of that address, we then assume we've gone
> past the locations at address FOO. This is correct for single inferiors.
>
> Now, consider a multi-inferior scenario and breakpoints with locations
> on multiple inferiors. The code will fail to match two locations due to
> the difference between the locations' program spaces, thus failing to
> mark duplicate locations correctly.
>
> This patch solves this by updating the locations one program space at a
> time, thus preventing multiple insertions of the same location.
>
> This bug shows up when doing multi-inferior debugging in GDBServer. You
> will notice GDB sending multiple insert/remove requests for the same
> address.
>
> OK?
>
> Luis
Ping?
next prev parent reply other threads:[~2012-02-07 23:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 21:27 Luis Gustavo
2012-02-07 23:44 ` Luis Gustavo [this message]
2012-02-08 15:17 ` Pedro Alves
2012-02-08 15:27 ` Luis Gustavo
2012-02-08 15:47 ` Pedro Alves
2012-02-08 17:28 ` [patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior] Jan Kratochvil
2012-02-08 23:19 ` Luis Gustavo
2012-02-08 23:32 ` Joel Brobecker
2012-02-08 23:40 ` Luis Gustavo
2012-02-09 8:23 ` Jan Kratochvil
2012-02-09 11:05 ` Luis Gustavo
2012-02-09 11:32 ` Pedro Alves
2012-02-24 15:24 ` Luis Gustavo
2012-02-09 8:21 ` [commit] " Jan Kratochvil
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=4F31B73A.7090606@mentor.com \
--to=luis_gustavo@mentor.com \
--cc=gdb-patches@sourceware.org \
/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