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/14751] New: Gdb incorrectly single steps delayed branchesin GCC thread simulation tests


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

             Bug #: 14751
           Summary: Gdb incorrectly single steps delayed branches in GCC
                    thread simulation tests
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: danglin@gcc.gnu.org
    Classification: Unclassified
              Host: hppa-unknown-linux-gnu
            Target: hppa-unknown-linux-gnu
             Build: hppa-unknown-linux-gnu


Created attachment 6693
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6693
Preprocessed source

dave@mx3210:~/gnu/gcc/objdir/gcc/testsuite/gcc$ gdb -nx -nw -quiet -x
simulate-thread.gdb ./speculative-store-4.exe
Reading symbols from
/home/dave/gnu/gcc/objdir/gcc/testsuite/gcc/speculative-store-4.exe...done.
Breakpoint 1 at 0x10790

Breakpoint 1, 0x00010790 in simulate_thread_main ()
1: x/i $pc
=> 0x10790 <simulate_thread_main+12>:    stw r0,8(r3)
0x00010794 in simulate_thread_main ()
1: x/i $pc
=> 0x10794 <simulate_thread_main+16>:    
    b,l,n 0x107d4 <simulate_thread_main+80>,r0
0x00010794 in simulate_thread_main ()
1: x/i $pc
=> 0x10794 <simulate_thread_main+16>:    
    b,l,n 0x107d4 <simulate_thread_main+80>,r0
0x000107d4 in simulate_thread_main ()
1: x/i $pc
=> 0x107d4 <simulate_thread_main+80>:    ldw 8(r3),ret0
0x000107d8 in simulate_thread_main ()
1: x/i $pc
=> 0x107d8 <simulate_thread_main+84>:    
    cmpib,>= 1,ret0,0x10798 <simulate_thread_main+20>
0x000107dc in simulate_thread_main ()
1: x/i $pc
=> 0x107dc <simulate_thread_main+88>:    nop
0x000107e0 in simulate_thread_main ()
1: x/i $pc
=> 0x107e0 <simulate_thread_main+92>:    ldo 40(r3),sp
0x000107e4 in simulate_thread_main ()
1: x/i $pc
=> 0x107e4 <simulate_thread_main+96>:    ldw,mb -40(sp),r3
0x000107e8 in simulate_thread_main ()
1: x/i $pc
=> 0x107e8 <simulate_thread_main+100>:    bv,n r0(rp)
0x000107e8 in simulate_thread_main ()
1: x/i $pc
=> 0x107e8 <simulate_thread_main+100>:    bv,n r0(rp)
0x00010804 in main ()
1: x/i $pc
=> 0x10804 <main+24>:    b,l 0x105ec <simulate_thread_done>,rp
0x00010808 in main ()
1: x/i $pc
=> 0x10808 <main+28>:    nop
0x0001080c in main ()
1: x/i $pc
=> 0x1080c <main+32>:    ldi 0,ret0
0x00010810 in main ()
1: x/i $pc
=> 0x10810 <main+36>:    ldw -14(r3),rp
0x00010814 in main ()
1: x/i $pc
=> 0x10814 <main+40>:    ldo 40(r3),sp
0x00010818 in main ()
1: x/i $pc
=> 0x10818 <main+44>:    ldw,mb -40(sp),r3
0x0001081c in main ()
1: x/i $pc
=> 0x1081c <main+48>:    bv,n r0(rp)
0x0001081c in main ()
1: x/i $pc
=> 0x1081c <main+48>:    bv,n r0(rp)
0x4012e088 in __libc_start_main (main=@0x11126: 0x107ec <main>, argc=1, 
    ubp_av=0xfbf02020, init=<optimized out>, fini=@0x110f6: 0x11148, 
    rtld_fini=@0x40103262: 0x400f295c, stack_end=0xfbf021c0)
    at libc-start.c:228
228    libc-start.c: No such file or directory.
1: x/i $pc
=> 0x4012e088 <__libc_start_main+308>:    copy r4,r19
260    in libc-start.c
1: x/i $pc
=> 0x4012e08c <__libc_start_main+312>:    b,l 0x4014b1d0 <*__GI_exit>,rp
0x4012e090    260    in libc-start.c
1: x/i $pc
=> 0x4012e090 <__libc_start_main+316>:    copy ret0,r26
193    in libc-start.c
1: x/i $pc
=> 0x4012e094 <__libc_start_main+320>:    ldw a0(ret0),r7

Program received signal SIGSEGV, Segmentation fault.
__libc_start_main (main=@0x11126: 0x107ec <main>, argc=1, ubp_av=0xfbf02020, 
    init=0x40270154 <__exit_funcs>, fini=@0x110f6: 0x11148, 
    rtld_fini=@0x40103262: 0x400f295c, stack_end=0xfbf021c0)
    at libc-start.c:193
193    in libc-start.c
1: x/i $pc
=> 0x4012e094 <__libc_start_main+320>:    ldw a0(ret0),r7

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
simulate-thread.gdb:10: Error in sourced command file:
You can't do that without a process to debug.
(gdb) 

Program was compiled as follows:

/home/dave/gnu/gcc/objdir/gcc/xgcc -B/home/dave/gnu/gcc/objdir/gcc/
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-4.c
 -fno-diagnostics-show-caret   -O0 -g  --param allow-store-data-races=0  -lm  
-o speculative-store-4.exe

Gdb script is:

set height 0
break simulate_thread_main
disp/i $pc
run
set $ret = 0
while (simulate_thread_fini != 1) && (! $ret)
  set $ret |= simulate_thread_wrapper_other_threads()
  stepi
  set $ret |= simulate_thread_step_verify()
end

if (! $ret)
  set $ret |= simulate_thread_wrapper_final_verify()
end
continue
quit $ret

Attached processed source for speculative-store-4.c.

-- 
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.


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