Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Josh Stone <jistone@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: gdb-patches@sourceware.org, philippe.waroquiers@skynet.be,
	       palves@redhat.com
Subject: Re: [RFC] reviving 'catch syscall' for gdbserver
Date: Sat, 19 Sep 2015 00:28:00 -0000	[thread overview]
Message-ID: <55FCAC2D.8070905@redhat.com> (raw)
In-Reply-To: <87vbbgpe1u.fsf@redhat.com>

On 09/11/2015 07:27 PM, Sergio Durigan Junior wrote:
> Hi Josh,
> 
> First of all, thanks for the patch and for reviving.  This e-mail is not
> really an in-depth reply; just a few things I would like to mention from
> the top of my head.

Thanks!

>>> * QCatchSyscalls contains target specific numbers (this is the
>>>   above comment)
>>>   => have gdbserver handling QCatchSyscalls packet per inferior
>>
>> Does this still need to be per-inferior?  I do understand that syscall
>> numbers may differ, e.g. from i686 to x86_64 on the same target.  Are
>> there any other examples of such things that are dealt with separately?
> 
> I pushed:
> 
>   <https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=458c8db89f7e9913da6fa67c3df73404375c436b>
> 
>   (discussion: <https://sourceware.org/ml/gdb-patches/2014-11/msg00227.html>)
> 
> meanwhile, which should help address this issue (though it doesn't fix
> the whole problem).  You might be interested in reading
> https://sourceware.org/bugzilla/show_bug.cgi?id=10737 as well.

AIUI, you made the syscall tables per-arch, which is certainly good.
But what happens when there are multiple inferiors of different archs?
Are the syscall catchpoints per-inferior?

It occurred to me that exec switching archs would be a problem, which
Pedro also mentioned in PR10737#c5.  So either gdbserver needs to be
told syscalls by name, and remap them on exec, or the client needs an
exec event so it can update a new QCatchSyscalls set itself.

I suppose the client could catch the exec syscall directly, but surely
it would be better to have a event based on PTRACE_EVENT_EXEC.
Something to add in the style of fork-event?


  reply	other threads:[~2015-09-19  0:28 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 [this message]
2015-09-15 22:01 ` Philippe Waroquiers
2015-09-19  0:42   ` Josh Stone
2015-09-20 16:53     ` Philippe Waroquiers

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=55FCAC2D.8070905@redhat.com \
    --to=jistone@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=philippe.waroquiers@skynet.be \
    --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