[Qt] qt arm panel debugging
Terry Kemp
klc at klc.net.nz
Mon Apr 28 11:34:23 CEST 2008
OK... Im into debugging panel prob on gumstix arm.
I am creating 4 panels at runtime at fixed locations. The panel
background (QtFrame?) is correct. The panel border (Frame3D?) is offset
upwards, suspiciously like the height of a top of window border - which
I don't have.
The coords for the frame3d seem correct - but they are (0, 0, x, x) or
(1, 1, x, x) etc. not screen coords of (100, 100, x, x) or whatever.
How can I check the absolute screen position as I step thru?
new to gdb so if there is anything I'm missing let me know. I do use the
step command sometimes but it does go off into the murky depths of the
lcl and I end up getting lost ;)
Terry
here is a typical debug session so far...
root at gumstix-custom-verdex:~$ ls
custompanel.inc myproject1.o qtobject.inc
myproject1 myunit1.lfm qtwidgets.pas
myproject1.compiled myunit1.lrs qtwinapi.inc
myproject1.lpi myunit1.o unit1.lrs
myproject1.lpi.bak myunit1.pas unit1.pas
myproject1.lpr myunit1.pas.bak unit1.pas.bak
myproject1.lpr.bak myunit1.ppu
root at gumstix-custom-verdex:~$ gdb myproject1
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "arm-angstrom-linux-gnueabi"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b qtwinapi.inc:1679
Breakpoint 1 at 0x142444: file qtwinapi.inc, line 1679.
(gdb) run -qws
Starting program: /home/root/myproject1 -qws
Breakpoint 1, TQTWIDGETSET__FRAME3D (DC=1092454016, ARECT=
{LEFT = 0, TOP = 0, RIGHT = 170, BOTTOM = 50, TOPLEFT = {X = 0,
Y = 0}, BOTTOMRIGHT = {X = 170, Y = 50}}, FRAMEWIDTH=1, STYLE=BVRAISED,
this=0x411d8020) at qtwinapi.inc:1679
1679 Result := False;
Current language: auto; currently pascal
(gdb) n
1681 if not IsValidDC(DC) then exit;
(gdb) n
1683 QtDC := TQtDeviceContext(DC);
(gdb) n
1685 case Style of
(gdb) p QtDC
$1 = (^TQTDEVICECONTEXT) 0x411d8680
(gdb) n
1689 bvRaised: QtDC.qDrawWinPanel(ARect.Left, ARect.Top,
(gdb) n
1690 ARect.Right - ARect.Left, ARect.Bottom - ARect.Top, nil,
False, FrameWidth);
(gdb) n
1694 if Style <> bvNone then
(gdb) p ARect
$2 = {LEFT = 0, TOP = 0, RIGHT = 170, BOTTOM = 50, TOPLEFT = {X = 0, Y =
0},
BOTTOMRIGHT = {X = 170, Y = 50}}
(gdb) n
1695 InflateRect(ARect, -FrameWidth, -FrameWidth);
(gdb) p -FrameWidth
$3 = -1
(gdb) n
1696 Result := True;
(gdb) n
1697 end;
(gdb) n
FRAME3D (DC=1092454016, ARECT=
{LEFT = 1, TOP = 1, RIGHT = 169, BOTTOM = 49, TOPLEFT = {X = 1,
Y = 1}, BOTTOMRIGHT = {X = 169, Y = 49}}, FRAMEWIDTH=1, STYLE=BVRAISED)
at lclintf.inc:218
218 lclintf.inc: No such file or directory.
in lclintf.inc
(gdb) n
TCANVAS__FRAME3D (ARECT=
{LEFT = 1, TOP = 1, RIGHT = 169, BOTTOM = 49, TOPLEFT = {X = 1,
Y = 1}, BOTTOMRIGHT = {X = 169, Y = 49}}, FRAMEWIDTH=1, STYLE=BVRAISED,
this=0x41180180) at canvas.inc:893
893 canvas.inc: No such file or directory.
in canvas.inc
(gdb) n
894 in canvas.inc
(gdb) n
TCUSTOMPANEL__PAINT (this=0x4118a050) at custompanel.inc:99
99 InflateRect(ARect, -1, -1);
(gdb) n
102 if BevelInner <> bvNone then
(gdb) n
104 if BorderWidth > 0 then InflateRect(ARect, -BorderWidth,
-BorderWidth);
(gdb) n
105 Canvas.Frame3d(ARect, BevelWidth, BevelInner);
(gdb) n
Breakpoint 1, TQTWIDGETSET__FRAME3D (DC=1092454016, ARECT=
{LEFT = 2, TOP = 2, RIGHT = 168, BOTTOM = 48, TOPLEFT = {X = 2,
Y = 2}, BOTTOMRIGHT = {X = 168, Y = 48}}, FRAMEWIDTH=1, STYLE=BVLOWERED,
this=0x411d8020) at qtwinapi.inc:1679
1679 Result := False;
(gdb) n
1681 if not IsValidDC(DC) then exit;
(gdb) n
1683 QtDC := TQtDeviceContext(DC);
(gdb) n
1685 case Style of
(gdb) n
1687 bvLowered: QtDC.qDrawWinPanel(ARect.Left, ARect.Top,
(gdb) n
1688 ARect.Right - ARect.Left, ARect.Bottom - ARect.Top, nil,
True, FrameWidth);
(gdb) n
1694 if Style <> bvNone then
(gdb) n
1695 InflateRect(ARect, -FrameWidth, -FrameWidth);
(gdb) n
1696 Result := True;
(gdb) n
1697 end;
(gdb) n
FRAME3D (DC=1092454016, ARECT=
{LEFT = 3, TOP = 3, RIGHT = 167, BOTTOM = 47, TOPLEFT = {X = 3,
Y = 3}, BOTTOMRIGHT = {X = 167, Y = 47}}, FRAMEWIDTH=1, STYLE=BVLOWERED)
at lclintf.inc:218
218 lclintf.inc: No such file or directory.
in lclintf.inc
(gdb) n
TCANVAS__FRAME3D (ARECT=
{LEFT = 3, TOP = 3, RIGHT = 167, BOTTOM = 47, TOPLEFT = {X = 3,
Y = 3}, BOTTOMRIGHT = {X = 167, Y = 47}}, FRAMEWIDTH=1, STYLE=BVLOWERED,
this=0x41180180) at canvas.inc:893
893 canvas.inc: No such file or directory.
in canvas.inc
(gdb) n
894 in canvas.inc
(gdb) n
TCUSTOMPANEL__PAINT (this=0x4118a050) at custompanel.inc:106
106 InflateRect(ARect, -1, -1);
(gdb) n
108 if Caption <> '' then begin
(gdb) n
127 inherited Paint;
(gdb) n
128 end;
(gdb) n
128 end;
(gdb) n
Segmentation fault
root at gumstix-custom-verdex:~$
More information about the Qt
mailing list