Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] eclipse cdt debugging question

Are you using Eclipse 3.1 M3?
Just FYI the CDT 2.1 and 2.0.2 versions are not intended to work with Eclipse 3.1. Please, submit a bug in Bugzilla if you find the same problem with Eclipse 3.0.
Thanks.

----- Original Message ----- From: "Martin Hajduch" <martin@xxxxxxxxxx>
To: <cdt-dev@xxxxxxxxxxx>
Sent: Saturday, December 25, 2004 7:11 AM
Subject: Re: [cdt-dev] eclipse cdt debugging question


hi !

Which versions of CDT and Eclipse are you using?

cdt: 2.1.0, but i had the same problem with cdt 2.0.2
eclipse platform: 3.1.0

Can you please provide the gdb trace? On how to do it see the CDT Debugger FAQ #5.

here it is (i put some comments to indicate the steps i've done - in GUI):

focus lost
thread 0 selected again (note: i've highlighted the whole thread, not the topmost stack entry !!!)
step into performed

[1,103,976,195,705] 279-exec-step 1
[1,103,976,195,708] 279^running
[1,103,976,195,711] (gdb)
[1,103,976,195,713] 279*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0xb7f9fe06",f\ unc="DXFReadFile",args=[{name="filename",value="0xbffff60b \"morepieces.dxf\""},{name="dxf",value="0\
xbffff39c"}],file="dxf_basic.c",line="559"}
[1,103,976,195,713] (gdb)
[1,103,976,195,713] 280 info threads
[1,103,976,195,714] &"info threads\n"
[1,103,976,195,714] 280^done
[1,103,976,195,714] (gdb)
[1,103,976,195,715] 281-stack-info-depth
[1,103,976,195,715] 281^done,depth="2"
[1,103,976,195,715] (gdb)
[1,103,976,195,716] 282-stack-list-frames 0 2
[1,103,976,195,716] 282^done,stack=[frame={level="0",addr="0xb7f9fe06",func="DXFReadFile",file="dxf_\
basic.c",line="559"},frame={level="1",addr="0x08048a04",func="main",file="dxf_test.c",line="31"}]
[1,103,976,195,717] (gdb)
[1,103,976,195,717] 283-var-update var11
[1,103,976,195,717] 283^done,changelist={}
[1,103,976,195,718] (gdb)
[1,103,976,195,718] 284-var-update var12
[1,103,976,195,718] 284^done,changelist={}
[1,103,976,195,719] (gdb)
[1,103,976,195,719] 285-var-update var13
[1,103,976,195,719] 285^done,changelist={}
[1,103,976,195,733] (gdb)
[1,103,976,195,735] 286-var-update var14
[1,103,976,195,736] 286^done,changelist={}
[1,103,976,195,736] (gdb)
[1,103,976,195,736] 287-data-list-changed-registers
[1,103,976,195,736] 287^done,changed-registers=["8"]
[1,103,976,195,737] (gdb)
[1,103,976,195,737] 288 info sharedlibrary
[1,103,976,195,737] &"info sharedlibrary\n"
[1,103,976,195,738] ~"From To Syms Read Shared Object Library\n" [1,103,976,195,738] ~"0xb7fab430 0xb7fc2530 Yes /lib/tls/libm.so.6\n" [1,103,976,195,739] ~"0xb7f9bf40 0xb7fa52b0 Yes ./DXFLibrary.so\n" [1,103,976,195,739] ~"0xb7f87350 0xb7f95060 Yes ./CNTLibrary.so\n" [1,103,976,195,739] ~"0xb7e79dd0 0xb7f5d2b8 Yes /lib/tls/libc.so.6\n" [1,103,976,195,739] ~"0xb7fea810 0xb7ffbc93 Yes /lib/ld-linux.so.2\n"
[1,103,976,195,739] 288^done
[1,103,976,195,740] (gdb)
[1,103,976,196,000] 289-stack-list-arguments 0 0 0
[1,103,976,196,001] 289^done,stack-args=[frame={level="0",args=[name="filename",name="dxf"]}]
[1,103,976,196,001] (gdb)
[1,103,976,196,001] 290-stack-list-locals 0
[1,103,976,196,001] 290^done,locals=[name="f",name="r"]
[1,103,976,196,002] (gdb)

thread selection kept -> but now is the topmost stack entry selected
another step into

[1,103,976,224,296] 291-exec-step 1
[1,103,976,224,299] 291^running
[1,103,976,224,302] (gdb)
[1,103,976,224,310] 291*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0xb7f9fe12",f\ unc="DXFReadFile",args=[{name="filename",value="0xbffff60b \"morepieces.dxf\""},{name="dxf",value="0\
xbffff39c"}],file="dxf_basic.c",line="560"}
[1,103,976,224,315] (gdb)
[1,103,976,224,320] 292 info threads
[1,103,976,224,320] &"info threads\n"
[1,103,976,224,321] 292^done
[1,103,976,224,326] (gdb)
[1,103,976,224,328] 293-stack-info-depth
[1,103,976,224,342] 293^done,depth="2"
[1,103,976,224,343] (gdb)
[1,103,976,224,343] 294-stack-list-frames 0 2
[1,103,976,224,344] 294^done,stack=[frame={level="0",addr="0xb7f9fe12",func="DXFReadFile",file="dxf_\
basic.c",line="560"},frame={level="1",addr="0x08048a04",func="main",file="dxf_test.c",line="31"}]
[1,103,976,224,344] (gdb)
[1,103,976,224,346] 295-var-update var11
[1,103,976,224,349] 295^done,changelist={}
[1,103,976,224,350] (gdb)
[1,103,976,224,350] 296-var-update var12
[1,103,976,224,353] 296^done,changelist={}
[1,103,976,224,354] (gdb)
[1,103,976,224,355] 297-var-update var13
[1,103,976,224,373] 297^done,changelist={}
[1,103,976,224,374] (gdb)
[1,103,976,224,378] 298-var-update var14
[1,103,976,224,393] 298^done,changelist={}
[1,103,976,224,393] (gdb)
[1,103,976,224,393] 299-data-list-changed-registers
[1,103,976,224,394] 299^done,changed-registers=["8"]
[1,103,976,224,394] (gdb)
[1,103,976,224,394] 300 info sharedlibrary
[1,103,976,224,395] &"info sharedlibrary\n"
[1,103,976,224,396] ~"From To Syms Read Shared Object Library\n" [1,103,976,224,396] ~"0xb7fab430 0xb7fc2530 Yes /lib/tls/libm.so.6\n" [1,103,976,224,397] ~"0xb7f9bf40 0xb7fa52b0 Yes ./DXFLibrary.so\n" [1,103,976,224,399] ~"0xb7f87350 0xb7f95060 Yes ./CNTLibrary.so\n" [1,103,976,224,400] ~"0xb7e79dd0 0xb7f5d2b8 Yes /lib/tls/libc.so.6\n" [1,103,976,224,400] ~"0xb7fea810 0xb7ffbc93 Yes /lib/ld-linux.so.2\n"
[1,103,976,224,401] 300^done
[1,103,976,224,401] (gdb)
[1,103,976,224,493] 301-stack-list-arguments 0 0 0
[1,103,976,224,493] 301^done,stack-args=[frame={level="0",args=[name="filename",name="dxf"]}]
[1,103,976,224,494] (gdb)
[1,103,976,224,494] 302-stack-list-locals 0
[1,103,976,224,494] 302^done,locals=[name="f",name="r"]
[1,103,976,224,495] (gdb)

thread selection lost
no more steps possible without reselecting the thread

FYI: the code i've been debugging is this one:
....
   *dxf=(tDxfFILE*)calloc(1,sizeof(tDxfFILE));
   (*dxf)->Blocks.NumberOfBlocks=0;
   (*dxf)->Blocks.NumberAllocated=0;
....

the first line has been executed in step 1, second line in step 2, third line cannot be executed without selecting thread 0 in GUI again

if you need more information (complete gdb trace or something else), please let me know

thanks for your help !

regards,
martin

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top