From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: gdb.arch vs. gdb.base gcore test cases
Date: Fri, 03 May 2013 14:48:00 -0000 [thread overview]
Message-ID: <87k3ngdsq7.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <5183C304.7010002@redhat.com> (Pedro Alves's message of "Fri, 03 May 2013 15:00:36 +0100")
Pedro Alves <palves@redhat.com> 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] {
next prev parent reply other threads:[~2013-05-03 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 11:15 Andreas Arnez
2013-05-03 11:28 ` Pedro Alves
2013-05-03 13:16 ` Andreas Arnez
2013-05-03 14:00 ` Pedro Alves
2013-05-03 14:48 ` Andreas Arnez [this message]
2013-05-03 15:24 ` Pedro Alves
2013-05-03 15:06 ` Pedro Alves
2013-05-03 15:53 ` Andreas Arnez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k3ngdsq7.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox