public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/16397] New: SystemTap SDT probe support for x86 doesn't work with "triplet operands"
@ 2014-01-06  3:55 sergiodj at redhat dot com
  2014-02-20 21:52 ` [Bug tdep/16397] " cvs-commit at gcc dot gnu.org
  2014-02-20 21:53 ` sergiodj at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: sergiodj at redhat dot com @ 2014-01-06  3:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16397

            Bug ID: 16397
           Summary: SystemTap SDT probe support for x86 doesn't work with
                    "triplet operands"
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: sergiodj at redhat dot com
          Reporter: sergiodj at redhat dot com

The SystemTap SDT probe implementation for x86 (i*86 and x86_64) support, in
theory, what we call "triplet operands", i.e., "-8+3+1(%rbp)".  However, the
current code has a bug and doesn't support this in the right way.

I've already have a fix and a testcase for it.  This bug is mostly a "don't
forget" :-).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tdep/16397] SystemTap SDT probe support for x86 doesn't work with "triplet operands"
  2014-01-06  3:55 [Bug tdep/16397] New: SystemTap SDT probe support for x86 doesn't work with "triplet operands" sergiodj at redhat dot com
@ 2014-02-20 21:52 ` cvs-commit at gcc dot gnu.org
  2014-02-20 21:53 ` sergiodj at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-02-20 21:52 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=16397

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  d7b30f6729ecf47b932b17f77123663e6a21bdd6 (commit)
      from  3bc32da325e4bf048220a1228a8a6fa65a15225f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d7b30f6729ecf47b932b17f77123663e6a21bdd6

commit d7b30f6729ecf47b932b17f77123663e6a21bdd6
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Thu Feb 20 18:49:09 2014 -0300

    Fix for PR tdep/16397: SystemTap SDT probe support for x86 doesn't work
with "triplet operands"

    This is the continuation of what Joel proposed on:

    <https://sourceware.org/ml/gdb-patches/2013-12/msg00977.html>

    Now that I have already submitted and pushed the patch to split
    i386_stap_parse_special_token into two smaller functions, it is indeed
    simpler to understand this patch.

    It occurs because, on x86, triplet displacement operands are allowed
    (like "-4+8-20(%rbp)"), and the current parser for this expression is
    buggy.  It does not correctly extract the register name from the
    expression, which leads to incorrect evaluation.  The parser was also
    being very "generous" with the expression, so I included a few more
    checks to ensure that we're indeed dealing with a triplet displacement
    operand.

    This patch also includes testcases for the two different kind of
    expressions that can be encountered on x86: the triplet displacement
    (explained above) and the three-argument displacement (as in
    "(%rbx,%ebx,-8)").  The tests are obviously arch-dependent and are
    placed under gdb.arch/.

    Message-ID: <m3mwj1j12v.fsf@redhat.com>
    URL: <https://sourceware.org/ml/gdb-patches/2014-01/msg00310.html>

    gdb/
    2014-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>

        PR tdep/16397
        * i386-tdep.c (i386_stap_parse_special_token_triplet): Check if a
        number comes after the + or - signs.  Adjust length of register
        name to be extracted.

    gdb/testsuite/
    2014-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>

        PR tdep/16397
        * gdb.arch/amd64-stap-special-operands.exp: New file.
        * gdb.arch/amd64-stap-three-arg-disp.S: Likewise.
        * gdb.arch/amd64-stap-three-arg-disp.c: Likewise.
        * gdb.arch/amd64-stap-triplet.S: Likewise.
        * gdb.arch/amd64-stap-triplet.c: Likewise.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                                      |    7 ++
 gdb/i386-tdep.c                                    |   11 ++-
 gdb/testsuite/ChangeLog                            |    9 ++
 .../gdb.arch/amd64-stap-special-operands.exp       |   47 +++++++++++
 gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.S |   58 +++++++++++++
 gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.c |   31 +++++++
 gdb/testsuite/gdb.arch/amd64-stap-triplet.S        |   88 ++++++++++++++++++++
 gdb/testsuite/gdb.arch/amd64-stap-triplet.c        |   31 +++++++
 8 files changed, 281 insertions(+), 1 deletions(-)
 create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
 create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.c
 create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-triplet.S
 create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-triplet.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tdep/16397] SystemTap SDT probe support for x86 doesn't work with "triplet operands"
  2014-01-06  3:55 [Bug tdep/16397] New: SystemTap SDT probe support for x86 doesn't work with "triplet operands" sergiodj at redhat dot com
  2014-02-20 21:52 ` [Bug tdep/16397] " cvs-commit at gcc dot gnu.org
@ 2014-02-20 21:53 ` sergiodj at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: sergiodj at redhat dot com @ 2014-02-20 21:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16397

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-20 21:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-06  3:55 [Bug tdep/16397] New: SystemTap SDT probe support for x86 doesn't work with "triplet operands" sergiodj at redhat dot com
2014-02-20 21:52 ` [Bug tdep/16397] " cvs-commit at gcc dot gnu.org
2014-02-20 21:53 ` sergiodj at redhat dot com

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).