* [PATCH] skip break-entry.exp when using a stub
@ 2010-10-29 19:20 Nathan Froyd
2010-10-29 20:10 ` Pedro Alves
2010-11-02 17:58 ` Joel Brobecker
0 siblings, 2 replies; 4+ messages in thread
From: Nathan Froyd @ 2010-10-29 19:20 UTC (permalink / raw)
To: gdb-patches
This patch skips gdb.base/break-entry.exp when using a stub.
prepare_for_testing already stopped the program at its entry, so the
test will not work correctly.
Tested with cross to powerpc-linux-gnu using gdbserver. OK to commit?
-Nathan
* gdb.base/break-entry.exp: Skip if using a stub.
---
gdb/testsuite/gdb.base/break-entry.exp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/gdb.base/break-entry.exp b/gdb/testsuite/gdb.base/break-entry.exp
index d4b86a3..4e4515b 100644
--- a/gdb/testsuite/gdb.base/break-entry.exp
+++ b/gdb/testsuite/gdb.base/break-entry.exp
@@ -21,6 +21,15 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} start.c {additional_flags=
return -1
}
+# If we're using a stub, we'll already be stopped at the entry point
+# when we connect. Don't bother trying to work around this in the
+# testing below.
+
+if [target_info exists use_gdb_stub] {
+ untested ${testfile}.exp
+ return
+}
+
set test "info files"
set entry ""
gdb_test_multiple $test $test {
--
1.6.3.2
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] skip break-entry.exp when using a stub
2010-10-29 19:20 [PATCH] skip break-entry.exp when using a stub Nathan Froyd
@ 2010-10-29 20:10 ` Pedro Alves
2010-11-02 17:58 ` Joel Brobecker
1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2010-10-29 20:10 UTC (permalink / raw)
To: gdb-patches; +Cc: Nathan Froyd
On Friday 29 October 2010 20:20:40, Nathan Froyd wrote:
> This patch skips gdb.base/break-entry.exp when using a stub.
> prepare_for_testing already stopped the program at its entry, so the
> test will not work correctly.
This is okay, but I think the comment below could use
some clarification/expansion.
> +# If we're using a stub, we'll already be stopped at the entry point
> +# when we connect. Don't bother trying to work around this in the
> +# testing below.
What do you think of something like this alternative:
# If we're using a stub, we'll already be debugging a live
# program and stopped at the entry point when we connect,
# and so runto below will issue a "continue", which always
# skips any breakpoint at PC. When testing with a native
# target (or some other target that supports "run"), runto
# will do a "run", which 1. creates the process, leaving
# the PC at the entry point, just like the stub case, but then
# continues the process with the equivalent of "jump *$PC", which
# triggers any breakpoint at $PC. The latter is what we want
# to test.
? (may need copy&editing)
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] skip break-entry.exp when using a stub
2010-10-29 19:20 [PATCH] skip break-entry.exp when using a stub Nathan Froyd
2010-10-29 20:10 ` Pedro Alves
@ 2010-11-02 17:58 ` Joel Brobecker
2010-11-02 18:04 ` Michael Snyder
1 sibling, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2010-11-02 17:58 UTC (permalink / raw)
To: Nathan Froyd; +Cc: gdb-patches
> -Nathan
>
> * gdb.base/break-entry.exp: Skip if using a stub.
I am not sure about one detail:
> +# If we're using a stub, we'll already be stopped at the entry point
> +# when we connect. Don't bother trying to work around this in the
> +# testing below.
> +
> +if [target_info exists use_gdb_stub] {
> + untested ${testfile}.exp
> + return
> +}
I am not sure that the use of "untested" is correct, here. Looking
at the dejagnu documentation:
UNTESTED
A test was not run. This is a placeholder, used when there is no
real test case yet.
untested "string"
Declares a test was not run. untested writes in the log file
a message beginning with `UNTESTED', appending the argument
string. For example, you might use this in a dummy test whose
only role is to record that a test does not yet exist for some
feature.
Perhaps we just ought to `return' directly. What do others think?
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] skip break-entry.exp when using a stub
2010-11-02 17:58 ` Joel Brobecker
@ 2010-11-02 18:04 ` Michael Snyder
0 siblings, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2010-11-02 18:04 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Nathan Froyd, gdb-patches
Joel Brobecker wrote:
>> -Nathan
>>
>> * gdb.base/break-entry.exp: Skip if using a stub.
>
> I am not sure about one detail:
>
>> +# If we're using a stub, we'll already be stopped at the entry point
>> +# when we connect. Don't bother trying to work around this in the
>> +# testing below.
>> +
>> +if [target_info exists use_gdb_stub] {
>> + untested ${testfile}.exp
>> + return
>> +}
>
> I am not sure that the use of "untested" is correct, here. Looking
> at the dejagnu documentation:
>
> UNTESTED
> A test was not run. This is a placeholder, used when there is no
> real test case yet.
>
> untested "string"
> Declares a test was not run. untested writes in the log file
> a message beginning with `UNTESTED', appending the argument
> string. For example, you might use this in a dummy test whose
> only role is to record that a test does not yet exist for some
> feature.
>
> Perhaps we just ought to `return' directly. What do others think?
>
Yes, that's what I'd do.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-02 18:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-29 19:20 [PATCH] skip break-entry.exp when using a stub Nathan Froyd
2010-10-29 20:10 ` Pedro Alves
2010-11-02 17:58 ` Joel Brobecker
2010-11-02 18:04 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox