public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "psmith at gnu dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/16280] New: Step into an inline function with varargs doesn't stop
Date: Sun, 01 Dec 2013 19:40:00 -0000	[thread overview]
Message-ID: <bug-16280-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 16280
           Summary: Step into an inline function with varargs doesn't stop
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: psmith at gnu dot org

Created attachment 7311
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7311&action=edit
Repro case compressed tarball

I am using GCC 4.8.1 and GDB 7.6.1 built with Python 2.7.6 on my GNU/Linux
system.  In a C++ inline function that uses va_list, if I try to step into that
inline function it will not stop and just keep running.  If I use "next" to
skip over the function, that works properly.  If I use "si" to step by
instructions until I get into the inline function, then I can continue to use
normal step/next commands and it works properly.

I've also tried this with GCC 4.8.0 / GDB 7.6 / Python 2.7.5, with the same
result.

Attached is a tar file containing a repro case.  Compile it like this:

    gcc -g -o step main.cpp Step.cpp

Now debugging:

  $ gdb ./step
  GNU gdb (GDB) 7.6.1
  ...
  Reading symbols from ./step...done.
  (gdb) l
  1       #include "Step.h"
  2       
  3       int main(int argc, const char** argv)
  4       {
  5           Step step;
  6           step.show("hi %s\n", "there");
  7           return 0;
  8       }

  (gdb) br 6
  Breakpoint 1 at 0x4006ff: file main.cpp, line 6.

  (gdb) run
  Starting program: ./step 

  Breakpoint 1, main (argc=1, argv=0x7fffffffe638) at main.cpp:6
  6           step.show("hi %s\n", "there");

  (gdb) step
  hi there
  [Inferior 1 (process 24724) exited normally]

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


             reply	other threads:[~2013-12-01 19:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-01 19:40 psmith at gnu dot org [this message]
2013-12-01 22:03 ` [Bug breakpoints/16280] " palves at redhat dot com
2013-12-01 22:05 ` palves at redhat dot com
2013-12-01 22:08 ` palves at redhat dot com
2013-12-01 22:08 ` palves at redhat dot com
2013-12-01 22:11 ` palves at redhat dot com
2013-12-01 22:23 ` palves at redhat dot com
2013-12-01 22:30 ` palves at redhat dot com
2013-12-01 22:40 ` palves at redhat dot com
2013-12-02  0:14 ` psmith at gnu dot org
2013-12-17 10:47 ` gbenson 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-16280-4717@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: 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).