More debugger bugs

Vladimir Prus ghost at cs.msu.su
Tue Nov 28 21:23:43 UTC 2006


On Tuesday 28 November 2006 23:09, Vladimir Prus wrote:
> On Tuesday 28 November 2006 22:34, Andras Mantia wrote:
> > On Tuesday 28 November 2006 21:21, Vladimir Prus wrote:
> > > On Tuesday 28 November 2006 22:06, Andras Mantia wrote:
> > > > I try to use this stuff and document the bugs now (also on
> > > > bugs.kde.org). The first part is reported as bug #138040, the
> > > > second part is #138041.
> > > > I consider them serious bugs and regressions. If they are not
> > > > fixed, I heavily object to release KDevelop 3.4.
> > >
> > > It would be much more helpful if you provide me with a way to
> > > reproduce the bugs -- I can't quite debug anything if all I know is a
> > > single line of code.
> >
> > The description  is quite detailed if you ask me, and it is taken from
> > KDevelop's code.  ;-)
> >
> > > I have 3.4 checkout, what steps do I have to make to reproduce what
> > > you see?
> >
> > Create a project in KDevelop which has some disabled plugins (load the
> > project, disable a plugin, close the project - after closing reenable
> > the plugin).
> > Create a project (or open if you have one) for the KDevelop 3.4 sources.
> > Set a breakpoint to the line I gave:
> > PluginController::getInstance()->unloadPlugins( m_info->m_ignoreParts );
> > in src/projectmanager.cpp (should be line 574).
> >
> > Run KDevelop inside the debugger and load the project you've created.
> > m_info->m_ignoreParts should have the disabled plugin names. The
> > QStringList bug is visible from now on.
>
> Reproduces. As usual, blame it on gdb :-( I'll think about how we can
> workaround it.
>
> I actually have sent a patch to gdb that would have fixed this problem, but
> it was not reviewed and I did not pinged.
>
> > After this step into the
> > unloadPlugins method. You will see the second part of the QStringList
> > issue.
>
> Reproduced. Again, clearly a gdb bug, but in this case:
>
> 	- no workaround is possible
> 	- I think I can fix this in gdb

I've diagnosed this. The following program reproduces the bug:

struct S { int i; int j; };
struct S2 : S {};

int foo(S2& s)
{
    return s.i;
}

int main()
{
    S2 s;
    s.i = 1;
    s.j = 2;
    return foo(s);
}

Inside foo, no field of the baseclass is accessible. I have preliminary gdb 
patch, I'll finish it tomorrow and let you know when it goes upstream.

Thanks,
Volodya




More information about the KDevelop-devel mailing list