public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <gabriel@krisman.be>
To: Pedro Alves <palves@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
	 gdb-patches@sourceware.org,  dje@google.com
Subject: Re: [PATCH v3 00/17] Catch syscall group
Date: Mon, 04 May 2015 02:34:00 -0000	[thread overview]
Message-ID: <87k2wpt6k6.fsf@krisman.be> (raw)
In-Reply-To: <5540ABF8.4000404@redhat.com> (Pedro Alves's message of "Wed, 29	Apr 2015 11:01:28 +0100")

[-- Attachment #1: Type: text/plain, Size: 3493 bytes --]

Pedro Alves <palves@redhat.com> writes:

> On 04/28/2015 09:28 PM, Sergio Durigan Junior wrote:
>> On Tuesday, April 28 2015, Pedro Alves wrote:
>> 
>>> I was wondering if we couldn't share most of the grouping
>>> per-architecture, e.g., by having each arch syscall file xi:include a
>>> base Linux default groups file, that listed the grouping without
>>> the syscall number.  E.g., create a linux-defaults.xml like:
>>>
>> Thanks for the review, Pedro.  I think this is a nice idea, but I would
>> like to propose that we accept the patches as-is, without this
>> improvement, and then work on it later.  First, it's been a long time
>> since we're discussing this feature, and I don't want Krisman to not
>> feel encouraged to continue contributing :-).  
>
> I think there's a difference from the feature itself, which was
> discussed and I'm generally fine with, and the whole set of patches that are
> new in this new revision of the series.  Those are revealing a problem
> that I think should be addressed.

Hi Pedro and Sergio,

Sorry for the time I took to reply to your emails.  Contributing to GDB
is something I do in my free time, and I only have such time on the
weekends nowadays :-)

So, first things first, thank you guys, for your review.

> I'd like to hear what Gabriel thinks (both of my questions in the
> previous email, and this one).

Well, I think this could have come up earlier, so I could have fixed it
already.  As Sergio pointed out, it's been a few months since we started
discussing this feature. :-)

OTOH, I agree that Pedro's suggestion is much more maintainable than
keeping the group information replicated in several xml files.  As a
matter of fact, when I first thought of this feature, I designed
something like his first suggestion, and I'm not sure why I didn't go
ahead with that plan.

> OOC, does strace also maintain a separate group table per architecture?
> Was your script something like a map of syscall _name_ to group?

Strace maintains static tables holding syscall names, numbers and group
information for each architecture separately.

My script parsed those tables and mapped the syscall names in GDB's xmls
to the group information from strace.

> If there are grouping differences between the architectures (other
> than which syscalls are wired/supported), Gabriel will have noticed
> them, but that knowledge is lost (not encoded anywhere) in the
> current form.

I didn't see any difference in group allocation for the same syscall in
different architectures.  So this shouldn't be an issue.

Pedro made two suggestions on how to proceed: (1) keep the information
in a xml file and teach GDB about it or generate the full xml file
during the build; (2) keep the group information inside a tabular text
file and use a simple text substitution to generate the full xml during
the build.

Personally, even though I'm not a big fan of the XML format in general,
I dislike option (2) because inserting a tabular text file now feels a
little clumsy.  since we already use XML for syscalls, I think syscall
groups should be stored similarly.

I plan to send a new version later this week (as soon as I have a break
From college) that implements Pedro's first suggestion.  Now, we keep
the information inside linux-defaults.xml and have a XSL script to
performs a join of the information and generate the full XML file.

Thanks!

-- 
Gabriel Krisman Bertazi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2015-05-04  2:34 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26  1:25 Gabriel Krisman Bertazi
2015-04-26  1:25 ` [PATCH v3 01/17] Implemement support for groups of syscalls in the xml-syscall interface Gabriel Krisman Bertazi
2015-04-26  1:25 ` [PATCH v3 02/17] Add support to catch groups of syscalls Gabriel Krisman Bertazi
2015-04-26  1:25 ` [PATCH v3 03/17] Add tests for catching groups of syscalls on supported architectures Gabriel Krisman Bertazi
2015-04-26 18:44   ` Sergio Durigan Junior
2015-04-26  1:26 ` [PATCH v3 07/17] Create syscall groups for aarch64 Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 08/17] Create syscall groups for arm Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 12/17] Create syscall groups for mips-n64 Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 10/17] Create syscall groups for i386 Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 06/17] Create syscall groups for ppc64 Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 04/17] Create syscall groups for amd64 Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 09/17] Create syscall groups for bfin Gabriel Krisman Bertazi
2015-04-26  1:26 ` [PATCH v3 05/17] Create syscall groups for ppc Gabriel Krisman Bertazi
2015-04-26  1:47 ` [PATCH v3 15/17] Create syscall groups for s390x Gabriel Krisman Bertazi
2015-04-26  1:47 ` [PATCH v3 16/17] Create syscall groups for sparc Gabriel Krisman Bertazi
2015-04-26  1:47 ` [PATCH v3 17/17] Create syscall groups for sparc64 Gabriel Krisman Bertazi
2015-04-26  1:47 ` [PATCH v3 14/17] Create syscall groups for s390 Gabriel Krisman Bertazi
2015-04-26  1:47 ` [PATCH v3 11/17] Create syscall groups for mips-n32 Gabriel Krisman Bertazi
2015-04-26  1:47 ` [PATCH v3 13/17] Create syscall groups for mips-o32 Gabriel Krisman Bertazi
2015-04-26 18:58 ` [PATCH v3 00/17] Catch syscall group Sergio Durigan Junior
2015-04-28 11:24 ` Pedro Alves
2015-04-29  0:45   ` Sergio Durigan Junior
2015-04-29 10:44     ` Pedro Alves
2015-05-04  2:34       ` Gabriel Krisman Bertazi [this message]
2015-05-06 14:38         ` Pedro Alves
2015-05-10 18:34           ` Gabriel Krisman Bertazi
2015-05-10 19:01             ` Sergio Durigan Junior
2015-05-11  0:28               ` [PATCH v4 0/4] catch " Gabriel Krisman Bertazi
2015-05-11  0:28                 ` [PATCH v4 2/5] Add support to catch groups of syscalls Gabriel Krisman Bertazi
2015-05-13 10:38                   ` Pedro Alves
2015-05-11  0:28                 ` [PATCH v4 4/5] Include group information in xml syscall files Gabriel Krisman Bertazi
2015-05-12 21:42                   ` Doug Evans
2015-05-13  1:17                     ` Gabriel Krisman Bertazi
2015-05-13 10:43                   ` Pedro Alves
2015-05-11  0:28                 ` [PATCH v4 3/5] Add tests for catching groups of syscalls on supported architectures Gabriel Krisman Bertazi
2015-05-11  0:28                 ` [PATCH v4 5/5] Update documentation on catching a group of related syscalls Gabriel Krisman Bertazi
2015-05-11  0:40                   ` Gabriel Krisman Bertazi
2015-05-13 10:30                     ` Pedro Alves
2015-05-13 16:40                       ` Eli Zaretskii
2015-05-11  0:28                 ` [PATCH v4 1/5] Implemement support for groups of syscalls in the xml-syscall interface Gabriel Krisman Bertazi
2015-05-13 10:47                 ` [PATCH v4 0/4] catch syscall group Pedro Alves
2015-05-11 11:39               ` [PATCH v3 00/17] Catch " 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=87k2wpt6k6.fsf@krisman.be \
    --to=gabriel@krisman.be \
    --cc=dje@google.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).