* gdb.base/completion.exp: Allow long instead of long int.

* gdb.base/ending-run.exp: Match _rt_entry.* for RealView.
	* gdb.base/gdbvars.c (main): Remove unused usestubs code.  Reference
	variable p.
	* gdb.base/maint.exp: Allow ER_RO and ER_RW instead of .text and .data.
	* gdb.base/pointers.exp: Allow long instead of long int.
	* gdb.base/printcmds.exp: XFAIL for RealView on ARM EABI.
	* gdb.base/step-line.exp: Allow a directory before the source file name.
This commit is contained in:
Daniel Jacobowitz 2010-03-24 21:28:14 +00:00
parent 95a42b64a1
commit 293e2f9ec5
8 changed files with 42 additions and 17 deletions

View file

@ -1,3 +1,14 @@
2010-03-24 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/completion.exp: Allow long instead of long int.
* gdb.base/ending-run.exp: Match _rt_entry.* for RealView.
* gdb.base/gdbvars.c (main): Remove unused usestubs code. Reference
variable p.
* gdb.base/maint.exp: Allow ER_RO and ER_RW instead of .text and .data.
* gdb.base/pointers.exp: Allow long instead of long int.
* gdb.base/printcmds.exp: XFAIL for RealView on ARM EABI.
* gdb.base/step-line.exp: Allow a directory before the source file name.
2010-03-24 Tom Tromey <tromey@redhat.com>
PR breakpoints/9352:

View file

@ -796,7 +796,7 @@ gdb_expect {
-re "marker1.*$gdb_prompt info func marker$"\
{ send_gdb "\n"
gdb_expect {
-re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
-re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long( int)?\\);.*$gdb_prompt $"\
{ pass "complete 'info func marke'"}
-re ".*$gdb_prompt $" { fail "complete 'info func marke'"}
timeout {fail "(timeout) complete 'info func marke'"}

View file

@ -173,7 +173,7 @@ gdb_expect {
# This is what happens on ARM in thumb mode -fn 2000-02-01
pass "step out of main"
}
-re ".*__rt_entry ().*$gdb_prompt $" {
-re ".*__rt_entry.* ().*$gdb_prompt $" {
# This is what happens on the ARM RVDS runtime
pass "step out of main"
}

View file

@ -7,10 +7,6 @@ ptr p = &p;
int
main ()
{
#ifdef usestubs
set_debug_traps ();
breakpoint ();
#endif
p = &p;
return 0;
}

View file

@ -429,9 +429,19 @@ set timeout [expr $timeout + 300]
#
# And by the way: This testpoint will break for PA64, where a.out's
# are ELF files.
#
# Standard GNU names.
set text_section ".text"
set data_section ".data"
send_gdb "maint info sections\n"
gdb_expect {
-re "Exec file:\r\n.*break($EXEEXT)?., file type.*ER_RO.*$gdb_prompt $" {
# Looks like RealView which uses different section names.
set text_section ER_RO
set data_section ER_RW
pass "maint info sections"
}
-re "Exec file:\r\n.*break($EXEEXT)?., file type.*$gdb_prompt $"\
{ pass "maint info sections" }
-re ".*$gdb_prompt $" { fail "maint info sections" }
@ -440,11 +450,11 @@ gdb_expect {
# Test for new option: maint info sections <section name>
# If you don't have a .text section, this will require tweaking.
send_gdb "maint info sections .text\n"
send_gdb "maint info sections $text_section\n"
gdb_expect {
-re ".* \\.bss .*$gdb_prompt $" { fail "maint info sections .text" }
-re ".* \\.data .*$gdb_prompt $" { fail "maint info sections .text" }
-re ".* \\.text .*$gdb_prompt $" { pass "maint info sections .text" }
-re ".* $data_section .*$gdb_prompt $" { fail "maint info sections .text" }
-re ".* $text_section .*$gdb_prompt $" { pass "maint info sections .text" }
-re ".*$gdb_prompt $" { fail "maint info sections .text" }
timeout { fail "(timeout) maint info sections .text" }
}
@ -453,8 +463,8 @@ gdb_expect {
# If your data section is tagged CODE, xfail this test.
send_gdb "maint info sections CODE\n"
gdb_expect {
-re ".* \\.data .*$gdb_prompt $" { fail "maint info sections CODE" }
-re ".* \\.text .*$gdb_prompt $" { pass "maint info sections CODE" }
-re ".* $data_section .*$gdb_prompt $" { fail "maint info sections CODE" }
-re ".* $text_section .*$gdb_prompt $" { pass "maint info sections CODE" }
-re ".*$gdb_prompt $" { fail "maint info sections CODE" }
timeout { fail "(timeout) maint info sections CODE" }
}
@ -467,8 +477,8 @@ gdb_expect {
setup_xfail "*-*-*cygwin*"
send_gdb "maint info sections DATA\n"
gdb_expect {
-re ".* \\.text .*$gdb_prompt $" { fail "maint info sections DATA" }
-re ".* \\.data .*$gdb_prompt $" { pass "maint info sections DATA" }
-re ".* $text_section .*$gdb_prompt $" { fail "maint info sections DATA" }
-re ".* $data_section .*$gdb_prompt $" { pass "maint info sections DATA" }
-re ".* .rodata .*$gdb_prompt $" { pass "maint info sections DATA" }
-re ".*$gdb_prompt $" { fail "maint info sections DATA" }
timeout { fail "(timeout) maint info sections DATA" }

View file

@ -600,4 +600,4 @@ gdb_expect {
# Regression test for a crash.
gdb_test "p instance.array_variable + 0" \
" = \\(long int \\*\\) 0x\[0-9a-f\]*"
" = \\(long (int )?\\*\\) 0x\[0-9a-f\]*"

View file

@ -36,6 +36,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
get_compiler_info ${binfile}
# Set the current language to C. This counts as a test. If it
# fails, then we skip the other tests.
@ -777,6 +779,12 @@ gdb_test "set print address off" ""
gdb_test "set width 0" ""
if [set_lang_c] then {
if { [test_compiler_info "armcc-*"] } {
# ARM RealView compresses large arrays in the data segment.
# Before the program starts, we can not read them. There is
# nothing in the file to indicate that data is compressed.
setup_xfail "arm*-*-eabi"
}
gdb_test "p ctable1\[120\]" "120 'x'" "p ctable1\[120\] #1"
gdb_load ${binfile}

View file

@ -47,7 +47,7 @@ if ![runto_main] then {
set remote_linefile [remote_download host ${srcdir}/${subdir}/${linefile}]
gdb_test "break f1" ".*Breakpoint 2 at .* file step-line.c.*" "break f1"
gdb_test "break f1" ".*Breakpoint 2 at .* file .*step-line.c.*" "break f1"
gdb_test "continue" \
"Continuing.*Breakpoint 2, f1 \\(i=4\\).*dummy \\(1, i\\);" \
"continue to f1"