This is the mail archive of the gdb-prs@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]

[Bug gdb/10945] New: internal gdb problem with reverse-finish


While running reverse-finish in a simple program, gdb reported an
internal-error.

Using gdb-7.0 compiled from source (standard ./configure --prefix=...,
make, make install).

How to reproduce:
1) Save this as foo.c:
================================================================
#include <stdio.h>
int main ()
{
  static char foo[] = "foo";
  int i;
  for (i = 0; i < 3; i++)
    printf ("%02x\n", foo[i]);
  return 0;
}
================================================================

2) Compile it (I use gcc 4.4.1 as in Ubuntu 9.10):
$ gcc -ggdb foo.c -o foo

3) Launch a gdb session:
$ gdb foo
(gdb) break main
(gdb) run
(gdb) target record
(gdb) next
(gdb) continue
y
(gdb) where
(gdb) reverse-next
(gdb) reverse-next
(gdb) reverse-next
(gdb) where
(gdb) reverse-finish

Expected results: No internal gdb error.

Actual results:
$ gdb foo               

warning: Can not parse XML syscalls information; XML support was disabled at
compile time.                                                                      
GNU gdb (GDB) 7.0                                                               
Copyright (C) 2009 Free Software Foundation, Inc.                               
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>   
This is free software: you are free to change and redistribute it.              
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"      
and "show warranty" for details.                                                
This GDB was configured as "i686-pc-linux-gnu".                                 
For bug reporting instructions, please see:                                     
<http://www.gnu.org/software/gdb/bugs/>...                                      
Reading symbols from /home/bruno/foo...done.                                    
(gdb) break main                                                                
Breakpoint 1 at 0x80483ed: file foo.c, line 6.                                  
(gdb) run                                                                       
Starting program: /home/bruno/foo                                               

Breakpoint 1, main () at foo.c:6
6         for (i = 0; i < 3; i++)
(gdb) target record              
(gdb) next                       
7           printf ("%02x\n", foo[i]);
(gdb) continue                        
Continuing.                           
66                                    
6f                                    
6f                                    
The next instruction is syscall exit_group.  It will make the program exit.  Do
you want to stop the program?([y] or n) y                                       
Process record: inferior program stopped.                                       

Program received signal SIGTRAP, Trace/breakpoint trap.
0xb7fe2425 in __kernel_vsyscall ()                     
(gdb) where                                            
#0  0xb7fe2425 in __kernel_vsyscall ()                 
#1  0xb7f21d74 in _exit () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7eba018 in ?? () from /lib/tls/i686/cmov/libc.so.6   
#3  0x00000000 in ?? ()                                     
(gdb) reverse-next
Single stepping until exit from function __kernel_vsyscall, 
which has no line number information.                       
0xb7f21d6d in _exit () from /lib/tls/i686/cmov/libc.so.6    
(gdb) reverse-next                                          
Single stepping until exit from function _exit,             
which has no line number information.                       
0xb7eba013 in ?? () from /lib/tls/i686/cmov/libc.so.6
(gdb) reverse-next
Cannot find bounds of current function
(gdb) where
#0  0xb7eba013 in ?? () from /lib/tls/i686/cmov/libc.so.6
#1  0x00000000 in ?? ()
(gdb) reverse-finish
Run back to call of #0  0xb7eba013 in ?? () from /lib/tls/i686/cmov/libc.so.6
infcmd.c:1448: internal-error: Finish: couldn't find function.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

infcmd.c:1448: internal-error: Finish: couldn't find function.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted

-- 
           Summary: internal gdb problem with reverse-finish
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: bruno at clisp dot org
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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