From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Pedro Alves <palves@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>, gdb-patches@sourceware.org
Subject: Re: RFA [PATCH v4] Implement 'catch syscall' for gdbserver (was Re: RFA [PATCH v3] Implement 'catch syscall' for gdbserver)
Date: Wed, 09 Oct 2013 21:54:00 -0000 [thread overview]
Message-ID: <1381355683.2141.68.camel@soleil> (raw)
In-Reply-To: <524FD8A9.2010006@redhat.com>
On Sat, 2013-10-05 at 10:15 +0100, Pedro Alves wrote:
> Hi,
>
> I don't have time right now for a more elaborate answer, but ...
>
> On 10/04/2013 06:29 PM, Pedro Alves wrote:
> >
> > Thinking only in terms of multi-process/thread, I'm inclined to ignore the
> > "per-process" thing now, and just leave it as gdbserver making catch
> > syscall apply to all processes.
>
> I just realized that we really can't do that. The syscall numbers
> sent across the wire are the target-specific numbers. Since gdbserver
> might well be debugging processes of different gdbarch's simultaneously
> (see the multi-arch support patches from a while ago, the tdesc support
> in gdbserver, etc.), we can't assume the same syscall array makes sense
> for all processes under gdbserver's control.
>
Hello,
Getting back to this after a period of other activitites,
here is a suggested list of approaches
to address the major comments given in various mails:
* QCatchSyscalls contains target specific numbers (this is the
above comment)
=> have gdbserver handling QCatchSyscalls packet per inferior
* ensure QCatchSyscall packet can (in the future) be extended with
a COND_LIST (similar to the Z packets).
To do that, I suggest to have the QCatchSyscalls separating syscall
numbers with a , rather than a ;
(so that a ; can be used later to separate the list of syscalls
from the COND_LIST)
Note: Luis suggested the alternative to have a packet
QInsertCatchPoint:[fork|syscall|exec|...]
Then gdbserver will tell in QSupported that it e.g. support
QInsertCatchPoint=syscall,fork
For what concerns the problem of identifying which catchpoint
to remove in the QRemoveCatchPoint: not too sure we need
an catch point id for that. We can assume that an QInsertCatchPoint
of a certain kind fully replace the previously inserted catchpoint
of the same kind. A QRemoveCatchpoint removes completely
the catchpoint of the same kind.
I can go the QInsertCatchPoint way if it is confirmed this is a better
approach.
* Need to investigate the bug in gdb 'catch syscall' flip/flop logic.
If this logic can be fixed, then have gdbserver and gdb using
the same logic.
* extend the stop reply packet to allow to return a
"syscall" stop reason that does not specify if this is a syscall
entry or exit.
I suggest to do this even if a correct flip/flop logic can be
found during the previous investigation.
This 3rd syscall stop reason allow stubs to report a syscall
without necessarily having the logic to differentiate entry
from return.
Any comments about the above approaches ?
(in particular, about the choice between QCatchSyscalls
and QInsertCatchPoint).
Thanks
Philippe
next prev parent reply other threads:[~2013-10-09 21:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 20:55 RFA [PATCH v3] Implement 'catch syscall' for gdbserver Philippe Waroquiers
2013-09-21 21:03 ` Eli Zaretskii
2013-09-23 11:51 ` Agovic, Sanimir
2013-09-23 19:32 ` Philippe Waroquiers
2013-09-24 7:07 ` Agovic, Sanimir
2013-09-25 16:55 ` Sergio Durigan Junior
2013-09-25 22:55 ` Philippe Waroquiers
2013-09-27 13:25 ` [COMMIT PATCH] remote.c: Remove unnecessary fields from 'struct stop_reply'. (was: Re: RFA [PATCH v3] Implement 'catch syscall' for gdbserver) Pedro Alves
2013-09-27 19:30 ` RFA [PATCH v3] Implement 'catch syscall' for gdbserver Pedro Alves
2013-09-27 20:13 ` Philippe Waroquiers
2013-09-27 20:55 ` Sergio Durigan Junior
2013-09-29 15:04 ` RFA [PATCH v4] Implement 'catch syscall' for gdbserver (was Re: RFA [PATCH v3] Implement 'catch syscall' for gdbserver) Philippe Waroquiers
2013-10-01 5:16 ` Sergio Durigan Junior
2013-10-02 21:02 ` Sergio Durigan Junior
2013-10-02 19:41 ` Always run the PTRACE_O_TRACESYSGOOD tests even if PTRACE_O_TRACEFORK is not supported. (was: Re: RFA [PATCH v4] " Pedro Alves
2013-10-02 22:08 ` Philippe Waroquiers
2013-10-03 10:16 ` Always run the PTRACE_O_TRACESYSGOOD tests even if PTRACE_O_TRACEFORK is not supported Pedro Alves
2013-10-03 18:40 ` RFA [PATCH v4] Implement 'catch syscall' for gdbserver (was Re: RFA [PATCH v3] Implement 'catch syscall' for gdbserver) Pedro Alves
2013-10-03 19:53 ` Tom Tromey
2013-10-04 17:41 ` Pedro Alves
2013-10-03 22:02 ` Philippe Waroquiers
2013-10-04 17:29 ` Pedro Alves
2013-10-05 9:15 ` Pedro Alves
2013-10-09 21:54 ` Philippe Waroquiers [this message]
2013-10-09 22:05 ` Sergio Durigan Junior
2013-10-09 22:09 ` Philippe Waroquiers
2013-10-04 4:22 ` Luis Machado
2013-10-04 17:40 ` Pedro Alves
2013-10-04 18:55 ` Stan Shebs
2013-10-07 19:07 ` Pedro Alves
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=1381355683.2141.68.camel@soleil \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--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