public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/16889] gdb segfaults when printing ASM SDT arguments Date: Fri, 02 May 2014 20:53:00 -0000 [thread overview] Message-ID: <bug-16889-4717-eajhAGRI3u@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-16889-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=16889 --- Comment #2 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 30a1e6cc7750ce016ea70afa795c0764d07d21ae (commit) via f33da99a5410692ddf1302435e27b1bfc21d0b11 (commit) from 54cb4522e7555fdf766201c3c74bfc8510c83424 (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=30a1e6cc7750ce016ea70afa795c0764d07d21ae commit 30a1e6cc7750ce016ea70afa795c0764d07d21ae Author: Sergio Durigan Junior <sergiodj@redhat.com> Date: Fri May 2 17:50:45 2014 -0300 Extend recognized types of SDT probe's arguments This commit is actually an update to make the parser in gdb/stap-probe.c be aware of all the possible prefixes that a probe argument can have. According to the section "Argument Format" in: <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation> The bitness of the arguments can be 8, 16, 32 or 64 bits, signed or unsigned. Currently GDB recognizes only 32 and 64-bit arguments. This commit extends this. It also provides a testcase, only for x86_64 systems. gdb/ 2014-05-02 Sergio Durigan Junior <sergiodj@redhat.com> * stap-probe.c (enum stap_arg_bitness): New enums to represent 8 and 16-bit signed and unsigned arguments. Update comment. (stap_parse_probe_arguments): Extend code to handle such arguments. Use warning instead of complaint to notify about unrecognized bitness. gdb/testsuite/ 2014-05-02 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.arch/amd64-stap-optional-prefix.S (main): Add several probes to test for bitness recognition. * gdb.arch/amd64-stap-optional-prefix.exp (test_probe_value_without_reg): New procedure. Add code to test for different kinds of bitness. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f33da99a5410692ddf1302435e27b1bfc21d0b11 commit f33da99a5410692ddf1302435e27b1bfc21d0b11 Author: Sergio Durigan Junior <sergiodj@redhat.com> Date: Fri May 2 17:45:35 2014 -0300 Fix PR breakpoints/16889: gdb segfaults when printing ASM SDT arguments This commit fixes PR breakpoints/16889, which is about a bug that triggers when GDB tries to parse probes whose arguments do not contain the initial (and optional) "N@" part. For reference sake, the de facto format is described here: <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation> Anyway, this PR actually uncovered two bugs (related) that were happening while parsing the arguments. The first one was that the parser *was* catching *some* arguments that were missing the "N@" part, but it wasn't correctly setting the argument's type. This was causing a NULL pointer being dereferenced, ouch... The second bug uncovered was that the parser was not catching all of the cases for a probe which did not provide the "N@" part. The fix for that was to simplify the check that the code was making to identify non-prefixed probes. The code is simpler and easier to read now. I am also providing a testcase for this bug, only for x86_64 architectures. gdb/ 2014-05-02 Sergio Durigan Junior <sergiodj@redhat.com> PR breakpoints/16889 * stap-probe.c (stap_parse_probe_arguments): Simplify check for non-prefixed probes (i.e., probes whose arguments do not start with "N@"). Always set the argument type to a sane value. gdb/testsuite/ 2014-05-02 Sergio Durigan Junior <sergiodj@redhat.com> PR breakpoints/16889 * gdb.arch/amd64-stap-optional-prefix.S: New file. * gdb.arch/amd64-stap-optional-prefix.exp: Likewise. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 16 ++++ gdb/stap-probe.c | 76 ++++++++++++---- gdb/testsuite/ChangeLog | 14 +++ .../gdb.arch/amd64-stap-optional-prefix.S | 42 +++++++++ .../gdb.arch/amd64-stap-optional-prefix.exp | 91 ++++++++++++++++++++ 5 files changed, 220 insertions(+), 19 deletions(-) create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.S create mode 100644 gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2014-05-02 20:53 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-30 22:13 [Bug breakpoints/16889] New: " jistone at redhat dot com 2014-04-30 22:19 ` [Bug breakpoints/16889] " sergiodj at redhat dot com 2014-05-01 21:54 ` sergiodj at redhat dot com 2014-05-02 20:53 ` cvs-commit at gcc dot gnu.org [this message] 2014-05-02 20:55 ` sergiodj at redhat dot com
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=bug-16889-4717-eajhAGRI3u@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).