From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Josh Stone <jistone@redhat.com>
Cc: gdb-patches@sourceware.org, sergiodj@redhat.com, palves@redhat.com
Subject: Re: [RFC] reviving 'catch syscall' for gdbserver
Date: Sun, 20 Sep 2015 16:53:00 -0000 [thread overview]
Message-ID: <1442768026.6486.21.camel@skynet.be> (raw)
In-Reply-To: <55FCAF79.7060504@redhat.com>
On Fri, 2015-09-18 at 17:42 -0700, Josh Stone wrote:
> On 09/15/2015 03:01 PM, Philippe Waroquiers wrote:
> > On Fri, 2015-09-11 at 18:44 -0700, Josh Stone wrote:
> What about relying on the current target, and use Hg switching? Or is
> it more common for new commands to have an explicit pid? It doesn't
> look like many q packets have a pid, even though many have an action
> specific to one target.
Yes, that will work, and is effectively used for many
operations/packets.
Note that as far as I can see, gdb + gdbserver + multiple arch
inferiors + breakpoints seems somewhat broken.
E.g. I tried 7.10 gdb+gdbserver --multi, with 2 inferiors
of different archs : x86 (badseg) and amd64 (trivialleak).
The way breakpoints are handled seems buggy to me.
E.g. at some point, I had:
(gdb) info break
Num Type Disp Enb Address What
2 breakpoint keep y 0x080484f9 in main at badseg.c:13 inf 2
3 breakpoint keep y 0x000000000040053a in main at trivialleak.c:11 inf 1
(breakpoints set using *0x....)
So, a breakpoint for 'inf 2' and a breakpoint for 'inf 1'.
Then when doing run, gdb reported:
Warning:
Cannot insert breakpoint 2.
Cannot access memory at address 0x80484f9
So, GDB (wronly IMO) tried to insert a breakpoint aimed at the x86 inferior
in the amd64 inferior.
Same problem when running the x86 target: it could not insert the amd64 breakpoint.
What is even more strange is that after that, the info breakpoints gives:
(gdb) info break
Num Type Disp Enb Address What
2 breakpoint keep y 0x080484f9 in main at badseg.c:13 inf 2
3 breakpoint keep y 0x000000000040053a inf 2
So, the breakpoint 3 'was lost' for inferior 1, and was 'transferred' to inferior 2.
I also searched for the regexp 'inf [0-9]' in the doc, and could
not find anything. The description for 'What' in the manual of 'info breakpoints'
does only describe file/line number.
So, this 'inf x' in info breakpoint seems not documented.
More generally, I could not find a description of the behaviour of breakpoints
with multiple inferiors and/or multiple archs inferior.
The doc only says: "Many commands will work the same with multiple programs as with a
single program ..."
No more details found.
Philippe
prev parent reply other threads:[~2015-09-20 16:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-12 1:44 Josh Stone
2015-09-12 2:27 ` Sergio Durigan Junior
2015-09-19 0:28 ` Josh Stone
2015-09-15 22:01 ` Philippe Waroquiers
2015-09-19 0:42 ` Josh Stone
2015-09-20 16:53 ` Philippe Waroquiers [this message]
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=1442768026.6486.21.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=jistone@redhat.com \
--cc=palves@redhat.com \
--cc=sergiodj@redhat.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