Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/testsuite] Handle MIPS in step-test.exp
@ 2002-10-21 19:02 Daniel Jacobowitz
  2002-10-22  7:19 ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-10-21 19:02 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnasser

The MIPS PIC calling conventions have a $gp register which needs to be
reloaded after function calls, so they need the same treatment IA-64 and PA
do in step-test.  I also needed to finish stepping past one call before
looking for the next or the test showed a bogus failure.

Is this OK?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2002-10-21  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.base/step-test.exp: Allow MIPS to return to the line of a
	function call.

Index: testsuite/gdb.base/step-test.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/step-test.exp,v
retrieving revision 1.5
diff -u -p -r1.5 step-test.exp
--- testsuite/gdb.base/step-test.exp	5 Apr 2002 00:30:09 -0000	1.5
+++ testsuite/gdb.base/step-test.exp	13 Oct 2002 22:55:02 -0000
@@ -78,7 +78,8 @@ gdb_test "step" ".*${decimal}.*myglob.*"
 # On PA64, we end up at a different instruction than PA32.
 # On IA-64, we also end up on callee instead of on the next line due
 # to the restoration of the global pointer (which is a caller-save).
-if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"]} {
+# Similarly on MIPS PIC targets.
+if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
     send_gdb "finish\n"
     gdb_expect {
         -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" { pass "step out 1" }
@@ -176,8 +177,11 @@ gdb_expect {
     # On PA64, we end up at a different instruction than PA32.
     # On IA-64, we end up on callee instead of on the following line due
     # to the restoration of the global pointer.
-    if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] } {
+    # Similarly on MIPS PIC targets.
+    if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
         pass "stepi: finish call 2"
+	test_i "stepi: past call" "stepi" \
+	  ".*${decimal}.*callee.*STEPI"  ".*${decimal}.*callee.*NEXTI"
     } else {
 	fail "stepi: finish call 2"
         return


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/testsuite] Handle MIPS in step-test.exp
  2002-10-21 19:02 [RFA/testsuite] Handle MIPS in step-test.exp Daniel Jacobowitz
@ 2002-10-22  7:19 ` Andrew Cagney
  2002-10-22  7:25   ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-10-22  7:19 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches, fnasser

> The MIPS PIC calling conventions have a $gp register which needs to be
> reloaded after function calls, so they need the same treatment IA-64 and PA
> do in step-test.  I also needed to finish stepping past one call before
> looking for the next or the test showed a bogus failure.

Is this a straight GDB bug?

Andrew



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/testsuite] Handle MIPS in step-test.exp
  2002-10-22  7:19 ` Andrew Cagney
@ 2002-10-22  7:25   ` Daniel Jacobowitz
  2002-11-27 10:55     ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-10-22  7:25 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches, fnasser

On Tue, Oct 22, 2002 at 10:19:30AM -0400, Andrew Cagney wrote:
> >The MIPS PIC calling conventions have a $gp register which needs to be
> >reloaded after function calls, so they need the same treatment IA-64 and PA
> >do in step-test.  I also needed to finish stepping past one call before
> >looking for the next or the test showed a bogus failure.
> 
> Is this a straight GDB bug?

It's a straight testsuite bug.  The test is full of assumptions about
when nexti will move to the next source line.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/testsuite] Handle MIPS in step-test.exp
  2002-10-22  7:25   ` Daniel Jacobowitz
@ 2002-11-27 10:55     ` Andrew Cagney
  2002-12-03  7:18       ` Fernando Nasser
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-11-27 10:55 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches, fnasser

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

> On Tue, Oct 22, 2002 at 10:19:30AM -0400, Andrew Cagney wrote:
> 
>> >The MIPS PIC calling conventions have a $gp register which needs to be
>> >reloaded after function calls, so they need the same treatment IA-64 and PA
>> >do in step-test.  I also needed to finish stepping past one call before
>> >looking for the next or the test showed a bogus failure.
> 
>> 
>> Is this a straight GDB bug?
> 
> 
> It's a straight testsuite bug.  The test is full of assumptions about
> when nexti will move to the next source line.

Ah, m'kay by me.  Fernando?

Andrew


[-- Attachment #2: mailbox-message://ac131313@movemail/fsf/gdb/patches#3835101 --]
[-- Type: message/rfc822, Size: 4786 bytes --]

From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Cc: fnasser@redhat.com
Subject: [RFA/testsuite] Handle MIPS in step-test.exp
Date: Mon, 21 Oct 2002 22:02:18 -0400
Message-ID: <20021022020218.GA22839@nevyn.them.org>

The MIPS PIC calling conventions have a $gp register which needs to be
reloaded after function calls, so they need the same treatment IA-64 and PA
do in step-test.  I also needed to finish stepping past one call before
looking for the next or the test showed a bogus failure.

Is this OK?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2002-10-21  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.base/step-test.exp: Allow MIPS to return to the line of a
	function call.

Index: testsuite/gdb.base/step-test.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/step-test.exp,v
retrieving revision 1.5
diff -u -p -r1.5 step-test.exp
--- testsuite/gdb.base/step-test.exp	5 Apr 2002 00:30:09 -0000	1.5
+++ testsuite/gdb.base/step-test.exp	13 Oct 2002 22:55:02 -0000
@@ -78,7 +78,8 @@ gdb_test "step" ".*${decimal}.*myglob.*"
 # On PA64, we end up at a different instruction than PA32.
 # On IA-64, we also end up on callee instead of on the next line due
 # to the restoration of the global pointer (which is a caller-save).
-if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"]} {
+# Similarly on MIPS PIC targets.
+if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
     send_gdb "finish\n"
     gdb_expect {
         -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" { pass "step out 1" }
@@ -176,8 +177,11 @@ gdb_expect {
     # On PA64, we end up at a different instruction than PA32.
     # On IA-64, we end up on callee instead of on the following line due
     # to the restoration of the global pointer.
-    if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] } {
+    # Similarly on MIPS PIC targets.
+    if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
         pass "stepi: finish call 2"
+	test_i "stepi: past call" "stepi" \
+	  ".*${decimal}.*callee.*STEPI"  ".*${decimal}.*callee.*NEXTI"
     } else {
 	fail "stepi: finish call 2"
         return


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/testsuite] Handle MIPS in step-test.exp
  2002-11-27 10:55     ` Andrew Cagney
@ 2002-12-03  7:18       ` Fernando Nasser
  2002-12-03  7:55         ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Fernando Nasser @ 2002-12-03  7:18 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Daniel Jacobowitz, gdb-patches



Andrew Cagney wrote:
>> On Tue, Oct 22, 2002 at 10:19:30AM -0400, Andrew Cagney wrote:
>>
>>> >The MIPS PIC calling conventions have a $gp register which needs to be
>>> >reloaded after function calls, so they need the same treatment IA-64 
>>> and PA
>>> >do in step-test.  I also needed to finish stepping past one call before
>>> >looking for the next or the test showed a bogus failure.
>>
>>
>>>
>>> Is this a straight GDB bug?
>>
>>
>>
>> It's a straight testsuite bug.  The test is full of assumptions about
>> when nexti will move to the next source line.
> 
> 
> Ah, m'kay by me.  Fernando?
> 

'Course.  Thanks Daniel.  Please check it in.

Regards to all,
Fernando

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA/testsuite] Handle MIPS in step-test.exp
  2002-12-03  7:18       ` Fernando Nasser
@ 2002-12-03  7:55         ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2002-12-03  7:55 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Daniel Jacobowitz, gdb-patches

Just a PS.  Fernando and I just figured out that any e-mail I sent 
directly to him disappeared into the ether.  Just me, and just that one 
way .....

Have to love this technology.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-12-03 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 19:02 [RFA/testsuite] Handle MIPS in step-test.exp Daniel Jacobowitz
2002-10-22  7:19 ` Andrew Cagney
2002-10-22  7:25   ` Daniel Jacobowitz
2002-11-27 10:55     ` Andrew Cagney
2002-12-03  7:18       ` Fernando Nasser
2002-12-03  7:55         ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox