Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, March 2008
Can't debug qt4-based apps


Message 1 in thread

Hi.

I can't seem to run through the simplest qt 4.3.x apps when using a debugger. 
Running applications works, but I can't debug. When I try to step over any 
line of code that has to do with Qt, I get:

Cannot insert breakpoint 0.
Error accessing memory address 0x0: Input/output error.

The only way to continue onto the next line is to set a breakpoint there 
and "continue" the debugging process.

I've tried with qt 4.3.0 that came with Ubuntu Feisty. I thought maybe the 
problem was with the library lacking debugging symbols, so I downloaded the 
latest sources of 4.3.4 and compiled with "./configure -debug". Nothing 
changed.

I'm trying to step through the code in examples/richtext/calendar, but I get 
the same problem on all other Qt code. An example line on which this problem 
occurs is:
    QApplication app(argc, argv);

This must have happened to someone else. Google isn't turning up anything 
useful.

Thanks,
Tro

P.S. gdb seems to have no such problems when used directly from the command 
line, but I need IDE support.

--
 [ signature omitted ] 

Message 2 in thread

Hi,

> P.S. gdb seems to have no such problems when used directly from the command 
> line, but I need IDE support.

Which IDE?

-- 
 [ signature omitted ] 

Message 3 in thread

On Saturday 22 March 2008, Dimitri wrote:
> Hi,
>
> > P.S. gdb seems to have no such problems when used directly from the
> > command line, but I need IDE support.
>
> Which IDE?

Oops. I could've sworn I mentioned them. I tried with Eclipse 3.3 with CDT and 
KDevelop 3.4.0.

Thanks,
Tro

--
 [ signature omitted ] 

Message 4 in thread

On 22.03.08 13:28:29, Tro wrote:
> On Saturday 22 March 2008, Dimitri wrote:
> > Hi,
> >
> > > P.S. gdb seems to have no such problems when used directly from the
> > > command line, but I need IDE support.
> >
> > Which IDE?
> 
> Oops. I could've sworn I mentioned them. I tried with Eclipse 3.3 with CDT and 
> KDevelop 3.4.0.

You should use KDevelop 3.5 if possible. Also note that you should get
either gdb 6.6 or gdb >6.7.1 (6.7.0 and 6.7.1 have serious bugs in the
communication interface that kdevelop uses).

Andreas

-- 
 [ signature omitted ] 

Message 5 in thread

On Saturday 22 March 2008, Andreas Pakulat wrote:
> On 22.03.08 13:28:29, Tro wrote:
> > On Saturday 22 March 2008, Dimitri wrote:
> > > Hi,
> > >
> > > > P.S. gdb seems to have no such problems when used directly from the
> > > > command line, but I need IDE support.
> > >
> > > Which IDE?
> >
> > Oops. I could've sworn I mentioned them. I tried with Eclipse 3.3 with
> > CDT and KDevelop 3.4.0.
>
> You should use KDevelop 3.5 if possible. Also note that you should get
> either gdb 6.6 or gdb >6.7.1 (6.7.0 and 6.7.1 have serious bugs in the
> communication interface that kdevelop uses).

I tried with KDevelop 3.5.1 and the situation didn't change. I'm using gdb 
6.6. I see that there isn't a stable version >6.7.1, so I didn't try.

The fact that I'm getting the same error with Eclipse's CDT suggests to me 
that it's not the IDE that's at fault. I'm going to try to recompile gdb 6.6 
and see if that solves anything.

Any other ideas?

Thanks,
Tro

--
 [ signature omitted ] 

Message 6 in thread

On Sunday 23 March 2008, Tro wrote:
> I'm going to try to recompile gdb
> 6.6 and see if that solves anything.

Recompiling didn't change anything, but on the bright side, it seems that 
NetBeans 6 with the C++ plugin doesn't exhibit this problem, so I'll stick 
with that for now.

Thanks,
Tro

--
 [ signature omitted ]