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 breakpoints/7335] gdb single step, completing on a predicated instruction, unconditionally triggers breakpoint


------- Additional Comments From jan dot kratochvil at redhat dot com  2010-08-15 21:48 -------
This Bug is still valid.
qp == qualifying predicate - those instr prefixes like (p06)

(While testing it on older GDBs never place two breakpoints into the same slot
as the results can be misleading afterwards.)

gdb -nx -ex 'b *0x4000000000000641' -ex 'b *0x4000000000000651' -ex r
./ia64.quad-100520
GNU gdb (GDB) 7.2.50.20100815-cvs
Copyright (C) 2010 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 "ia64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/jkratoch/redhat/ia64.quad-100520...done.
Breakpoint 1 at 0x4000000000000641: file ia64.quad-100520.c, line 17.
Breakpoint 2 at 0x4000000000000651: file ia64.quad-100520.c, line 17.
Starting program: /root/jkratoch/redhat/ia64.quad-100520 

Breakpoint 1, 0x4000000000000641 in main (argc=1, argv=0x20000000000a3870) at
ia64.quad-100520.c:17
17	  printf("a = %ld, b = %ld\n", a, b);
(gdb) c
Continuing.

Breakpoint 2, 0x4000000000000651 in main (argc=1, argv=0x20000000000a3870) at
ia64.quad-100520.c:17
17	  printf("a = %ld, b = %ld\n", a, b);
(gdb) disass
Dump of assembler code for function main:
   0x4000000000000620 <+0>:	[MII]       alloc r34=ar.pfs,7,4,0
   0x4000000000000621 <+1>:	            mov r33=b0
   0x4000000000000622 <+2>:	            mov r35=r1
   0x4000000000000630 <+16>:	[MII]       cmp4.lt p6,p7=0,r32
   0x4000000000000631 <+17>:	            addl r36=72,r1;;
   0x4000000000000632 <+18>:	            nop.i 0x0
   0x4000000000000640 <+32>:	[MII]       ld8 r36=[r36]
   0x4000000000000641 <+33>:	      (p06) mov r37=123
   0x4000000000000642 <+34>:	      (p07) mov r37=321
   0x4000000000000650 <+48>:	[MIB] (p06) mov r38=456
=> 0x4000000000000651 <+49>:	      (p07) mov r38=654
   0x4000000000000652 <+50>:	            br.call.sptk.many b0=0x40000000000003e0
   0x4000000000000660 <+64>:	[MII]       mov r1=r35
   0x4000000000000661 <+65>:	            mov r8=r0;;
   0x4000000000000662 <+66>:	            mov.i ar.pfs=r34
   0x4000000000000670 <+80>:	[MIB]       nop.m 0x0
   0x4000000000000671 <+81>:	            mov b0=r33
   0x4000000000000672 <+82>:	            br.ret.sptk.many b0;;
End of assembler dump.
(gdb) 

I could not use break-by-line as both gcc-4.1.2-46.el5_4.2.ia64 and
gcc44-4.4.0-6.el5.ia64 do not provide proper .debug_line for -O/-O2.
With -O2 qp (qualifying predicates) are not used at all.

ia64_memory_insert_breakpoint should preserve the qp part of the specific slot.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
 GCC target triplet|                            |ia64-unknown-linux-gnu
            Version|5.0                         |7.1


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

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