From: Edjunior Barbosa Machado Date: Wed, 13 Apr 2011 21:12:20 +0000 (+0000) Subject: * gdb.base/gdb1090.exp: Change breakpoint location to read the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3363d018fdf6efebe4aa50fc6fecf679acc7e700;p=binutils-gdb.git * gdb.base/gdb1090.exp: Change breakpoint location to read the content of 's24' correctly (avoiding "optimized out"). * gdb.base/gdb1090.c: Add comment in order to set breakpoint. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c33e0ba6e45..15099194004 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-04-13 Edjunior Machado + + * gdb.base/gdb1090.exp: Change breakpoint location to read the + content of 's24' correctly (avoiding "optimized out"). + * gdb.base/gdb1090.c: Add comment in order to set breakpoint. + 2011-04-13 Jan Kratochvil * lib/gdb.exp (gdb_breakpoint): New case for a GDB internal error. diff --git a/gdb/testsuite/gdb.base/gdb1090.c b/gdb/testsuite/gdb.base/gdb1090.c index 22f2cec4d63..8933952d4ff 100644 --- a/gdb/testsuite/gdb.base/gdb1090.c +++ b/gdb/testsuite/gdb.base/gdb1090.c @@ -36,7 +36,7 @@ void foo () register struct s_2_by_4 s24; s24.field_0 = 1170; s24.field_1 = 64701; - marker (s24); + marker (s24); /* break-here */ return; } diff --git a/gdb/testsuite/gdb.base/gdb1090.exp b/gdb/testsuite/gdb.base/gdb1090.exp index a15fd047813..ab568ab7c9a 100644 --- a/gdb/testsuite/gdb.base/gdb1090.exp +++ b/gdb/testsuite/gdb.base/gdb1090.exp @@ -40,11 +40,13 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if ![runto marker] then { - perror "couldn't run to breakpoint" - continue -} -gdb_test "up" ".*foo.*" "up from marker" +if ![runto_main] then { + fail "Can't run to main" + return 1 +} + +gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_continue_to_breakpoint "break-here" ".* break-here .*" gdb_test_multiple "print s24" "print s24" { -re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" {