[kdevelop] debuggers/gdb/unittests: Fix gdb testCatchpoint() unit test.

Milian Wolff mail at milianw.de
Tue Jul 16 22:21:12 UTC 2013


On Tuesday 16 July 2013 22:57:38 Vlas Puhov wrote:
>  It's pretty simple: If you open debugeeexception.cpp file you'll notice,
> that on 29 line there is no local variables yet. The only variables that
> can be accesible is main's function arguments. So, before your commit all
> gdb's unittests were passing ok, but when you've removed all arguments from
> main function, there is no more local variables(at least my compiler says
> there is none, but seems like yours tells there is one, that's why this
> stuff is compiler specific) and this test isn't passed anymore. Anyway why
> did we check it in the first place?  It has nothing to do with exception
> handling. PS: I feel really bad about reverting your commit like that :(

It is simple, indeed. I somehow was under the impression that it did work with 
my fix but I also assumed it breaks at loc 34 where the "e" local is 
available...

So I'll remove even more code and then this should be fine. You are definitely 
right that checking the locals at the random loc29 is superflous.

Cheers

PS: Next time, don't feel bad about revertng the commit. But feel bad about 
not adding all this reasoning and information to the commit message :P

> On Tuesday 16 july 2013, 18:08 +02:00 Milian Wolff <mail at milianw.de>:wrote:
> >Why? This should work, there is a local variable and we should find it. Why
> >does it not work for you?
> >
> >Please, don't just revert stuff like that, rather please try to contact me
> >e.g. on IRC or via  kdevelop-devel at kde.org and point out what is broken and
> >why.
> >
> >Disabling code like this is definitely not worth a "fix unit test" commit
> >message. If at all, the code should be _removed_ and the commit added to
> >the commit message.
> >
> >Anyhow, please explain why this is supposedly compiler specific and/or why
> >this is not working for you.
> >
> >PS: please direct all answers to kdevelop-devel.
> >
> >Bye
> >
> >On Tuesday 16 July 2013 12:21:26 Vlas Puhov wrote:
> >> Git commit fa9839a5aabb2c62c5bdd2bfe155d9349289a0e0 by Vlas Puhov.
> >> Committed on 16/07/2013 at 12:12.
> >> Pushed by vpuhov into branch 'master'.
> >> 
> >> Fix gdb testCatchpoint() unit test.
> >> 
> >> CCMAIL:  mail at milianw.de
> >> 
> >> M  +2    -1    debuggers/gdb/unittests/gdbtest.cpp
> >> 
> >>  http://commits.kde.org/kdevelop/fa9839a5aabb2c62c5bdd2bfe155d9349289a0e0
> >> 
> >> diff --git a/debuggers/gdb/unittests/gdbtest.cpp
> >> b/debuggers/gdb/unittests/gdbtest.cpp index e860ab6..983f2c8 100644
> >> --- a/debuggers/gdb/unittests/gdbtest.cpp
> >> +++ b/debuggers/gdb/unittests/gdbtest.cpp
> >> @@ -1570,7 +1570,8 @@ void GdbTest::testCatchpoint()
> >> 
> >>      QModelIndex i = variableCollection()->index(1, 0);
> >>      COMPARE_DATA(i, "Locals");
> >> 
> >> -    QCOMPARE(variableCollection()->rowCount(i), 1);
> >> +   // Don't check it, because it depends on compiler version/type, and
> >> not
> >> so important for current test. +   //
> >> QCOMPARE(variableCollection()->rowCount(i), 1);
> >> 
> >>      session->addCommand(new GDBCommand(GDBMI::NonMI, "catch throw"));
> >>      session->run();
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130717/3f9a9926/attachment.sig>


More information about the KDevelop-devel mailing list