This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 00/17] Catch syscall group


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: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]