This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: RFA: report failure to restore selected frame, but continue


On 09 Apr 2003 16:41:06 -0500, Jim Blandy <jimb at redhat dot com> said:

[ message snipped ]

Basically fine, just a few comments.  It might be nice if there were a
test for this somewhere appropriate in gdb.base, in which case the big
comment could go there: or is there a reason why this only manifests
itself in C++?  Actually, I'm not convinced that all of the big
comment belongs in the test suite at all: why not put it some place in
the GDB source code and/or the bug database, with a reference to that
in the testsuite?  The diagnosis of the problem should be in the place
where it people fixing the problem will be most likely to see it,
after all.

The use of a conditional setup_kfail followed by a fail is good:
normally, I don't like setup_kfail so much, but it's quite appropriate
here.

> + # of 4-2003 it doesn't, so code like frame_find_by_id can't

Personally, I'd say "April 2003" or "2003-04-09" or something instead
of "4-2003".

> + # fail.  We should detect report that failure, but let the marker call

Typo.

> + send_gdb "frame\n"
> + gdb_expect {
> +     -re "#0  marker1.*$gdb_prompt $" {
> +         setup_kfail "gdb/1155" s390-*-linux-gnu
> +         fail "re-selected 'main' frame after inferior method call (gdb/1155)"
> +         gdb_test "finish" ".*main.*at .*userdef.cc:27\[67\].*" \
> +                 "finish call to marker1"
> +     }
> +     -re "#1  ($hex in )?main.*$gdb_prompt $" {
> +         pass "re-selected 'main' frame after inferior method call"
> +     }
> +     -re ".*$gdb_prompt $" {
> +         fail "re-selected 'main' frame after inferior method call"
> +     }
> +     timeout {
> +         fail "re-selected 'main' frame after inferior method call (timeout)"
> +     }
> + }
> +         

We're using gdb_test_multiple now: replace the first two lines by:

gdb_test_multiple "frame" "re-selected 'main' frame after inferior method call" {

and delete the last two branches.  (I'm pretty sure that's right, run
it to make sure.)  You can see an example in gdb.c++/templates.exp.
Also, don't put (gdb/1155) in the fail message: the setup_kfail should
take care of that for you.

Ditto for the uses in the other two files, of course.

Other than that, it's fine: no need to resubmit it for approval after
making those changes unless you think it would be useful for some
reason.

David Carlton
carlton at math dot stanford dot edu


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