* 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.
This commit is contained in:
Edjunior Barbosa Machado 2011-04-13 21:12:20 +00:00
parent 2878145693
commit 3363d018fd
3 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2011-04-13 Edjunior Machado <emachado@linux.vnet.ibm.com>
* 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 <jan.kratochvil@redhat.com> 2011-04-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* lib/gdb.exp (gdb_breakpoint): New case for a GDB internal error. * lib/gdb.exp (gdb_breakpoint): New case for a GDB internal error.

View File

@ -36,7 +36,7 @@ void foo ()
register struct s_2_by_4 s24; register struct s_2_by_4 s24;
s24.field_0 = 1170; s24.field_0 = 1170;
s24.field_1 = 64701; s24.field_1 = 64701;
marker (s24); marker (s24); /* break-here */
return; return;
} }

View File

@ -40,11 +40,13 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} gdb_load ${binfile}
if ![runto marker] then { if ![runto_main] then {
perror "couldn't run to breakpoint" fail "Can't run to main"
continue return 1
} }
gdb_test "up" ".*foo.*" "up from marker"
gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
gdb_test_multiple "print s24" "print s24" { gdb_test_multiple "print s24" "print s24" {
-re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" { -re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" {