From bccd0dd2032230e7de132f82840d21a359927e2a Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Sat, 31 Oct 2009 06:00:13 +0000 Subject: gdb/ChangeLog: 2009-31-10 Sergio Durigan Junior * breakpoint.c (catch_syscall_split_args): Remove unecessary warning displayed when the user provided a syscall name and there is no XML support. * xml-syscall.c: Renamed `_sysinfo' to `sysinfo'. (set_xml_syscall_file_name): Remove syscall_warn_user. (xml_init_syscalls_info): Remove warning. (init_sysinfo): Update warnings. gdb/testsuite/ChangeLog: 2009-31-10 Sergio Durigan Junior * gdb.base/catch-syscall.exp: Adapt the testcase in order to accept the modified warnings for catch syscall. Verify if GDB was compiled with support for lib expat, and choose which tests to run depending on this. --- gdb/testsuite/ChangeLog | 7 ++++ gdb/testsuite/gdb.base/catch-syscall.exp | 58 ++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 25 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 70731946cb2..56400cd6d91 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-31-10 Sergio Durigan Junior + + * gdb.base/catch-syscall.exp: Adapt the testcase in order to accept + the modified warnings for catch syscall. Verify if GDB was compiled + with support for lib expat, and choose which tests to run depending + on this. + 2009-10-30 Vladimir Prus * gdb.mi/mi-break.exp (test_breakpoint_commands): Test diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index 6798d043b6d..b68aa8a65eb 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -252,6 +252,25 @@ proc test_catch_syscall_restarting_inferior {} { check_for_program_end } +proc test_catch_syscall_fail_nodatadir {} { + global gdb_prompt + + # Sanitizing. + delete_breakpoints + + # Testing to see if we receive a warning when calling "catch syscall" + # without XML support (without datadir). + set thistest "Catch syscall displays a warning when there is no XML support (no datadir set)" + gdb_test "catch syscall" "warning: Could not load the syscall XML file.*warning: GDB will not be able to display syscall names nor to verify if.*any provided syscall numbers are valid.*Catchpoint .*(syscall).*" $thistest + + # Since the catchpoint was set, we must check if it's present at + # "info breakpoints" + check_info_bp_any_syscall + + # Sanitizing. + delete_breakpoints +} + proc do_syscall_tests {} { global gdb_prompt srcdir @@ -295,25 +314,6 @@ proc do_syscall_tests {} { if [runto_main] then { test_catch_syscall_restarting_inferior } } -proc test_catch_syscall_fail_noxml {} { - global gdb_prompt - - # Sanitizing. - delete_breakpoints - - # Testing to see if we receive a warning when calling "catch syscall" - # without XML support. - set thistest "Catch syscall displays a warning when there is no XML support" - gdb_test "catch syscall" "warning: Could not open .*warning: Could not load the syscall XML file .*GDB will not be able to display syscall names.*Catchpoint .*(syscall).*" $thistest - - # Since the catchpoint was set, we must check if it's present at - # "info breakpoints" - check_info_bp_any_syscall - - # Sanitizing. - delete_breakpoints -} - proc test_catch_syscall_without_args_noxml {} { # We will need the syscall names even not using it # because we need to know know many syscalls are in @@ -386,11 +386,7 @@ proc do_syscall_tests_without_xml {} { # we want GDB to display only numbers, not names. So, let's # begin with the tests. - # The first test is to see if GDB displays a warning when we - # try to catch syscalls without the XML support. - test_catch_syscall_fail_noxml - - # Now, let's test if we can catch syscalls without XML support. + # Let's test if we can catch syscalls without XML support. # We should succeed, but GDB is not supposed to print syscall names. if [runto_main] then { test_catch_syscall_without_args_noxml } @@ -426,12 +422,24 @@ proc fill_all_syscalls_numbers {} { # Start with a fresh gdb gdb_exit +set do_xml_test ![gdb_skip_xml_test] gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} # Execute the tests, using XML support -do_syscall_tests +if $do_xml_test { + do_syscall_tests + + # Now, we have to see if GDB displays a warning when we + # don't set the data-directory but try to use catch syscall + # anyway. For that, we must restart GDB first. + gdb_exit + gdb_start + gdb_reinitialize_dir $srcdir/$subdir + gdb_load ${binfile} + test_catch_syscall_fail_nodatadir +} # Restart gdb -- cgit v1.2.1