This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH] D: Fix crash when expression debugging


On 17-01-04 21:38:07, Iain Buclaw wrote:
> >>>> +if { [skip_d_tests] } { continue }
> >>>
> >>> We should output a message:
> >>>
> >>> untested "skipping d language tests"
> >>>
> >>> It may be more reasonable to just return instead of continuing? The
> >>> effect
> >>> will probably be the same, but it is a bit confusing to read "continue"
> >>> without a visible loop.
> >>>
> >>
> >> I did a quick grep, and it seems like everyone is skippingtests in
> >> this way except for gdb.ada and gdb.btrace which are doing { return -1
> >> }
> >>
> >>
> >
> > That's a bit of a stretch. Take, for example, a few of the examples in
> > gdb.base. You will see a number of them returning.
> >
> > The problem here is inheriting past confusing practices when we use some
> > existing files to create new ones, which is not your fault really. I'm
> > guilty myself. :-)
> >
> 
> Yes indeed. I wasn't disagreeing, just questioning the two competing
> ways of returning.
> 
> I will update to use return and push this in then if there's no
> disagreement. :-)
> 

"return" is clearer than "continue", and "return" is preferred in
https://www.sourceware.org/gdb/wiki/GDBTestcaseCookbook

-- 
Yao (齐尧)


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