-# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002
+# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
return
}
-if [istarget "m68k*-*-hpux*"] then {
- # The top-level makefile passes CFLAGS= (no -g) for hp300. This probably
- # should be fixed (it is only needed for gcc bootstrapping, not gdb),
- # but until then.....
- setup_xfail "*-*-*"
- fail "cannot test self if compiled without debug info"
- return -1
-}
-
# Not all of the lines of code near the start of main are executed for
# every machine. Also, optimization may reorder some of the lines.
# So all we do is try to step or next over everything until we get
gdb_reinitialize_dir $srcdir/..
- for {set count 0} {$count < 26} {incr count} {
+ for {set count 0} {$count < 32} {incr count} {
send_gdb "list\n"
# NOTE: carlton/2002-12-11: The "initial brace" and
# "current_directory initialization" possibilities happen to
set command "next"
}
-re ".*START_PROGRESS.*$gdb_prompt $" {
+ # Note: ezannoni/2004/02/17: This check should be
+ # removed, since as of today that source line is not
+ # in gdb anymore.
set description "next over START_PROGRESS and everything it calls"
set command "next"
}
set description "next over init_malloc and everything it calls"
set command "next"
}
+ -re ".*lim_at_start.*$gdb_prompt $" {
+ set description "next over lim_at_start initialization"
+ set command "next"
+ }
-re ".*count . 0x3.*$gdb_prompt $" {
set description "next over conditional stack alignment code 1"
set command "next"
set description "step over gdb_sysroot initialization"
set command "step"
}
+ -re ".*ndir = 0.*$gdb_prompt $" {
+ set description "step over ndir initialization"
+ set command "step"
+ }
+ -re ".*instream = stdin.*$gdb_prompt $" {
+ set description "step over instream initialization"
+ set command "step"
+ }
+ -re ".*getcwd .gdb_dirbuf, sizeof .gdb_dirbuf..;.*$gdb_prompt $" {
+ set description "next over getcwd"
+ set command "next"
+ }
-re "\[ \t\]+\{\r\n$gdb_prompt $" {
setup_xfail "mips-*-irix5*"
fail "$description ended up at odd location"
# If we don't actually enter the xmalloc call when we give a
# step command that seems like a genuine bug. It seems to happen
# on most RISC processors.
+ # NOTE drow/2003-06-22: However, if we step back to the preceding two
+ # lines, just keep stepping until we enter.
+ set stepped_back 0
setup_xfail "alpha-*-*" "mips-*-*"
set description "step into xmalloc call"
send_gdb "step\n"
gdb_expect {
+ -re "ncmd = 0;.*$gdb_prompt $" {
+ set stepped_back 1
+ send_gdb "step\n"
+ exp_continue
+ }
+ -re ".*cmdarg = .* xmalloc.*$gdb_prompt $" {
+ set stepped_back 1
+ send_gdb "step\n"
+ exp_continue
+ }
+ -re "dirsize = 1;.*$gdb_prompt $" {
+ set stepped_back 1
+ send_gdb "step\n"
+ exp_continue
+ }
+ -re ".*dirarg = .* xmalloc.*$gdb_prompt $" {
+ if { $stepped_back == 1 } {
+ send_gdb "step\n"
+ exp_continue
+ } else {
+ fail "$description"
+ }
+ }
-re "xmalloc.*size=.*at.*utils.c.*$gdb_prompt $" {
pass "$description"
}