public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/15360] can't step into function
Date: Thu, 11 Apr 2013 23:56:00 -0000	[thread overview]
Message-ID: <bug-15360-4717-vs0EHlCVts@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15360-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from dje at google dot com 2013-04-11 23:56:44 UTC ---
gdb is putting the step-resume bkpt at the wrong place.

(gdb) disas function
Dump of assembler code for function function():
   0x00000000004004b4 <+0>:     push   %rbp
   0x00000000004004b5 <+1>:     mov    %rsp,%rbp
   0x00000000004004b8 <+4>:     push   %r12
   0x00000000004004ba <+6>:     push   %rbx
   0x00000000004004bb <+7>:     sub    $0x10,%rsp
   0x00000000004004bf <+11>:    jmp    0x4004c2 <function()+14>
   0x00000000004004c1 <+13>:    nop
   0x00000000004004c2 <+14>:    movl   $0x0,-0x18(%rbp)
   0x00000000004004c9 <+21>:    mov    -0x18(%rbp),%eax
   0x00000000004004cc <+24>:    add    $0x4,%eax
   0x00000000004004cf <+27>:    mov    %eax,-0x14(%rbp)
   0x00000000004004d2 <+30>:    mov    $0x1,%r12d
   0x00000000004004d8 <+36>:    mov    $0x1,%ebx
   0x00000000004004dd <+41>:    lea    -0x20(%rbp),%rax
   0x00000000004004e1 <+45>:    mov    %rax,%rdi
   0x00000000004004e4 <+48>:    callq  0x400514 <foo::~foo()>
   0x00000000004004e9 <+53>:    test   %ebx,%ebx
   0x00000000004004eb <+55>:    je     0x4004c1 <function()+13>
   0x00000000004004ed <+57>:    mov    %r12d,%eax
   0x00000000004004f0 <+60>:    add    $0x10,%rsp
   0x00000000004004f4 <+64>:    pop    %rbx
   0x00000000004004f5 <+65>:    pop    %r12
   0x00000000004004f7 <+67>:    pop    %rbp
   0x00000000004004f8 <+68>:    retq
End of assembler dump.
...
Temporary breakpoint 2, main (argc=1, argv=0x7fffffffe848) at foo.c:23
23        function();
(gdb) s
infrun: clear_proceed_status_thread (process 20005)
infrun: proceed (addr=0xffffffffffffffff, signal=144, step=1)
infrun: resume (step=1, signal=0), trap_expected=0, current thread [process
20005] at 0x400508
infrun: wait_for_inferior ()
infrun: target_wait (-1, status) =
infrun:   20005 [process 20005],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x4004b4
infrun: stepped into subroutine
infrun: inserting step-resume breakpoint at 0x4004c1
infrun: resume (step=0, signal=0), trap_expected=0, current thread [process
20005] at 0x4004b4
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   20005 [process 20005],
infrun:   status->kind = exited, status = 0
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_EXITED
[Inferior 1 (process 20005) exited normally]
infrun: stop_stepping

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  reply	other threads:[~2013-04-11 23:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 23:49 [Bug breakpoints/15360] New: " dje at google dot com
2013-04-11 23:56 ` dje at google dot com [this message]
2013-04-12  8:52 ` [Bug breakpoints/15360] " palves at redhat dot com
2013-04-12 17:59 ` tromey at redhat dot com
2013-04-12 18:16 ` palves at redhat dot com
2013-04-12 18:26 ` palves at redhat dot com
2024-01-08 16:49 ` ssbssa at sourceware dot org

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-15360-4717-vs0EHlCVts@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).