+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:
#
# 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" }
# 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" }
}
# 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" }
}
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" }
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.
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}