public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Improve readability of x86's SystemTap SDT probe support & fix bug & add testcase
Date: Sat, 28 Dec 2013 23:15:00 -0000	[thread overview]
Message-ID: <m3r48wftyw.fsf@redhat.com> (raw)
In-Reply-To: <20131228034834.GG4532@adacore.com> (Joel Brobecker's message of	"Sat, 28 Dec 2013 07:48:34 +0400")

On Saturday, December 28 2013, Joel Brobecker wrote:

>> This patch reorganizes code on gdb/i386-tdep.c's SystemTap SDT probe
>> support functions.  Before it, the code to parse special operands on x86
>> lived in a single, big function.  This patch creates 2 new functions
>> that makes the code more organized and removes a few indentation levels
>> (which is always good IMO).
>> 
>> While I was making the patch, I decided to create some testcases for it
>> (by tweaking the probe's asm generated by GCC), and found a bug on the
>> parsing code for the triplet displacement operand (i.e., things like
>> "-4+8-20(%rbp)").  Well, since I was already at it, I created some
>> testcases for the two kinds of special operands handled by the code (the
>> triplet displacement mentioned above, and the three-argument
>> displacement like "(%rbx,%ebx,-8)").  This code is target-dependent so I
>> created it under gdb.arch/.
>> 
>> Comments?  OK to apply?
>
> First of all, thanks for creating a testcase!

My pleasure :-).

> I've only skimmed through the patch so far. Generally speaking,
> I definitely agree that simplifying large functions is a useful
> thing to do. Fixing bugs too :). It would be better, though, if
> we could separate the two into different patches, one that does
> the re-org, and nothing else. This one can be large, but we know
> the code hasn't really be changed. Perhaps "git diff/show -b"
> will even confirm that. And the second can include the fix and
> the testcase, and it'll be obvious from the diff what the fix is.
>
> Would you mind doing that?

Absolutely!  I will post the two patches soon :-).

Thanks!

-- 
Sergio

      reply	other threads:[~2013-12-28 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27  4:26 Sergio Durigan Junior
2013-12-28  3:48 ` Joel Brobecker
2013-12-28 23:15   ` Sergio Durigan Junior [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=m3r48wftyw.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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).