Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: parse output from `info sources' one filename at a time
@ 2002-02-13 16:10 Jim Blandy
  2002-02-21 11:04 ` Michael Snyder
  2002-02-21 12:58 ` RFA: parse output from `info sources' one filename at a time Jim Blandy
  0 siblings, 2 replies; 8+ messages in thread
From: Jim Blandy @ 2002-02-13 16:10 UTC (permalink / raw)
  To: gdb-patches


This eliminates an `ERROR' when the test is run under Linux.  The
output from `info sources' includes all the shared library source
files, making it so long that it overflows Expect's buffer.

2002-02-13  Jim Blandy  <jimb@redhat.com>

	* gdb.asm/asm-source.exp: Parse the output from `info sources' one
	filename at a time, and watch for the ones we want to see.

Index: gdb/testsuite/gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.17
diff -c -r1.17 asm-source.exp
*** gdb/testsuite/gdb.asm/asm-source.exp	2002/01/18 00:13:00	1.17
--- gdb/testsuite/gdb.asm/asm-source.exp	2002/02/14 00:05:30
***************
*** 202,211 ****
  	"Current source file is .*asmsrc2.s.*Source language is asm.*" \
  	"info source asmsrc2.s"
  
! # Try 'info sources'
! gdb_test "info sources" \
! 	"Source files .*asmsrc\[12\].s.*asmsrc\[12\].s.*" \
! 	"info sources"
  
  # Try 'info line'
  gdb_test "info line" \
--- 202,238 ----
  	"Current source file is .*asmsrc2.s.*Source language is asm.*" \
  	"info source asmsrc2.s"
  
! # Try 'info sources'.  This can produce a lot of output on systems
! # with dynamic linking, where the system's shared libc was compiled
! # with debugging info; for example, on Linux, this produces 47kb of
! # output.  So we consume it as we go.
! send_gdb "info sources\n"
! set seen_asmsrc_1 0
! set seen_asmsrc_2 0
! gdb_expect {
!     -re "^\[^,\]*asmsrc1.s(, |\[\r\n\]+)" {
!         set seen_asmsrc_1 1
!         exp_continue
!     }
!     -re "^\[^,\]*asmsrc2.s(, |\[\r\n\]+)" {
!         set seen_asmsrc_2 1
!         exp_continue
!     }
!     -re ", " { 
!         exp_continue
!     }
!     -re "$gdb_prompt $" {
!         if {$seen_asmsrc_1 && $seen_asmsrc_2} {
!             pass "info sources"
!         } else {
!             fail "info sources"
!         }
!     }
!     timeout {
!             fail "info sources (timeout)"
!     }
! }
!         
  
  # Try 'info line'
  gdb_test "info line" \


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-18 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-13 16:10 RFA: parse output from `info sources' one filename at a time Jim Blandy
2002-02-21 11:04 ` Michael Snyder
2002-02-21 11:41   ` Fernando Nasser
2002-02-21 12:08     ` Michael Snyder
2002-02-21 12:30       ` Fernando Nasser
2002-04-17 16:21       ` Old business: gdb.asm maintainership Michael Snyder
2002-04-18  8:57         ` Fernando Nasser
2002-02-21 12:58 ` RFA: parse output from `info sources' one filename at a time Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox