This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

[PATCH] fix for breakpoint test


        * gdb.base/break.exp (bp on small function, optimized file):
        Add a second pass pattern.  The behavior differs here between stabs
        and dwarf for one-line functions.  Stabs preserves two line symbols
        (one before the prologue and one after) with the same line number,
        but dwarf regards these as duplicates and discards one of them.
        Therefore the address after the prologue (where the breakpoint is)
        has no exactly matching line symbol, and GDB reports the breakpoint
        as if it were in the middle of a line rather than at the beginning.

Index: break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
retrieving revision 1.4
diff -p -r1.4 break.exp
*** break.exp	2000/05/05 21:50:23	1.4
--- break.exp	2000/05/12 18:58:07
*************** if ![target_info exists use_gdb_stub] {
*** 872,879 ****
  #
  # run until the breakpoint at a small function
  #
! gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile:51.*51\[\t \]+void.*marker4.*" \
! 			"run until breakpoint set at small function, optimized file"
  
  
  # Reset the default arguments for VxWorks
--- 872,902 ----
  #
  # run until the breakpoint at a small function
  #
! 
! #
! # Add a second pass pattern.  The behavior differs here between stabs
! # and dwarf for one-line functions.  Stabs preserves two line symbols
! # (one before the prologue and one after) with the same line number, 
! # but dwarf regards these as duplicates and discards one of them.
! # Therefore the address after the prologue (where the breakpoint is)
! # has no exactly matching line symbol, and GDB reports the breakpoint
! # as if it were in the middle of a line rather than at the beginning.
! 
! send_gdb "continue\n"
! gdb_expect {
!     -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
! 	pass "run until breakpoint set at small function, optimized file"
!     }
!     -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
! 	pass "run until breakpoint set at small function, optimized file"
!     }
!     -re ".*$gdb_prompt " {
! 	fail "run until breakpoint set at small function, optimized file"
!     }
!     timeout {
! 	fail "run until breakpoint set at small function, optimized file (timeout)"
!     }
! }
  
  
  # Reset the default arguments for VxWorks

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