Re: gdb.arch vs. gdb.base gcore test cases
Andreas Arnez <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Pedro Alves <[email protected]> writes: > Did you check the original patch submission description in the > mailing list archives for a possible rationale? Here's the associated patch submission: http://sourceware.org/ml/gdb-patches/2010-04/msg00534.html It doesn't seem to contain a rationale for the system-gcore test case. > Given that "system" is a predefined register group, I think > "info reg system" works on all targets, though it might come > out empty if no register is actually in that group on a given > target. That seems fine for this test. Right, that's what I thought. Thus a patch like this should make gcore-system.exp obsolete (untested): diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp index 33528fb..c9a202c 100644 --- a/gdb/testsuite/gdb.base/gcore.exp +++ b/gdb/testsuite/gdb.base/gcore.exp @@ -74,6 +74,7 @@ set print_prefix ".\[0123456789\]* = " set pre_corefile_backtrace [capture_command_output "backtrace" ""] set pre_corefile_regs [capture_command_output "info registers" ""] set pre_corefile_allregs [capture_command_output "info all-reg" ""] +set pre_corefile_sysregs [capture_command_output "info reg system" ""] set pre_corefile_static_array \ [capture_command_output "print static_array" "$print_prefix"] set pre_corefile_uninit_array \ @@ -143,6 +144,13 @@ if ![string compare $pre_corefile_allregs $post_corefile_allregs] then { fail "corefile restored all registers" } +set post_corefile_sysregs [capture_command_output "info reg system" ""] +if ![string compare $pre_corefile_sysregs $post_corefile_sysregs] then { + pass "corefile restored system registers" +} else { + fail "corefile restored system registers" +} + set post_corefile_extern_array \ [capture_command_output "print extern_array" "$print_prefix"] if ![string compare $pre_corefile_extern_array $post_corefile_extern_array] {