This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH RFA] step-test.exp changes for IA-64


Kevin Buettner wrote:
> 
> On May 13,  7:58am, Michael Snyder wrote:
> 
> > Kevin Buettner wrote:
> > > > On IA-64, when using "finish" to step out of a function, gdb will stop
> > > > on the line containing the call to the function that you've just
> > > > stepped out of.  The reason for this is that immediately after the
> > > > call instruction is an instruction which restores the global pointer.
> > > > Since this is part of the sequence of instructions forming the call,
> > > > it makes sense that gdb would place you on the line of the call instead
> > > > of the next executable line after the call.
> >
> > Such behavior is not all that unusual.  It might be good to
> > generalize the test so that it accepts either the line with
> > the function call or the line after, instead of making it
> > depend on a specific target.
> 
> I'm certainly willing to do this if acceptable to the testsuite
> maintainers.  Fernando, at least, had certain reservations about this
> patch to begin with.  (See the "What should `finish' do?" thread.)

Well, let's separate the question of "what should GDB do" 
from "what should the testsuite do".  This is a testsuite
patch.  Changing the behavior of gdb is a related but not
identical discussion.

My opinion -- the testsuite should test the current behavior
of gdb, not the desired behavior.  If we expect that GDB will
stop either on the line of the function call or on the next
line, then both of those behaviors should pass.

If we wanted to be slightly more rigorous, we could say that
stopping on the line of the function call is an expected failure.
That shouldn't be difficult, neh?  Something like:

    -re {next-line-pattern} {
	pass "finish"
     }
    -re {function-call-line-pattern {
	setup-xfail "*-*-*"
	fail "finish"
    }
    -re {anything-else} {
	fail "finish"
    }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]