This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How step over a ass call command?


Peng Yu <pengyu.ut@gmail.com> writes:

>>> Suppose that I use gdb with a binary file with source stripped.

What do you mean by "a binary file with source stripped"?  Did you
compile without debug information?  My gdb (built from current git repo
for x86-linux target) works correctly for binary without debug info.

(gdb) disassemble 
Dump of assembler code for function main:
   0x08048406 <+0>:     push   %ebp
   0x08048407 <+1>:     mov    %esp,%ebp
=> 0x08048409 <+3>:     call   0x8048400 <foo>
   0x0804840e <+8>:     mov    $0x0,%eax
   0x08048413 <+13>:    pop    %ebp
   0x08048414 <+14>:    ret    
End of assembler dump.
(gdb) ni
0x0804840e in main ()

>> Try nexti, which is defined as
>>     Execute one machine instruction, but if it is a function call, proceed
>>     until the function returns
>
> I am sorry. I meant to say "nexti" in my original email. "nexti" seems
> to the same as "stepi" when the source code is stripped. Is it
> supposed to be so?

No, it looks a bug to me.  What is your gdb version? or you can report
this bug here https://sourceware.org/bugzilla/

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]