Sysprogs forums › Forums › VisualGDB › Debuggging error "Frame not in module"
- This topic has 15 replies, 3 voices, and was last updated 11 years, 4 months ago by JordanW.
-
AuthorPosts
-
August 12, 2013 at 07:50 #602JordanWParticipant
I’m using a Linux license to remote debug a remote linux program. When I start debugging and set a breakpoint in the multi-threaded application, VS2012 cannot find the current stack frame in a loaded module. The source cannot be shown for this location.
I’m using VGDB 3.1, Windows 7, Visual Studio 2012, Linux target with GDB 7.2-52
This is the log file:
gdb –interpreter mi –args “/tmp/VisualGDB/Archos/ArchosProject/Debug/Archos”
-list-features
=thread-group-added,id=”i1″
~”GNU gdb (GDB) Fedora (7.2-52.fc14)n”
~”Copyright (C) 2010 Free Software Foundation, Inc.n”
~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>nThis is free software: you are free to change and redistribute it.nThere is NO WARRANTY, to the extent permitted by law. Type “show copying”nand “show warranty” for details.n”
~”This GDB was configured as “i686-redhat-linux-gnu”.nFor bug reporting instructions, please see:n”
~”<http://www.gnu.org/software/gdb/bugs/>…n”
~”Reading symbols from /tmp/VisualGDB/Archos/ArchosProject/Debug/Archos…”
~”done.n”
^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”python”]
-gdb-set stop-on-solib-events 1
^done
^done
-inferior-tty-set /dev/pts/1
^done
-data-list-register-names
^done,register-names=[“eax”,”ecx”,”edx”,”ebx”,”esp”,”ebp”,”esi”,”edi”,”eip”,”eflags”,”cs”,”ss”,”ds”,”es”,”fs”,”gs”,”st0″,”st1″,”st2″,”st3″,”st4″,”st5″,”st6″,”st7″,”fctrl”,”fstat”,”ftag”,”fiseg”,”fioff”,”foseg”,”fooff”,”fop”,”xmm0″,”xmm1″,”xmm2″,”xmm3″,”xmm4″,”xmm5″,”xmm6″,”xmm7″,”mxcsr”,””,””,””,””,””,””,””,””,”orig_eax”,”al”,”cl”,”dl”,”bl”,”ah”,”ch”,”dh”,”bh”,”ax”,”cx”,”dx”,”bx”,””,”bp”,”si”,”di”,”mm0″,”mm1″,”mm2″,”mm3″,”mm4″,”mm5″,”mm6″,”mm7″]
-gdb-set disassembly-flavor intel
^done
^done
-gdb-set print demangle off
^done
-gdb-version
~”GNU gdb (GDB) Fedora (7.2-52.fc14)n”
~”Copyright (C) 2010 Free Software Foundation, Inc.n”
~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>nThis is free software: you are free to change and redistribute it.nThere is NO WARRANTY, to the extent permitted by law. Type “show copying”nand “show warranty” for details.n”
~”This GDB was configured as “i686-redhat-linux-gnu”.nFor bug reporting instructions, please see:n”
~”<http://www.gnu.org/software/gdb/bugs/>.n”
^done
-break-insert -f main
^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x08058057″,func=”main(int, char**)”,file=”../Main/main.cpp”,fullname=”/tmp/VisualGDB/Archos/Main/main.cpp”,line=”50″,times=”0″,original-location=”main”}
info target
&”info targetn”
~”Symbols from “/tmp/VisualGDB/Archos/ArchosProject/Debug/Archos”.n”
~”Local exec file:n”
~”t`/tmp/VisualGDB/Archos/ArchosProject/Debug/Archos’, file type elf32-i386.n”
~”tEntry point: 0x8049fc0n”
~”t0x08048134 – 0x08048147 is .interpn”
~”t0x08048148 – 0x08048168 is .note.ABI-tagn”
~”t0x08048168 – 0x0804818c is .note.gnu.build-idn”
~”t0x0804818c – 0x080481f0 is .gnu.hashn”
~”t0x080481f0 – 0x08048b00 is .dynsymn”
~”t0x08048b00 – 0x0804924c is .dynstrn”
~”t0x0804924c – 0x0804936e is .gnu.versionn”
~”t0x08049370 – 0x08049460 is .gnu.version_rn”
~”t0x08049460 – 0x08049488 is .rel.dynn”
~”t0x08049488 – 0x08049830 is .rel.pltn”
~”t0x08049830 – 0x08049860 is .initn”
~”t0x08049860 – 0x08049fc0 is .pltn”
~”t0x08049fc0 – 0x08059bdb is .textn”
~”t0x08059bdc – 0x08059bf8 is .finin”
~”t0x08059c00 – 0x0805b61c is .rodatan”
~”t0x0805b61c – 0x0805c858 is .eh_frame_hdrn”
~”t0x0805c858 – 0x080617ac is .eh_framen”
~”t0x080617ac – 0x080625b9 is .gcc_except_tablen”
~”t0x080635bc – 0x080635fc is .ctorsn”
~”t0x080635fc – 0x08063604 is .dtorsn”
~”t0x08063604 – 0x08063608 is .jcrn”
~”t0x08063608 – 0x08063718 is .dynamicn”
~”t0x08063718 – 0x0806371c is .gotn”
~”t0x0806371c – 0x080638fc is .got.pltn”
~”t0x08063900 – 0x08063b68 is .bssn”
^done
-exec-run
=thread-group-started,id=”i1″,pid=”1557″
=thread-created,id=”1″,group-id=”i1″
^running
*running,thread-id=”all”
=library-loaded,id=”/lib/ld-linux.so.2″,target-name=”/lib/ld-linux.so.2″,host-name=”/lib/ld-linux.so.2″,symbols-loaded=”0″,thread-group=”i1″
~”Stopped due to shared library eventn”
*stopped,thread-id=”1″,stopped-threads=”all”,core=”0″
-break-list
^done,BreakpointTable={nr_rows=”1″,nr_cols=”6″,hdr=[{width=”7″,alignment=”-1″,col_name=”number”,colhdr=”Num”},{width=”14″,alignment=”-1″,col_name=”type”,colhdr=”Type”},{width=”4″,alignment=”-1″,col_name=”disp”,colhdr=”Disp”},{width=”3″,alignment=”-1″,col_name=”enabled”,colhdr=”Enb”},{width=”10″,alignment=”-1″,col_name=”addr”,colhdr=”Address”},{width=”40″,alignment=”2″,col_name=”what”,colhdr=”What”}],body=[bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x08058057″,func=”main(int, char**)”,file=”../Main/main.cpp”,fullname=”/tmp/VisualGDB/Archos/Main/main.cpp”,line=”50″,times=”0″,original-location=”main”}]}
^done,BreakpointTable={nr_rows=”1″,nr_cols=”6″,hdr=[{width=”7″,alignment=”-1″,col_name=”number”,colhdr=”Num”},{width=”14″,alignment=”-1″,col_name=”type”,colhdr=”Type”},{width=”4″,alignment=”-1″,col_name=”disp”,colhdr=”Disp”},{width=”3″,alignment=”-1″,col_name=”enabled”,colhdr=”Enb”},{width=”10″,alignment=”-1″,col_name=”addr”,colhdr=”Address”},{width=”40″,alignment=”2″,col_name=”what”,colhdr=”What”}],body=[bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x08058057″,func=”main(int, char**)”,file=”../Main/main.cpp”,fullname=”/tmp/VisualGDB/Archos/Main/main.cpp”,line=”50″,times=”0″,original-location=”main”}]}
info shared
&”info sharedn”
~”From To Syms Read Shared Object Libraryn”
~”0x00510850 0x00527b3f Yes /lib/ld-linux.so.2n”
^done
-exec-continue
^running
*running,thread-id=”1″
=library-loaded,id=”/lib/libncurses.so.5″,target-name=”/lib/libncurses.so.5″,host-name=”/lib/libncurses.so.5″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/libtinfo.so.5″,target-name=”/lib/libtinfo.so.5″,host-name=”/lib/libtinfo.so.5″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/opt/simplon/lib/liblv.simplon.so”,target-name=”/opt/simplon/lib/liblv.simplon.so”,host-name=”/opt/simplon/lib/liblv.simplon.so”,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/opt/simplon/lib/liblv.imgproc.so”,target-name=”/opt/simplon/lib/liblv.imgproc.so”,host-name=”/opt/simplon/lib/liblv.imgproc.so”,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/usr/lib/libstdc++.so.6″,target-name=”/usr/lib/libstdc++.so.6″,host-name=”/usr/lib/libstdc++.so.6″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/libm.so.6″,target-name=”/lib/libm.so.6″,host-name=”/lib/libm.so.6″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/libgcc_s.so.1″,target-name=”/lib/libgcc_s.so.1″,host-name=”/lib/libgcc_s.so.1″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/libpthread.so.0″,target-name=”/lib/libpthread.so.0″,host-name=”/lib/libpthread.so.0″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/libc.so.6″,target-name=”/lib/libc.so.6″,host-name=”/lib/libc.so.6″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/libdl.so.2″,target-name=”/lib/libdl.so.2″,host-name=”/lib/libdl.so.2″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/opt/simplon/lib/liblv.osdep.so”,target-name=”/opt/simplon/lib/liblv.osdep.so”,host-name=”/opt/simplon/lib/liblv.osdep.so”,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/opt/simplon/lib/liblv.log.so”,target-name=”/opt/simplon/lib/liblv.log.so”,host-name=”/opt/simplon/lib/liblv.log.so”,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/opt/simplon/lib/liblv.ini.so”,target-name=”/opt/simplon/lib/liblv.ini.so”,host-name=”/opt/simplon/lib/liblv.ini.so”,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/lib/librt.so.1″,target-name=”/lib/librt.so.1″,host-name=”/lib/librt.so.1″,symbols-loaded=”0″,thread-group=”i1″
=library-loaded,id=”/opt/simplon/lib/liblv.jpeg.so”,target-name=”/opt/simplon/lib/liblv.jpeg.so”,host-name=”/opt/simplon/lib/liblv.jpeg.so”,symbols-loaded=”0″,thread-group=”i1″
~”[Thread debugging using libthread_db enabled]n”
~”Stopped due to shared library eventn”
*stopped,thread-id=”1″,stopped-threads=”all”,core=”0″
-break-list
^done,BreakpointTable={nr_rows=”1″,nr_cols=”6″,hdr=[{width=”7″,alignment=”-1″,col_name=”number”,colhdr=”Num”},{width=”14″,alignment=”-1″,col_name=”type”,colhdr=”Type”},{width=”4″,alignment=”-1″,col_name=”disp”,colhdr=”Disp”},{width=”3″,alignment=”-1″,col_name=”enabled”,colhdr=”Enb”},{width=”10″,alignment=”-1″,col_name=”addr”,colhdr=”Address”},{width=”40″,alignment=”2″,col_name=”what”,colhdr=”What”}],body=[bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x08058057″,func=”main(int, char**)”,file=”../Main/main.cpp”,fullname=”/tmp/VisualGDB/Archos/Main/main.cpp”,line=”50″,times=”0″,original-location=”main”}]}
info shared
&”info sharedn”
~”From To Syms Read Shared Object Libraryn”
~”0x00510850 0x00527b3f Yes /lib/ld-linux.so.2n”
~”0x04cb3e80 0x04ccd198 Yes /lib/libncurses.so.5n”
~”0x04a9cd00 0x04aa7768 Yes /lib/libtinfo.so.5n”
~”0xb7fd6ea0 0xb7fe1534 Yes /opt/simplon/lib/liblv.simplon.son”
~”0xb7f23b50 0xb7f6e3b4 Yes /opt/simplon/lib/liblv.imgproc.son”
~”0x04403b30 0x044768c8 Yes /usr/lib/libstdc++.so.6n”
~”0x006ef470 0x00709b68 Yes /lib/libm.so.6n”
~”0x00719f90 0x00730818 Yes /lib/libgcc_s.so.1n”
~”0x006c1600 0x006cd4e8 Yes /lib/libpthread.so.0n”
~”0x00547c10 0x006649c4 Yes /lib/libc.so.6n”
~”0x006daa60 0x006dba88 Yes /lib/libdl.so.2n”
~”0xb7f10b20 0xb7f14214 Yes /opt/simplon/lib/liblv.osdep.son”
~”0xb7f00890 0xb7f077b4 Yes /opt/simplon/lib/liblv.log.son”
~”0xb7eea650 0xb7efa594 Yes /opt/simplon/lib/liblv.ini.son”
~”0x006e2880 0x006e6638 Yes /lib/librt.so.1n”
~”0xb7ea6380 0xb7ee4b44 Yes /opt/simplon/lib/liblv.jpeg.son”
^done
-exec-continue
^running
*running,thread-id=”1″
=thread-created,id=”2″,group-id=”i1″
~”[New Thread 0xb7e9fb70 (LWP 1560)]n”
*running,thread-id=”all”
*stopped,reason=”breakpoint-hit”,disp=”keep”,bkptno=”1″,frame={addr=”0x08058057″,func=”main”,args=[{name=”argc”,value=”1″},{name=”argv”,value=”0xbffffc04″}],file=”../Main/main.cpp”,fullname=”/tmp/VisualGDB/Archos/Main/main.cpp”,line=”50″},thread-id=”1″,stopped-threads=”all”,core=”1″
-break-delete 1
^done
-exec-continue
^running
*running,thread-id=”all”
&”Detaching after fork from child process 1561.n”
=thread-created,id=”3″,group-id=”i1″
~”[New Thread 0xb74ffb70 (LWP 1562)]n”
*running,thread-id=”all”
~”[Switching to Thread 0xb74ffb70 (LWP 1562)]n”
*stopped,reason=”signal-received”,signal-name=”SIGSEGV”,signal-meaning=”Segmentation fault”,frame={addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”,args=[]},thread-id=”3″,stopped-threads=”all”,core=”0″
=thread-selected,id=”3″
-stack-list-frames –thread 3
^done,stack=[frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”},frame={level=”1″,addr=”0x08055b19″,func=”_ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE”},frame={level=”2″,addr=”0x0804b225″,func=”Application::WidthMonitor::CApplication_WidthMonitor::RunStateMachine”,file=”../Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,fullname=”/tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,line=”115″},frame={level=”3″,addr=”0x0804a6bd”,func=”_ZN11Application12CApplication10ThreadMainEv”},frame={level=”4″,addr=”0x0804a63f”,func=”_ZN11Application12CApplication17ThreadMain_StaticEPv”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-stack-list-arguments –thread 3 1
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[{name=”this”,value=”0x807c698″}]},frame={level=”3″,args=[]},frame={level=”4″,args=[]},frame={level=”5″,args=[{name=”arg”,value=”0xb74ffb70″}]},frame={level=”6″,args=[]}]
-thread-info
=thread-created,id=”4″,group-id=”i1″
~”[New Thread 0xb6cfeb70 (LWP 1563)]n”
^done,threads=[{id=”4″,target-id=”Thread 0xb6cfeb70 (LWP 1563)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″},{id=”3″,target-id=”Thread 0xb74ffb70 (LWP 1562)”,frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”,args=[]},state=”stopped”,core=”0″},{id=”2″,target-id=”Thread 0xb7e9fb70 (LWP 1560)”,frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”,args=[]},state=”stopped”,core=”1″},{id=”1″,target-id=”Thread 0xb7ea1ac0 (LWP 1557)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″}],current-thread-id=”3″
-data-evaluate-expression “sizeof(void *)”
^done,value=”4″
-data-evaluate-expression “sizeof(int)”
^done,value=”4″
-data-evaluate-expression “sizeof(short)”
^done,value=”2″
-data-evaluate-expression “sizeof(long)”
^done,value=”4″
-data-evaluate-expression “sizeof(long long)”
^done,value=”8″
-data-evaluate-expression “sizeof(char)”
^done,value=”1″
-data-evaluate-expression “sizeof(wchar_t)”
^done,value=”4″
-data-evaluate-expression “sizeof(float)”
^done,value=”4″
-data-evaluate-expression “sizeof(double)”
^done,value=”8″
-data-evaluate-expression “sizeof(long double)”
^done,value=”12″
-thread-info
^done,threads=[{id=”4″,target-id=”Thread 0xb6cfeb70 (LWP 1563)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″},{id=”3″,target-id=”Thread 0xb74ffb70 (LWP 1562)”,frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”,args=[]},state=”stopped”,core=”0″},{id=”2″,target-id=”Thread 0xb7e9fb70 (LWP 1560)”,frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”,args=[]},state=”stopped”,core=”1″},{id=”1″,target-id=”Thread 0xb7ea1ac0 (LWP 1557)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″}],current-thread-id=”3″
-thread-info
^done,threads=[{id=”4″,target-id=”Thread 0xb6cfeb70 (LWP 1563)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″},{id=”3″,target-id=”Thread 0xb74ffb70 (LWP 1562)”,frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”,args=[]},state=”stopped”,core=”0″},{id=”2″,target-id=”Thread 0xb7e9fb70 (LWP 1560)”,frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”,args=[]},state=”stopped”,core=”1″},{id=”1″,target-id=”Thread 0xb7ea1ac0 (LWP 1557)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″}],current-thread-id=”3″
-stack-list-frames –thread 3
^done,stack=[frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”},frame={level=”1″,addr=”0x08055b19″,func=”_ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE”},frame={level=”2″,addr=”0x0804b225″,func=”Application::WidthMonitor::CApplication_WidthMonitor::RunStateMachine”,file=”../Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,fullname=”/tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,line=”115″},frame={level=”3″,addr=”0x0804a6bd”,func=”_ZN11Application12CApplication10ThreadMainEv”},frame={level=”4″,addr=”0x0804a63f”,func=”_ZN11Application12CApplication17ThreadMain_StaticEPv”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-stack-list-arguments –thread 3 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[name=”this”]},frame={level=”3″,args=[]},frame={level=”4″,args=[]},frame={level=”5″,args=[name=”arg”]},frame={level=”6″,args=[]}]
-thread-info
^done,threads=[{id=”4″,target-id=”Thread 0xb6cfeb70 (LWP 1563)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″},{id=”3″,target-id=”Thread 0xb74ffb70 (LWP 1562)”,frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”,args=[]},state=”stopped”,core=”0″},{id=”2″,target-id=”Thread 0xb7e9fb70 (LWP 1560)”,frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”,args=[]},state=”stopped”,core=”1″},{id=”1″,target-id=”Thread 0xb7ea1ac0 (LWP 1557)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″}],current-thread-id=”3″
-stack-list-frames –thread 4
^done,stack=[frame={level=”0″,addr=”0x00608d18″,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},frame={level=”1″,addr=”0x003d0f00″,func=”??”},frame={level=”2″,addr=”0x00000000″,func=”??”}]
-stack-list-arguments –thread 4 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[]}]
-stack-list-frames –thread 4
^done,stack=[frame={level=”0″,addr=”0x00608d18″,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},frame={level=”1″,addr=”0x003d0f00″,func=”??”},frame={level=”2″,addr=”0x00000000″,func=”??”}]
-stack-list-arguments –thread 4 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[]}]
-stack-list-frames –thread 3
^done,stack=[frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”},frame={level=”1″,addr=”0x08055b19″,func=”_ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE”},frame={level=”2″,addr=”0x0804b225″,func=”Application::WidthMonitor::CApplication_WidthMonitor::RunStateMachine”,file=”../Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,fullname=”/tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,line=”115″},frame={level=”3″,addr=”0x0804a6bd”,func=”_ZN11Application12CApplication10ThreadMainEv”},frame={level=”4″,addr=”0x0804a63f”,func=”_ZN11Application12CApplication17ThreadMain_StaticEPv”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-stack-list-arguments –thread 3 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[name=”this”]},frame={level=”3″,args=[]},frame={level=”4″,args=[]},frame={level=”5″,args=[name=”arg”]},frame={level=”6″,args=[]}]
-stack-list-frames –thread 2
^done,stack=[frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”},frame={level=”1″,addr=”0x006c9765″,func=”sem_wait@@GLIBC_2.1″,file=”../nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S”,line=”80″},frame={level=”2″,addr=”0xb7f12bfd”,func=”LvOsWaitForSemaphore”,from=”/opt/simplon/lib/liblv.osdep.so”},frame={level=”3″,addr=”0xb7f06220″,func=”??”,from=”/opt/simplon/lib/liblv.log.so”},frame={level=”4″,addr=”0xb7f0301b”,func=”??”,from=”/opt/simplon/lib/liblv.log.so”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-stack-list-arguments –thread 2 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[]},frame={level=”3″,args=[]},frame={level=”4″,args=[]},frame={level=”5″,args=[name=”arg”]},frame={level=”6″,args=[]}]
-stack-list-frames –thread 2
^done,stack=[frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”},frame={level=”1″,addr=”0x006c9765″,func=”sem_wait@@GLIBC_2.1″,file=”../nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S”,line=”80″},frame={level=”2″,addr=”0xb7f12bfd”,func=”LvOsWaitForSemaphore”,from=”/opt/simplon/lib/liblv.osdep.so”},frame={level=”3″,addr=”0xb7f06220″,func=”??”,from=”/opt/simplon/lib/liblv.log.so”},frame={level=”4″,addr=”0xb7f0301b”,func=”??”,from=”/opt/simplon/lib/liblv.log.so”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-stack-list-arguments –thread 2 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]},frame={level=”2″,args=[]},frame={level=”3″,args=[]},frame={level=”4″,args=[]},frame={level=”5″,args=[name=”arg”]},frame={level=”6″,args=[]}]
-stack-list-frames –thread 1
^done,stack=[frame={level=”0″,addr=”0x00608d18″,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},frame={level=”1″,addr=”0x00000000″,func=”??”}]
-stack-list-arguments –thread 1 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]}]
-stack-list-frames –thread 1
^done,stack=[frame={level=”0″,addr=”0x00608d18″,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},frame={level=”1″,addr=”0x00000000″,func=”??”}]
-stack-list-arguments –thread 1 0
^done,stack-args=[frame={level=”0″,args=[]},frame={level=”1″,args=[]}]
-thread-info
^done,threads=[{id=”4″,target-id=”Thread 0xb6cfeb70 (LWP 1563)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″},{id=”3″,target-id=”Thread 0xb74ffb70 (LWP 1562)”,frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”,args=[]},state=”stopped”,core=”0″},{id=”2″,target-id=”Thread 0xb7e9fb70 (LWP 1560)”,frame={level=”0″,addr=”0xb7fff424″,func=”__kernel_vsyscall”,args=[]},state=”stopped”,core=”1″},{id=”1″,target-id=”Thread 0xb7ea1ac0 (LWP 1557)”,frame={level=”0″,addr=”0x00608d18″,func=”clone”,args=[],file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”111″},state=”stopped”,core=”0″}],current-thread-id=”1″
-stack-list-frames –thread 3
^done,stack=[frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”},frame={level=”1″,addr=”0x08055b19″,func=”_ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE”},frame={level=”2″,addr=”0x0804b225″,func=”Application::WidthMonitor::CApplication_WidthMonitor::RunStateMachine”,file=”../Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,fullname=”/tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,line=”115″},frame={level=”3″,addr=”0x0804a6bd”,func=”_ZN11Application12CApplication10ThreadMainEv”},frame={level=”4″,addr=”0x0804a63f”,func=”_ZN11Application12CApplication17ThreadMain_StaticEPv”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-stack-list-frames –thread 3
^done,stack=[frame={level=”0″,addr=”0x08055cab”,func=”_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE”},frame={level=”1″,addr=”0x08055b19″,func=”_ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE”},frame={level=”2″,addr=”0x0804b225″,func=”Application::WidthMonitor::CApplication_WidthMonitor::RunStateMachine”,file=”../Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,fullname=”/tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp”,line=”115″},frame={level=”3″,addr=”0x0804a6bd”,func=”_ZN11Application12CApplication10ThreadMainEv”},frame={level=”4″,addr=”0x0804a63f”,func=”_ZN11Application12CApplication17ThreadMain_StaticEPv”},frame={level=”5″,addr=”0x006c2e99″,func=”start_thread”,file=”pthread_create.c”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c”,line=”301″},frame={level=”6″,addr=”0x00608d2e”,func=”clone”,file=”../sysdeps/unix/sysv/linux/i386/clone.S”,fullname=”/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S”,line=”133″}]
-var-create –frame 2 –thread 3 – * “!$lineinfo”
^done,name=”var1″,numchild=”0″,value=”true”,type=”bool”,has_more=”0″Anybody an idea?
August 12, 2013 at 19:28 #2515ketParticipantHi,
Looks like gdb cannot find the file for the frame, each of the frames below without the file defined cannot find the source file.
^done,stack=[frame={level="0",addr="0x08055cab",func="_ZN3Lib7ImgProc9CLightBar15DetectEdgesFastEPN6Camera10TImageInfoE"},frame={level="1",addr="0x08055b19",func="_ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE"},frame={level="2",addr="0x0804b225",func="Application::WidthMonitor::CApplication_WidthMonitor::RunStateMachine",file="../Application/WidthMonitor/Src/Application_WidthMonitor.cpp",fullname="/tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp",line="115"},frame={level="3",addr="0x0804a6bd",func="_ZN11Application12CApplication10ThreadMainEv"},frame={level="4",addr="0x0804a63f",func="_ZN11Application12CApplication17ThreadMain_StaticEPv"},frame={level="5",addr="0x006c2e99",func="start_thread",file="pthread_create.c",fullname="/usr/src/debug/glibc-2.13-13-g943515f/nptl/pthread_create.c",line="301"},frame={level="6",addr="0x00608d2e",func="clone",file="../sysdeps/unix/sysv/linux/i386/clone.S",fullname="/usr/src/debug/glibc-2.13-13-g943515f/sysdeps/unix/sysv/linux/i386/clone.S",line="133"}]
Translated through c++filt, the mangled function names are (in order of appearance):
Lib::ImgProc::CLightBar::DetectEdgesFast(Camera::TImageInfo*), Lib::ImgProc::CLightBar::DetectEdges(Camera::TImageInfo*), Application::CApplication::ThreadMain(), Application::CApplication::ThreadMain_Static(void*)
.
Find out where these functions are defined and why those files were compiled without debugging symbols for GDB (GCC flag -ggdb). Then recompile them with debugging symbols to be able to set breakpoints in those files.
August 13, 2013 at 08:56 #2514JordanWParticipantHi Ket,
Thanks for your fast reply. These files already have debug symbols. The following makefile options are set:
Makefile Debug symbols:
Lib::ImgProc::CLightBar::DetectEdgesFast(Camera::TImageInfo*) :
$(BINARYDIR)/LightBar.o : ../Lib/ImgProc/Src/LightBar.cpp $(all_make_files) |$(BINARYDIR)
$(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) Lib::ImgProc::CLightBar::DetectEdges(Camera::TImageInfo*) :
$(BINARYDIR)/LightBar.o : ../Lib/ImgProc/Src/LightBar.cpp $(all_make_files) |$(BINARYDIR)
$(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) Application::CApplication::ThreadMain() :
$(BINARYDIR)/Application.o : ../Application/Src/Application.cpp $(all_make_files) |$(BINARYDIR)
$(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) Application::CApplication::ThreadMain_Static(void*) :
$(BINARYDIR)/Application.o : ../Application/Src/Application.cpp $(all_make_files) |$(BINARYDIR)
$(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) Flags are:
CFLAGS := -ggdb -ffunction-sections
DEBUG_CFLAGS := -O0
RELEASE_CFLAGS := -O3CXXFLAGS := $(CFLAGS) -ffunction-sections
DEBUG_CXXFLAGS := $(DEBUG_CFLAGS)
RELEASE_CXXFLAGS := $(RELEASE_CFLAGS)August 13, 2013 at 23:07 #2516ketParticipantHi,
The flags look to be set correctly. Firstly, are you building and debugging on different machines or using a cross-compiler?
Try the following:
1. Start debugging, pause the debugging or stop at a breakpoint.
2. Enter into the GDB Session window for each of the function names:info line
Copy the responses here.
3. Enter into the GDB Session window:info sources
Are the source files for these functions listed there?
If the functions cannot be found or the source files are not listed, then gdb cannot find debugging symbols for these functions/files. Then run objdump for your project executable on the Linux machine to see if the debugging symbols are there (source code lines for the functions). Use the following command, and then look into the result to see whether these functions have symbols:
objdump -d -S
You can also run the same command on individual o files, the symbols should be present in both the o files and the executable.
August 15, 2013 at 09:33 #2517JordanWParticipantHi ket,
Yes I’m building and debugging remotely on a different Linux machine.
GDBSession can’t find a function line, see the message:
info line int i = mPixel2MM.Initialise(((char *)CPixel2MMap::STR_INI_FILE.c_str()), ((char *)CPixel2MMap::STR_INI_SECTION.c_str()));
&”info line int i = mPixel2MM.Initialise(((char *)CPixel2MMap::STR_INI_FILE.c_str()), ((char *)CPixel2MMap::STR_INI_SECTION.c_str())); n”
&”Function “int i = mPixel2MM.Initialise(((char *)CPixel2MMap::STR_INI_FILE.c_str()), ((char *)CPixel2MMap::STR_INI_SECTION.c_str()));” not defined.n”
Function “int i = mPixel2MM.Initialise(((char *)CPixel2MMap::STR_INI_FILE.c_str()), ((char *)CPixel2MMap::STR_INI_SECTION.c_str()));” not defined.
-var-create: unable to create variable objectinfo sources shows the file of the source function :
&”info sourcesn”
Source files for which symbols have been read in:
/tmp/VisualGDB/Archos/Application/Src/Application.cpp, /tmp/VisualGDB/Archos/ArchosProject/, /tmp/VisualGDB/Archos/Application/Inc/Application.h, /tmp/VisualGDB/Archos/Camera/Inc/Camera.h, /tmp/VisualGDB/Archos/DataStores/Settings/Inc/SettingFile.h, /tmp/VisualGDB/Archos/DataStores/Settings/Inc/SettingGroup.h, /tmp/VisualGDB/Archos/DataStores/LiveValues/Inc/LiveValueGroup.h, /tmp/VisualGDB/Archos/DataStores/Commands/Inc/CommandGroup.h, /usr/include/c++/4.5.1/bits/vector.tcc, /tmp/VisualGDB/Archos/DataStores/LiveValues/Inc/LiveValueType.h, /usr/include/c++/4.5.1/bits/basic_string.tcc, /usr/include/c++/4.5.1/i686-redhat-linux/bits/atomic_word.h, /usr/include/locale.h, /usr/include/c++/4.5.1/bits/char_traits.h, /usr/include/c++/4.5.1/ext/numeric_traits.h, /usr/include/c++/4.5.1/bits/allocator.h, /usr/include/c++/4.5.1/debug/debug.h, /usr/include/c++/4.5.1/ext/new_allocator.h, /usr/include/c++/4.5.1/bits/cpp_type_traits.h, /usr/include/c++/4.5.1/bits/stringfwd.h, /usr/include/c++/4.5.1/bits/stl_vector.h, /usr/include/c++/4.5.1/bits/basic_string.h, /usr/include/c++/4.5.1/clocale, /usr/include/c++/4.5.1/cwchar, /usr/include/c++/4.5.1/cstddef, /tmp/VisualGDB/Archos/Camera/Inc/ImageInfo.h, /usr/lib/gcc/i686-redhat-linux/4.5.1/include/stdarg.h, /usr/include/wchar.h, /usr/include/stdio.h, /usr/include/libio.h, /usr/include/bits/pthreadtypes.h, /usr/include/time.h, /usr/include/bits/types.h, /usr/lib/gcc/i686-redhat-linux/4.5.1/include/stddef.h, /tmp/VisualGDB/Archos/DataStores/Commands/Inc/ICommandObserver.h, /tmp/VisualGDB/Archos/DataStores/Settings/Inc/ISettingGroupObserver.h, /tmp/VisualGDB/Archos/Application/Src/ApplicationFactory.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Inc/histogram.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/filterfactory.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/lowpassfilter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/filter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/cyclebuf.h, /tmp/VisualGDB/Archos/Lib/VmiErr/Inc/vmierr.h, /tmp/VisualGDB/Archos/Application/Inc/ApplicationFactory.h, /tmp/VisualGDB/Archos/Application/WidthMonitor/Inc/Application_WidthMonitor.h, /tmp/VisualGDB/Archos/Application/WidthMonitor/Src/Application_WidthMonitor.cpp, /usr/include/c++/4.5.1/ext/type_traits.h, /usr/include/c++/4.5.1/bits/stl_iterator_base_types.h, /tmp/VisualGDB/Archos/Lib/ImgProc/Inc/pixel2mmap.h, /tmp/VisualGDB/Archos/Lib/ImgProc/Inc/ImgProc.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/Polynomial.h, /usr/include/c++/4.5.1/bits/stl_algobase.h, /usr/include/c++/4.5.1/bits/stl_uninitialized.h, /usr/include/c++/4.5.1/bits/stl_iterator.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/stddev.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/mediaan.h, /usr/include/c++/4.5.1/bits/stl_construct.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/mediaanstd.h, /tmp/VisualGDB/Archos/Main/main.cpp, /tmp/VisualGDB/Archos/Motion/Inc/Motion.h, /tmp/VisualGDB/Archos/UserInterfaces/ConsoleUI/Inc/ConsoleUI.h
Source files for which symbols will be read in on demand:
/usr/include/c++/4.5.1/ext/new_allocator.h, /usr/include/c++/4.5.1/bits/allocator.h, /usr/include/c++/4.5.1/bits/stl_construct.h, /usr/include/c++/4.5.1/bits/stl_vector.h, /tmp/VisualGDB/Archos/UserInterfaces/ConsoleUI/Src/ConsoleUI.cpp, /tmp/VisualGDB/Archos/Motion/Src/MotionFactory.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Inc/ISettingGroupObserver.h, /tmp/VisualGDB/Archos/Motion/Src/Motion.cpp, /tmp/VisualGDB/Archos/Motion/Linmot/Src/Motion_Linmot.cpp, /tmp/VisualGDB/Archos/Lib/VmiErr/Src/vmierr.cpp, /tmp/VisualGDB/Archos/Lib/VmiErr/Src/datetimewrapper.cpp, /tmp/VisualGDB/Archos/Lib/Timer/Src/timer.cpp, /tmp/VisualGDB/Archos/Lib/Ini/Src/minIni.c, /tmp/VisualGDB/Archos/Lib/Ini/Src/libini.c, /usr/include/c++/4.5.1/bits/stl_algobase.h, /usr/include/c++/4.5.1/bits/stl_uninitialized.h, /usr/include/c++/4.5.1/bits/vector.tcc, /usr/include/c++/4.5.1/bits/stl_iterator.h, /tmp/VisualGDB/Archos/Lib/ImgProc/Src/pixel2mmap.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Inc/minmaxfilter.h, /usr/include/c++/4.5.1/bits/basic_string.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/cascadefilter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/averagefilter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/edgefilter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/lowpassfilter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/mediaan.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/cyclebuf.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/filter.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/filterfactory.h, /usr/include/c++/4.5.1/new, /tmp/VisualGDB/Archos/Lib/ImgProc/Src/LightBar.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Inc/weighedavg.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/pixelfilter.h, /tmp/VisualGDB/Archos/Lib/Filters/Src/weighedavg.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/Polynomial.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/pixelfilterfactory.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/pixelfilter.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Inc/mediaan_static.h, /tmp/VisualGDB/Archos/Lib/Filters/Src/mediaan_static.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Inc/mediaan5.h, /tmp/VisualGDB/Archos/Lib/Filters/Src/mediaan5.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/histogram2D.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/histogram.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/ClassPID.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Src/ClassLKK.cpp, /tmp/VisualGDB/Archos/Lib/Comm/Cell/Inc/VmiCellWrapper.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/Setting_UInt.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/Setting_String.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/Setting_Int.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/Setting_Float.cpp, /usr/include/c++/4.5.1/bits/char_traits.h, /tmp/VisualGDB/Archos/DataStores/Settings/Src/SettingGroup.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/SettingFile.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/SettingContainer.cpp, /tmp/VisualGDB/Archos/DataStores/Settings/Src/Setting.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValue_String.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValue_Long.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValue_Int.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValue_Hex.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValue_Char.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValueGroup.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValueContainer.cpp, /tmp/VisualGDB/Archos/DataStores/LiveValues/Src/LiveValue.cpp, /tmp/VisualGDB/Archos/DataStores/Commands/Src/CommandGroup.cpp, /tmp/VisualGDB/Archos/DataStores/Commands/Src/CommandContainer.cpp, /tmp/VisualGDB/Archos/DataStores/Commands/Src/Command.cpp, /tmp/VisualGDB/Archos/Camera/Src/CameraFactory.cpp, /tmp/VisualGDB/Archos/Camera/Src/Camera.cpp, /tmp/VisualGDB/Archos/Camera/NET/Src/Camera_NET.cpp, /tmp/VisualGDB/Archos/Lib/Filters/Inc/stddev.h, /tmp/VisualGDB/Archos/Lib/Filters/Inc/mediaanstd.h, /tmp/VisualGDB/Archos/DataStores/Commands/Inc/ICommandObserver.h
OKIt looks like the Application_Widtmonitor::Initialise() function can find the symbol to mPixel2MM.Initialise(); function:
Disassembly of section .text._ZN11Application12WidthMonitor25CApplication_WidthMonitor10InitializeEv:00000000 <_zn11application12widthmonitor25capplication_widthmonitor10initializeev>:
Implementation of Initialize
@todo implement
*/
#pragma endregion
bool CApplication_WidthMonitor::Initialize(void)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: 83 ec 24 sub $0x24,%esp
// @TODO calibration
int i = mPixel2MM.Initialise(((char *)CPixel2MMap::STR_INI_FILE.c_str()), ((char *)CPixel2MMap::STR_INI_SECTION.c_str()));
7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
e: e8 fc ff ff ff call f <_ZN11Application12WidthMonitor25CApplication_WidthMonitor10InitializeEv+0xf>
13: 89 c3 mov %eax,%ebx
15: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1c: e8 fc ff ff ff call 1d <_ZN11Application12WidthMonitor25CApplication_WidthMonitor10InitializeEv+0x1d>
21: 8b 55 08 mov 0x8(%ebp),%edx
24: 81 c2 38 1c 00 00 add $0x1c38,%edx
2a: 89 5c 24 08 mov %ebx,0x8(%esp)
2e: 89 44 24 04 mov %eax,0x4(%esp)
32: 89 14 24 mov %edx,(%esp)
35: e8 fc ff ff ff call 36 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor10InitializeEv+0x36>
3a: 89 45 f4 mov %eax,-0xc(%ebp)mCycleStep = STEP0_IDLE;
3d: 8b 45 08 mov 0x8(%ebp),%eax
40: c7 80 84 03 00 00 00 movl $0x0,0x384(%eax)
47: 00 00 00
//LightBar = new CLightBar();return false;
4a: b8 00 00 00 00 mov $0x0,%eax
}
4f: 83 c4 24 add $0x24,%esp
52: 5b pop %ebx
53: 5d pop %ebp
54: c3 retI don’t know where to find the problem, but it seems it cannot find the source of some funtions in a file and other function he can find in the same file. 😮
August 15, 2013 at 15:49 #2518supportKeymasterHi,
According to the log you posted, GDB can find the symbols for Application::WidthMonitor::CApplication_WidthMonitor class and cannot find symbols for Lib::ImgProc::CLightBar::DetectEdgesFast(Camera::TImageInfo*).
Please check whether the Lib::ImgProc::CLightBar::DetectEdgesFast(Camera::TImageInfo*) function (can be also mentioned as _ZN3Lib7ImgProc9CLightBar11DetectEdgesEPN6Camera10TImageInfoE) contains the source code in the disassembly file. If no, please run objdump on the .o file corresponding to the cpp file containing the Lib::ImgProc::CLightBar::DetectEdgesFast(Camera::TImageInfo*) function and see whether the source is displayed when dumping the .o file.Please note that when running the “info line” command you should put the function name, not the function calling statement, e.g.:
info line Lib::ImgProc::CLightBar::DetectEdgesFast
The “info line” command will display the source line number that corresponds to a given function and can be used to determine whether the source line information is available for the given module.
August 16, 2013 at 14:20 #2519JordanWParticipantHi,
I have changed the location of DetectEdgesFast to the Application_WidthMonitor class. I can debug function like ProcessImage(), but i can’t debug DetectEdgesFast() of same class Application_WidthMonitor.
When I call info line, the gdb session can’t find the function:
info line DetectEdgesFast
&”info line DetectEdgesFastn”
&”Function “DetectEdgesFast” not defined.n”
Function “DetectEdgesFast” not defined.When I search in the objdump of application_withmonitor.o I found the following that looks like he can find the symbol:
Disassembly of section .text._ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE:00000000 <_zn11application12widthmonitor25capplication_widthmonitor12processimageepn6camera10timageinfoe>:
Implementation of ProcessImage
@todo implement
*/
#pragma endregion
void CApplication_WidthMonitor::ProcessImage(TImageInfo* apImageInfo)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: 83 ec 44 sub $0x44,%esp
DetectEdgesFast(apImageInfo);
7: 8b 45 0c mov 0xc(%ebp),%eax
a: 89 44 24 04 mov %eax,0x4(%esp)
e: 8b 45 08 mov 0x8(%ebp),%eax
11: 89 04 24 mov %eax,(%esp)
14: e8 fc ff ff ff call 15 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x15>lftEdgePos = (edgeCount > 1 && edges[0].type == EDGE_TYPE_POS) ? mPixel2MM.Pixel2MM(edges[0].posPX, edges[0].type) : -99999;
19: 8b 45 08 mov 0x8(%ebp),%eax
1c: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
22: 83 f8 01 cmp $0x1,%eax
25: 76 74 jbe 9b <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x9b>
27: 8b 45 08 mov 0x8(%ebp),%eax
2a: 05 a4 03 00 00 add $0x3a4,%eax
2f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
36: 00
37: 89 04 24 mov %eax,(%esp)
3a: e8 fc ff ff ff call 3b <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x3b>
3f: 8b 00 mov (%eax),%eax
41: 85 c0 test %eax,%eax
43: 75 56 jne 9b <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x9b>
45: 8b 45 08 mov 0x8(%ebp),%eax
48: 05 a4 03 00 00 add $0x3a4,%eax
4d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
54: 00
55: 89 04 24 mov %eax,(%esp)
58: e8 fc ff ff ff call 59 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x59>
5d: 8b 18 mov (%eax),%ebx
5f: 8b 45 08 mov 0x8(%ebp),%eax
62: 05 a4 03 00 00 add $0x3a4,%eax
67: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
6e: 00
6f: 89 04 24 mov %eax,(%esp)
72: e8 fc ff ff ff call 73 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x73>
77: 8b 40 04 mov 0x4(%eax),%eax
7a: 8b 55 08 mov 0x8(%ebp),%edx
7d: 81 c2 40 1c 00 00 add $0x1c40,%edx
83: 89 5c 24 08 mov %ebx,0x8(%esp)
87: 89 44 24 04 mov %eax,0x4(%esp)
8b: 89 14 24 mov %edx,(%esp)
8e: e8 fc ff ff ff call 8f <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x8f>
93: d9 5d d4 fstps -0x2c(%ebp)
96: 8b 45 d4 mov -0x2c(%ebp),%eax
99: eb 05 jmp a0 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0xa0>
9b: b8 80 4f c3 c7 mov $0xc7c34f80,%eax
a0: 8b 55 08 mov 0x8(%ebp),%edx
a3: 89 82 7c 07 00 00 mov %eax,0x77c(%edx)
rhtEdgePos = (edgeCount > 1 && edgeCount < edges.size() && edges[edgeCount-1].type == EDGE_TYPE_NEG) ? mPixel2MM.Pixel2MM(edges[edgeCount-1].posPX, edges[edgeCount-1].type) : -99999;
a9: 8b 45 08 mov 0x8(%ebp),%eax
ac: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
b2: 83 f8 01 cmp $0x1,%eax
b5: 0f 86 ae 00 00 00 jbe 169 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x169>
bb: 8b 45 08 mov 0x8(%ebp),%eax
be: 8b 98 b0 03 00 00 mov 0x3b0(%eax),%ebx
c4: 8b 45 08 mov 0x8(%ebp),%eax
c7: 05 a4 03 00 00 add $0x3a4,%eax
cc: 89 04 24 mov %eax,(%esp)
cf: e8 fc ff ff ff call d0 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0xd0>
d4: 39 c3 cmp %eax,%ebx
d6: 0f 83 8d 00 00 00 jae 169 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x169>
dc: 8b 45 08 mov 0x8(%ebp),%eax
df: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
e5: 8d 50 ff lea -0x1(%eax),%edx
e8: 8b 45 08 mov 0x8(%ebp),%eax
eb: 05 a4 03 00 00 add $0x3a4,%eax
f0: 89 54 24 04 mov %edx,0x4(%esp)
f4: 89 04 24 mov %eax,(%esp)
f7: e8 fc ff ff ff call f8 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0xf8>
fc: 8b 00 mov (%eax),%eax
fe: 83 f8 01 cmp $0x1,%eax
101: 75 66 jne 169 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x169>
103: 8b 45 08 mov 0x8(%ebp),%eax
106: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
10c: 8d 50 ff lea -0x1(%eax),%edx
10f: 8b 45 08 mov 0x8(%ebp),%eax
112: 05 a4 03 00 00 add $0x3a4,%eax
117: 89 54 24 04 mov %edx,0x4(%esp)
11b: 89 04 24 mov %eax,(%esp)
11e: e8 fc ff ff ff call 11f <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x11f>
123: 8b 18 mov (%eax),%ebx
125: 8b 45 08 mov 0x8(%ebp),%eax
128: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
12e: 8d 50 ff lea -0x1(%eax),%edx
131: 8b 45 08 mov 0x8(%ebp),%eax
134: 05 a4 03 00 00 add $0x3a4,%eax
139: 89 54 24 04 mov %edx,0x4(%esp)
13d: 89 04 24 mov %eax,(%esp)
140: e8 fc ff ff ff call 141 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x141>
145: 8b 40 04 mov 0x4(%eax),%eax
148: 8b 55 08 mov 0x8(%ebp),%edx
14b: 81 c2 40 1c 00 00 add $0x1c40,%edx
151: 89 5c 24 08 mov %ebx,0x8(%esp)
155: 89 44 24 04 mov %eax,0x4(%esp)
159: 89 14 24 mov %edx,(%esp)
15c: e8 fc ff ff ff call 15d <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x15d>
161: d9 5d d4 fstps -0x2c(%ebp)
164: 8b 45 d4 mov -0x2c(%ebp),%eax
167: eb 05 jmp 16e <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x16e>
169: b8 80 4f c3 c7 mov $0xc7c34f80,%eax
16e: 8b 55 08 mov 0x8(%ebp),%edx
171: 89 82 80 07 00 00 mov %eax,0x780(%edx)
lftEdgeFound = (edgeCount == 2 && edges[0].type == EDGE_TYPE_POS) ? true : false;
177: 8b 45 08 mov 0x8(%ebp),%eax
17a: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
180: 83 f8 02 cmp $0x2,%eax
183: 75 25 jne 1aa <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1aa>
185: 8b 45 08 mov 0x8(%ebp),%eax
188: 05 a4 03 00 00 add $0x3a4,%eax
18d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
194: 00
195: 89 04 24 mov %eax,(%esp)
198: e8 fc ff ff ff call 199 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x199>
19d: 8b 00 mov (%eax),%eax
19f: 85 c0 test %eax,%eax
1a1: 75 07 jne 1aa <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1aa>
1a3: b8 01 00 00 00 mov $0x1,%eax
1a8: eb 05 jmp 1af <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1af>
1aa: b8 00 00 00 00 mov $0x0,%eax
1af: 8b 55 08 mov 0x8(%ebp),%edx
1b2: 88 82 a4 07 00 00 mov %al,0x7a4(%edx)
rhtEdgeFound = (edgeCount == 2 && edges[1].type == EDGE_TYPE_NEG) ? true : false;
1b8: 8b 45 08 mov 0x8(%ebp),%eax
1bb: 8b 80 b0 03 00 00 mov 0x3b0(%eax),%eax
1c1: 83 f8 02 cmp $0x2,%eax
1c4: 75 26 jne 1ec <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1ec>
1c6: 8b 45 08 mov 0x8(%ebp),%eax
1c9: 05 a4 03 00 00 add $0x3a4,%eax
1ce: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
1d5: 00
1d6: 89 04 24 mov %eax,(%esp)
1d9: e8 fc ff ff ff call 1da <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1da>
1de: 8b 00 mov (%eax),%eax
1e0: 83 f8 01 cmp $0x1,%eax
1e3: 75 07 jne 1ec <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1ec>
1e5: b8 01 00 00 00 mov $0x1,%eax
1ea: eb 05 jmp 1f1 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x1f1>
1ec: b8 00 00 00 00 mov $0x0,%eax
1f1: 8b 55 08 mov 0x8(%ebp),%edx
1f4: 88 82 a5 07 00 00 mov %al,0x7a5(%edx)
center_position = (lftEdgeFound && rhtEdgeFound) ? (int)((lftEdgePos + rhtEdgePos) / 2) : -22222;
1fa: 8b 45 08 mov 0x8(%ebp),%eax
1fd: 0f b6 80 a4 07 00 00 movzbl 0x7a4(%eax),%eax
204: 84 c0 test %al,%al
206: 74 45 je 24d <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x24d>
208: 8b 45 08 mov 0x8(%ebp),%eax
20b: 0f b6 80 a5 07 00 00 movzbl 0x7a5(%eax),%eax
212: 84 c0 test %al,%al
214: 74 37 je 24d <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x24d>
216: 8b 45 08 mov 0x8(%ebp),%eax
219: d9 80 7c 07 00 00 flds 0x77c(%eax)
21f: 8b 45 08 mov 0x8(%ebp),%eax
222: d9 80 80 07 00 00 flds 0x780(%eax)
228: de c1 faddp %st,%st(1)
22a: d9 05 c8 01 00 00 flds 0x1c8
230: de f9 fdivrp %st,%st(1)
232: d9 7d e6 fnstcw -0x1a(%ebp)
235: 0f b7 45 e6 movzwl -0x1a(%ebp),%eax
239: b4 0c mov $0xc,%ah
23b: 66 89 45 e4 mov %ax,-0x1c(%ebp)
23f: d9 6d e4 fldcw -0x1c(%ebp)
242: db 5d e0 fistpl -0x20(%ebp)
245: d9 6d e6 fldcw -0x1a(%ebp)
248: 8b 45 e0 mov -0x20(%ebp),%eax
24b: eb 05 jmp 252 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x252>
24d: b8 32 a9 ff ff mov $0xffffa932,%eax
252: 8b 55 08 mov 0x8(%ebp),%edx
255: 89 82 fc 1d 00 00 mov %eax,0x1dfc(%edx)if (center_position == -22222)
25b: 8b 45 08 mov 0x8(%ebp),%eax
25e: 8b 80 fc 1d 00 00 mov 0x1dfc(%eax),%eax
264: 3d 32 a9 ff ff cmp $0xffffa932,%eax
269: 75 67 jne 2d2 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x2d2>
{
FILE* myfp = fopen(“virt_line.csv”,”w”);
26b: c7 44 24 04 3c 00 00 movl $0x3c,0x4(%esp)
272: 00
273: c7 04 24 3e 00 00 00 movl $0x3e,(%esp)
27a: e8 fc ff ff ff call 27b <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x27b>
27f: 89 45 f0 mov %eax,-0x10(%ebp)// printf(“vritual_line”);
for(int i =0; i < apImageInfo->Width; i++)
282: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
289: eb 2c jmp 2b7 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x2b7>
{
fprintf(myfp, “%dn”,mVirtualLine);
28b: 8b 45 08 mov 0x8(%ebp),%eax
28e: 03 45 f4 add -0xc(%ebp),%eax
291: 05 e0 07 00 00 add $0x7e0,%eax
296: 0f b6 00 movzbl (%eax),%eax
299: 0f b6 c0 movzbl %al,%eax
29c: 89 44 24 08 mov %eax,0x8(%esp)
2a0: c7 44 24 04 4c 00 00 movl $0x4c,0x4(%esp)
2a7: 00
2a8: 8b 45 f0 mov -0x10(%ebp),%eax
2ab: 89 04 24 mov %eax,(%esp)
2ae: e8 fc ff ff ff call 2af <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x2af>
if (center_position == -22222)
{
FILE* myfp = fopen(“virt_line.csv”,”w”);// printf(“vritual_line”);
for(int i =0; i < apImageInfo->Width; i++)
2b3: 83 45 f4 01 addl $0x1,-0xc(%ebp)
2b7: 8b 45 0c mov 0xc(%ebp),%eax
2ba: 8b 40 10 mov 0x10(%eax),%eax
2bd: 3b 45 f4 cmp -0xc(%ebp),%eax
2c0: 0f 9f c0 setg %al
2c3: 84 c0 test %al,%al
2c5: 75 c4 jne 28b <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x28b>
{
fprintf(myfp, “%dn”,mVirtualLine);
}
fclose(myfp);
2c7: 8b 45 f0 mov -0x10(%ebp),%eax
2ca: 89 04 24 mov %eax,(%esp)
2cd: e8 fc ff ff ff call 2ce <_ZN11Application12WidthMonitor25CApplication_WidthMonitor12ProcessImageEPN6Camera10TImageInfoE+0x2ce>
case STEP7_CHECKCALIB:
//mpCalibration->ProcessImage(imagePtr);
break;
}
*/
}
2d2: 83 c4 44 add $0x44,%esp
2d5: 5b pop %ebx
2d6: 5d pop %ebp
2d7: c3 retAugust 16, 2013 at 17:20 #2520ketParticipantHi,
When using info line, please use the full name including the namespace and class, otherwise the function cannot be found. If you changed the location to the CApplication_WidthMonitor class, then you probably need to use the following command:
info line Application::WidthMonitor::CApplication_WidthMonitor::DetectEdgesFast
The objdump you have included shows that there are symbols for the CApplication_WidthMonitor::ProcessImage(TImageInfo* apImageInfo) function, but it does not show the symbols for the DetectEdgesFast function. Having a call to DetectEdgesFast inside another function does not mean that there are symbols for DetectEdgesFast. Please find where the DetectEdgesFast function is defined inside the objdump of the o file.
August 19, 2013 at 06:36 #2521JordanWParticipantHi Ket,
Sorry for posting the wrong info. For now the info line works and result in the following:
info line Application::WidthMonitor::CApplication_WidthMonitor::DetectEdgesFast
&”info line Application::WidthMonitor::CApplication_WidthMonitor::DetectEdgesFastn”
No line number information available for address 0x804c190 <_zn11application12widthmonitor25capplication_widthmonitor15detectedgesfastepn6camera10timageinfoe>
OKHere is the DetectEdgesFast function in Application_WidthMonitor.o:
Disassembly of section .text._ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE:
00000000 <_zn11application12widthmonitor25capplication_widthmonitor15detectedgesfastepn6camera10timageinfoe>:
void CApplication_WidthMonitor::DetectEdgesFast(TImageInfo* image)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: 81 ec 84 00 00 00 sub $0x84,%esp
// @ TODO implement Intensityfilter
if (mpIntensityFilter) { mpIntensityFilter->Initialise(); }
a: 8b 45 08 mov 0x8(%ebp),%eax
d: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
13: 85 c0 test %eax,%eax
15: 74 1e je 35 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x35>
17: 8b 45 08 mov 0x8(%ebp),%eax
1a: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
20: 8b 00 mov (%eax),%eax
22: 83 c0 08 add $0x8,%eax
25: 8b 10 mov (%eax),%edx
27: 8b 45 08 mov 0x8(%ebp),%eax
2a: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
30: 89 04 24 mov %eax,(%esp)
33: ff d2 call *%edx
TImagePtr columPtr;
int inc;if (mLeftsideRight)
35: 8b 45 08 mov 0x8(%ebp),%eax
38: 0f b6 80 3c 1c 00 00 movzbl 0x1c3c(%eax),%eax
3f: 84 c0 test %al,%al
41: 74 40 je 83 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x83>
{
columPtr = image->Image + ROIOffsetX + image->Width – 1 + ROIOffsetY * image->Pitch;
43: 8b 45 0c mov 0xc(%ebp),%eax
46: 8b 10 mov (%eax),%edx
48: 8b 45 08 mov 0x8(%ebp),%eax
4b: 8b 80 c4 07 00 00 mov 0x7c4(%eax),%eax
51: 89 c1 mov %eax,%ecx
53: 8b 45 0c mov 0xc(%ebp),%eax
56: 8b 40 10 mov 0x10(%eax),%eax
59: 8d 1c 01 lea (%ecx,%eax,1),%ebx
5c: 8b 45 08 mov 0x8(%ebp),%eax
5f: 8b 88 c0 07 00 00 mov 0x7c0(%eax),%ecx
65: 8b 45 0c mov 0xc(%ebp),%eax
68: 8b 40 18 mov 0x18(%eax),%eax
6b: 0f af c1 imul %ecx,%eax
6e: 8d 04 03 lea (%ebx,%eax,1),%eax
71: 83 e8 01 sub $0x1,%eax
74: 8d 04 02 lea (%edx,%eax,1),%eax
77: 89 45 f4 mov %eax,-0xc(%ebp)
inc = -1;
7a: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
81: eb 32 jmp b5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xb5>
}
else
{
columPtr = image->Image + ROIOffsetX + ROIOffsetY * image->Pitch;
83: 8b 45 0c mov 0xc(%ebp),%eax
86: 8b 10 mov (%eax),%edx
88: 8b 45 08 mov 0x8(%ebp),%eax
8b: 8b 80 c4 07 00 00 mov 0x7c4(%eax),%eax
91: 89 c1 mov %eax,%ecx
93: 8b 45 08 mov 0x8(%ebp),%eax
96: 8b 98 c0 07 00 00 mov 0x7c0(%eax),%ebx
9c: 8b 45 0c mov 0xc(%ebp),%eax
9f: 8b 40 18 mov 0x18(%eax),%eax
a2: 0f af c3 imul %ebx,%eax
a5: 8d 04 01 lea (%ecx,%eax,1),%eax
a8: 8d 04 02 lea (%edx,%eax,1),%eax
ab: 89 45 f4 mov %eax,-0xc(%ebp)
inc = 1;
ae: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
}unsigned int delay=mpIntensityFilter==NULL ? 0 : (unsigned int)mpIntensityFilter->Delay();
b5: 8b 45 08 mov 0x8(%ebp),%eax
b8: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
be: 85 c0 test %eax,%eax
c0: 74 2f je f1 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xf1>
c2: 8b 45 08 mov 0x8(%ebp),%eax
c5: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
cb: 89 04 24 mov %eax,(%esp)
ce: e8 fc ff ff ff call cf <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xcf>
d3: d9 7d b6 fnstcw -0x4a(%ebp)
d6: 0f b7 45 b6 movzwl -0x4a(%ebp),%eax
da: b4 0c mov $0xc,%ah
dc: 66 89 45 b4 mov %ax,-0x4c(%ebp)
e0: d9 6d b4 fldcw -0x4c(%ebp)
e3: df 7d a8 fistpll -0x58(%ebp)
e6: d9 6d b6 fldcw -0x4a(%ebp)
e9: 8b 45 a8 mov -0x58(%ebp),%eax
ec: 8b 55 ac mov -0x54(%ebp),%edx
ef: eb 05 jmp f6 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xf6>
f1: b8 00 00 00 00 mov $0x0,%eax
f6: 89 45 c4 mov %eax,-0x3c(%ebp)
unsigned char minIntensity = 255;
f9: c6 45 ef ff movb $0xff,-0x11(%ebp)
unsigned char maxIntensity = 0;
fd: c6 45 ee 00 movb $0x0,-0x12(%ebp)// @TODO Implement treshold value from ini setting
//unsigned char threshold = (unsigned char) (float)(pScanSettings->mLimHigh + pScanSettings->mLimLow)/2;
unsigned char threshold = 50;
101: c6 45 c3 32 movb $0x32,-0x3d(%ebp)
TEdgeDetectionState prvState = EDGE_DETECTION_STABLE;
105: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
unsigned char prvFilteredIntensity = 0;
10c: c6 45 e7 00 movb $0x0,-0x19(%ebp)bool pendingPosEdge = false;
110: c6 45 e6 00 movb $0x0,-0x1a(%ebp)
bool pendingNegEdge = false;
114: c6 45 e5 00 movb $0x0,-0x1b(%ebp)
unsigned char edge_maximum = 0;
118: c6 45 e4 00 movb $0x0,-0x1c(%ebp)
unsigned char edge_minimum = 0;
11c: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
unsigned char local_max = 0;
120: c6 45 e2 00 movb $0x0,-0x1e(%ebp)
unsigned char local_min = 0;
124: c6 45 e1 00 movb $0x0,-0x1f(%ebp)for (unsigned int i=0; i
Width; i++)
128: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
12f: e9 0c 03 00 00 jmp 440 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x440>
{
int sum = 0;
134: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
TImagePtr pixel = columPtr;
13b: 8b 45 f4 mov -0xc(%ebp),%eax
13e: 89 45 d4 mov %eax,-0x2c(%ebp)if (imageHeight==1)
141: 8b 45 08 mov 0x8(%ebp),%eax
144: 8b 80 b0 07 00 00 mov 0x7b0(%eax),%eax
14a: 83 f8 01 cmp $0x1,%eax
14d: 75 16 jne 165 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x165>
{
mVirtualLine = *pixel;
14f: 8b 45 d4 mov -0x2c(%ebp),%eax
152: 0f b6 00 movzbl (%eax),%eax
155: 8b 55 08 mov 0x8(%ebp),%edx
158: 03 55 dc add -0x24(%ebp),%edx
15b: 81 c2 e0 07 00 00 add $0x7e0,%edx
161: 88 02 mov %al,(%edx)
163: eb 5a jmp 1bf <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x1bf>
}
else
{
for (unsigned int j=0; j165: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
16c: eb 19 jmp 187 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x187>
{
sum+=*pixel;
16e: 8b 45 d4 mov -0x2c(%ebp),%eax
171: 0f b6 00 movzbl (%eax),%eax
174: 0f b6 c0 movzbl %al,%eax
177: 01 45 d8 add %eax,-0x28(%ebp)
pixel+=image->Pitch;
17a: 8b 45 0c mov 0xc(%ebp),%eax
17d: 8b 40 18 mov 0x18(%eax),%eax
180: 01 45 d4 add %eax,-0x2c(%ebp)
{
mVirtualLine = *pixel;
}
else
{
for (unsigned int j=0; j183: 83 45 d0 01 addl $0x1,-0x30(%ebp)
187: 8b 45 08 mov 0x8(%ebp),%eax
18a: 8b 80 b0 07 00 00 mov 0x7b0(%eax),%eax
190: 3b 45 d0 cmp -0x30(%ebp),%eax
193: 0f 97 c0 seta %al
196: 84 c0 test %al,%al
198: 75 d4 jne 16e <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x16e>
{
sum+=*pixel;
pixel+=image->Pitch;
}
mVirtualLine = sum / imageHeight;
19a: 8b 45 08 mov 0x8(%ebp),%eax
19d: 8b 80 b0 07 00 00 mov 0x7b0(%eax),%eax
1a3: 89 45 a4 mov %eax,-0x5c(%ebp)
1a6: 8b 45 d8 mov -0x28(%ebp),%eax
1a9: 89 c2 mov %eax,%edx
1ab: c1 fa 1f sar $0x1f,%edx
1ae: f7 7d a4 idivl -0x5c(%ebp)
1b1: 8b 55 08 mov 0x8(%ebp),%edx
1b4: 03 55 dc add -0x24(%ebp),%edx
1b7: 81 c2 e0 07 00 00 add $0x7e0,%edx
1bd: 88 02 mov %al,(%edx)
}
}
*/unsigned char filteredIntensity;
if (mpIntensityFilter)
1bf: 8b 45 08 mov 0x8(%ebp),%eax
1c2: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
1c8: 85 c0 test %eax,%eax
1ca: 74 49 je 215 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x215>
{
mpIntensityFilter->Update(mVirtualLine);
1cc: 8b 45 08 mov 0x8(%ebp),%eax
1cf: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
1d5: 8b 00 mov (%eax),%eax
1d7: 83 c0 18 add $0x18,%eax
1da: 8b 08 mov (%eax),%ecx
1dc: 8b 45 08 mov 0x8(%ebp),%eax
1df: 03 45 dc add -0x24(%ebp),%eax
1e2: 05 e0 07 00 00 add $0x7e0,%eax
1e7: 0f b6 00 movzbl (%eax),%eax
1ea: 0f b6 d0 movzbl %al,%edx
1ed: 8b 45 08 mov 0x8(%ebp),%eax
1f0: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
1f6: 89 54 24 04 mov %edx,0x4(%esp)
1fa: 89 04 24 mov %eax,(%esp)
1fd: ff d1 call *%ecx
filteredIntensity = mpIntensityFilter->Get();
1ff: 8b 45 08 mov 0x8(%ebp),%eax
202: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
208: 89 04 24 mov %eax,(%esp)
20b: e8 fc ff ff ff call 20c <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x20c>
210: 88 45 cf mov %al,-0x31(%ebp)
213: eb 11 jmp 226 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x226>
}
else
{
filteredIntensity = mVirtualLine;
215: 8b 45 08 mov 0x8(%ebp),%eax
218: 03 45 dc add -0x24(%ebp),%eax
21b: 05 e0 07 00 00 add $0x7e0,%eax
220: 0f b6 00 movzbl (%eax),%eax
223: 88 45 cf mov %al,-0x31(%ebp)
}
mFilteredLine = filteredIntensity;
226: 8b 45 08 mov 0x8(%ebp),%eax
229: 8d 90 20 1c 00 00 lea 0x1c20(%eax),%edx
22f: 8b 45 dc mov -0x24(%ebp),%eax
232: 89 44 24 04 mov %eax,0x4(%esp)
236: 89 14 24 mov %edx,(%esp)
239: e8 fc ff ff ff call 23a <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x23a>
23e: 0f b6 55 cf movzbl -0x31(%ebp),%edx
242: 88 10 mov %dl,(%eax)if (i==0) { prvFilteredIntensity = filteredIntensity; }
244: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
248: 75 07 jne 251 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x251>
24a: 0f b6 45 cf movzbl -0x31(%ebp),%eax
24e: 88 45 e7 mov %al,-0x19(%ebp)if (filteredIntensity < minIntensity) { minIntensity = (unsigned char)filteredIntensity; }
251: 0f b6 45 cf movzbl -0x31(%ebp),%eax
255: 3a 45 ef cmp -0x11(%ebp),%al
258: 73 07 jae 261 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x261>
25a: 0f b6 45 cf movzbl -0x31(%ebp),%eax
25e: 88 45 ef mov %al,-0x11(%ebp)
if (filteredIntensity > maxIntensity) { maxIntensity = (unsigned char)filteredIntensity; }
261: 0f b6 45 cf movzbl -0x31(%ebp),%eax
265: 3a 45 ee cmp -0x12(%ebp),%al
268: 76 07 jbe 271 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x271>
26a: 0f b6 45 cf movzbl -0x31(%ebp),%eax
26e: 88 45 ee mov %al,-0x12(%ebp)TEdgeDetectionState state = EDGE_DETECTION_STABLE;
271: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)//rising
if (filteredIntensity-prvFilteredIntensity > 0)
278: 0f b6 55 cf movzbl -0x31(%ebp),%edx
27c: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
280: 89 d1 mov %edx,%ecx
282: 29 c1 sub %eax,%ecx
284: 89 c8 mov %ecx,%eax
286: 85 c0 test %eax,%eax
288: 7e 5b jle 2e5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e5>
{
state = EDGE_DETECTION_RISING;
28a: c7 45 c8 01 00 00 00 movl $0x1,-0x38(%ebp)
local_max = filteredIntensity;
291: 0f b6 45 cf movzbl -0x31(%ebp),%eax
295: 88 45 e2 mov %al,-0x1e(%ebp)
if (prvState != EDGE_DETECTION_RISING)
298: 83 7d e8 01 cmpl $0x1,-0x18(%ebp)
29c: 74 47 je 2e5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e5>
{
if (prvState == EDGE_DETECTION_FALLING) { local_min = prvFilteredIntensity; }
29e: 83 7d e8 02 cmpl $0x2,-0x18(%ebp)
2a2: 75 07 jne 2ab <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2ab>
2a4: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
2a8: 88 45 e1 mov %al,-0x1f(%ebp)if (pendingPosEdge)
2ab: 80 7d e6 00 cmpb $0x0,-0x1a(%ebp)
2af: 74 34 je 2e5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e5>
{
//add pos edge
pendingPosEdge = false;
2b1: c6 45 e6 00 movb $0x0,-0x1a(%ebp)
edge_minimum = local_min;
2b5: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax
2b9: 88 45 e3 mov %al,-0x1d(%ebp)
AddPosEdge(i, edge_minimum, edge_maximum, delay);
2bc: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
2c0: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
2c4: 8b 4d c4 mov -0x3c(%ebp),%ecx
2c7: 89 4c 24 10 mov %ecx,0x10(%esp)
2cb: 89 54 24 0c mov %edx,0xc(%esp)
2cf: 89 44 24 08 mov %eax,0x8(%esp)
2d3: 8b 45 dc mov -0x24(%ebp),%eax
2d6: 89 44 24 04 mov %eax,0x4(%esp)
2da: 8b 45 08 mov 0x8(%ebp),%eax
2dd: 89 04 24 mov %eax,(%esp)
2e0: e8 fc ff ff ff call 2e1 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e1>
}
}
}//falling
if (filteredIntensity-prvFilteredIntensity < 0)
2e5: 0f b6 55 cf movzbl -0x31(%ebp),%edx
2e9: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
2ed: 89 d1 mov %edx,%ecx
2ef: 29 c1 sub %eax,%ecx
2f1: 89 c8 mov %ecx,%eax
2f3: 85 c0 test %eax,%eax
2f5: 79 5b jns 352 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x352>
{
state = EDGE_DETECTION_FALLING;
2f7: c7 45 c8 02 00 00 00 movl $0x2,-0x38(%ebp)
local_min = filteredIntensity;
2fe: 0f b6 45 cf movzbl -0x31(%ebp),%eax
302: 88 45 e1 mov %al,-0x1f(%ebp)
if (prvState != EDGE_DETECTION_FALLING)
305: 83 7d e8 02 cmpl $0x2,-0x18(%ebp)
309: 74 47 je 352 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x352>
{
if (prvState == EDGE_DETECTION_RISING) { local_max = prvFilteredIntensity; }
30b: 83 7d e8 01 cmpl $0x1,-0x18(%ebp)
30f: 75 07 jne 318 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x318>
311: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
315: 88 45 e2 mov %al,-0x1e(%ebp)if (pendingNegEdge)
318: 80 7d e5 00 cmpb $0x0,-0x1b(%ebp)
31c: 74 34 je 352 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x352>
{
//add neg edge
pendingNegEdge = false;
31e: c6 45 e5 00 movb $0x0,-0x1b(%ebp)
edge_maximum = local_max;
322: 0f b6 45 e2 movzbl -0x1e(%ebp),%eax
326: 88 45 e4 mov %al,-0x1c(%ebp)
AddNegEdge(i, edge_minimum, edge_maximum, delay);
329: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
32d: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
331: 8b 4d c4 mov -0x3c(%ebp),%ecx
334: 89 4c 24 10 mov %ecx,0x10(%esp)
338: 89 54 24 0c mov %edx,0xc(%esp)
33c: 89 44 24 08 mov %eax,0x8(%esp)
340: 8b 45 dc mov -0x24(%ebp),%eax
343: 89 44 24 04 mov %eax,0x4(%esp)
347: 8b 45 08 mov 0x8(%ebp),%eax
34a: 89 04 24 mov %eax,(%esp)
34d: e8 fc ff ff ff call 34e <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x34e>
}
}
}//nor falling, nor rising
if (filteredIntensity-prvFilteredIntensity == 0)
352: 0f b6 45 cf movzbl -0x31(%ebp),%eax
356: 3a 45 e7 cmp -0x19(%ebp),%al
359: 0f 85 8e 00 00 00 jne 3ed <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3ed>
{
//check for pending edges//negative edge:
if (prvState != EDGE_DETECTION_FALLING) { local_max = prvFilteredIntensity; }
35f: 83 7d e8 02 cmpl $0x2,-0x18(%ebp)
363: 74 07 je 36c <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x36c>
365: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
369: 88 45 e2 mov %al,-0x1e(%ebp)if (pendingNegEdge)
36c: 80 7d e5 00 cmpb $0x0,-0x1b(%ebp)
370: 74 34 je 3a6 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3a6>
{
//add neg edge
pendingNegEdge = false;
372: c6 45 e5 00 movb $0x0,-0x1b(%ebp)
edge_maximum = local_max;
376: 0f b6 45 e2 movzbl -0x1e(%ebp),%eax
37a: 88 45 e4 mov %al,-0x1c(%ebp)
AddNegEdge(i, edge_minimum, edge_maximum, delay);
37d: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
381: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
385: 8b 4d c4 mov -0x3c(%ebp),%ecx
388: 89 4c 24 10 mov %ecx,0x10(%esp)
38c: 89 54 24 0c mov %edx,0xc(%esp)
390: 89 44 24 08 mov %eax,0x8(%esp)
394: 8b 45 dc mov -0x24(%ebp),%eax
397: 89 44 24 04 mov %eax,0x4(%esp)
39b: 8b 45 08 mov 0x8(%ebp),%eax
39e: 89 04 24 mov %eax,(%esp)
3a1: e8 fc ff ff ff call 3a2 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3a2>
}//positive edge
if (prvState != EDGE_DETECTION_RISING) { local_min = prvFilteredIntensity; }
3a6: 83 7d e8 01 cmpl $0x1,-0x18(%ebp)
3aa: 74 07 je 3b3 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3b3>
3ac: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
3b0: 88 45 e1 mov %al,-0x1f(%ebp)if (pendingPosEdge)
3b3: 80 7d e6 00 cmpb $0x0,-0x1a(%ebp)
3b7: 74 34 je 3ed <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3ed>
{
//add pos edge
pendingPosEdge = false;
3b9: c6 45 e6 00 movb $0x0,-0x1a(%ebp)
edge_minimum = local_min;
3bd: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax
3c1: 88 45 e3 mov %al,-0x1d(%ebp)
AddPosEdge(i, edge_minimum, edge_maximum, delay);
3c4: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
3c8: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
3cc: 8b 4d c4 mov -0x3c(%ebp),%ecx
3cf: 89 4c 24 10 mov %ecx,0x10(%esp)
3d3: 89 54 24 0c mov %edx,0xc(%esp)
3d7: 89 44 24 08 mov %eax,0x8(%esp)
3db: 8b 45 dc mov -0x24(%ebp),%eax
3de: 89 44 24 04 mov %eax,0x4(%esp)
3e2: 8b 45 08 mov 0x8(%ebp),%eax
3e5: 89 04 24 mov %eax,(%esp)
3e8: e8 fc ff ff ff call 3e9 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3e9>
}
}if (filteredIntensity > threshold && prvFilteredIntensity <= threshold )
3ed: 0f b6 45 cf movzbl -0x31(%ebp),%eax
3f1: 3a 45 c3 cmp -0x3d(%ebp),%al
3f4: 76 16 jbe 40c <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x40c>
3f6: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
3fa: 3a 45 c3 cmp -0x3d(%ebp),%al
3fd: 77 0d ja 40c <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x40c>
{
pendingNegEdge = true;
3ff: c6 45 e5 01 movb $0x1,-0x1b(%ebp)
edge_minimum = local_min;
403: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax
407: 88 45 e3 mov %al,-0x1d(%ebp)
40a: eb 1d jmp 429 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x429>
}
else if (filteredIntensity < threshold && prvFilteredIntensity >= threshold )
40c: 0f b6 45 cf movzbl -0x31(%ebp),%eax
410: 3a 45 c3 cmp -0x3d(%ebp),%al
413: 73 14 jae 429 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x429>
415: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
419: 3a 45 c3 cmp -0x3d(%ebp),%al
41c: 72 0b jb 429 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x429>
{
pendingPosEdge = true;
41e: c6 45 e6 01 movb $0x1,-0x1a(%ebp)
edge_maximum = local_max;
422: 0f b6 45 e2 movzbl -0x1e(%ebp),%eax
426: 88 45 e4 mov %al,-0x1c(%ebp)
}prvState = state;
429: 8b 45 c8 mov -0x38(%ebp),%eax
42c: 89 45 e8 mov %eax,-0x18(%ebp)
prvFilteredIntensity = filteredIntensity;
42f: 0f b6 45 cf movzbl -0x31(%ebp),%eax
433: 88 45 e7 mov %al,-0x19(%ebp)
columPtr += inc;
436: 8b 45 f0 mov -0x10(%ebp),%eax
439: 01 45 f4 add %eax,-0xc(%ebp)
unsigned char edge_maximum = 0;
unsigned char edge_minimum = 0;
unsigned char local_max = 0;
unsigned char local_min = 0;for (unsigned int i=0; i
Width; i++)
43c: 83 45 dc 01 addl $0x1,-0x24(%ebp)
440: 8b 45 0c mov 0xc(%ebp),%eax
443: 8b 40 10 mov 0x10(%eax),%eax
446: 3b 45 dc cmp -0x24(%ebp),%eax
449: 0f 97 c0 seta %al
44c: 84 c0 test %al,%al
44e: 0f 85 e0 fc ff ff jne 134 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x134>
prvState = state;
prvFilteredIntensity = filteredIntensity;
columPtr += inc;
}diagMinPixelVal = minIntensity;
454: 0f b6 55 ef movzbl -0x11(%ebp),%edx
458: 8b 45 08 mov 0x8(%ebp),%eax
45b: 89 90 d8 07 00 00 mov %edx,0x7d8(%eax)
diagMaxPixelVal = maxIntensity;
461: 0f b6 55 ee movzbl -0x12(%ebp),%edx
465: 8b 45 08 mov 0x8(%ebp),%eax
468: 89 90 dc 07 00 00 mov %edx,0x7dc(%eax)
}
46e: 81 c4 84 00 00 00 add $0x84,%esp
474: 5b pop %ebx
475: 5d pop %ebp
476: c3 retAugust 19, 2013 at 16:13 #2522ketParticipantHi,
Based on the info line command, gdb cannot find the function source file. However, based on the o file, the symbols of the function are there. Now run the objdump command on your executable, not the o file, look if symbols for CApplication_WidthMonitor::DetectEdgesFast are present:
objdump -d -S
If yes, this could be a GDB bug. If no, the symbols are discarded during your build process and analyzing the exact commands ran to build the executable from the .o files should provide enough clues.
August 20, 2013 at 08:06 #2523JordanWParticipantHi Ket,
Yes I found the following in the binary executable:
0804c1e0 <_zn11application12widthmonitor25capplication_widthmonitor15detectedgesfastepn6camera10timageinfoe>:
void CApplication_WidthMonitor::DetectEdgesFast(TImageInfo* image)
{
804c1e0: 55 push %ebp
804c1e1: 89 e5 mov %esp,%ebp
804c1e3: 53 push %ebx
804c1e4: 81 ec 84 00 00 00 sub $0x84,%esp
// @ TODO implement Intensityfilter
if (mpIntensityFilter) { mpIntensityFilter->Initialise(); }
804c1ea: 8b 45 08 mov 0x8(%ebp),%eax
804c1ed: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c1f3: 85 c0 test %eax,%eax
804c1f5: 74 1e je 804c215 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x35>
804c1f7: 8b 45 08 mov 0x8(%ebp),%eax
804c1fa: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c200: 8b 00 mov (%eax),%eax
804c202: 83 c0 08 add $0x8,%eax
804c205: 8b 10 mov (%eax),%edx
804c207: 8b 45 08 mov 0x8(%ebp),%eax
804c20a: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c210: 89 04 24 mov %eax,(%esp)
804c213: ff d2 call *%edx
TImagePtr columPtr;
int inc;if (mLeftsideRight)
804c215: 8b 45 08 mov 0x8(%ebp),%eax
804c218: 0f b6 80 3c 1c 00 00 movzbl 0x1c3c(%eax),%eax
804c21f: 84 c0 test %al,%al
804c221: 74 40 je 804c263 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x83>
{
columPtr = image->Image + ROIOffsetX + image->Width – 1 + ROIOffsetY * image->Pitch;
804c223: 8b 45 0c mov 0xc(%ebp),%eax
804c226: 8b 10 mov (%eax),%edx
804c228: 8b 45 08 mov 0x8(%ebp),%eax
804c22b: 8b 80 c4 07 00 00 mov 0x7c4(%eax),%eax
804c231: 89 c1 mov %eax,%ecx
804c233: 8b 45 0c mov 0xc(%ebp),%eax
804c236: 8b 40 10 mov 0x10(%eax),%eax
804c239: 8d 1c 01 lea (%ecx,%eax,1),%ebx
804c23c: 8b 45 08 mov 0x8(%ebp),%eax
804c23f: 8b 88 c0 07 00 00 mov 0x7c0(%eax),%ecx
804c245: 8b 45 0c mov 0xc(%ebp),%eax
804c248: 8b 40 18 mov 0x18(%eax),%eax
804c24b: 0f af c1 imul %ecx,%eax
804c24e: 8d 04 03 lea (%ebx,%eax,1),%eax
804c251: 83 e8 01 sub $0x1,%eax
804c254: 8d 04 02 lea (%edx,%eax,1),%eax
804c257: 89 45 f4 mov %eax,-0xc(%ebp)
inc = -1;
804c25a: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
804c261: eb 32 jmp 804c295 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xb5>
}
else
{
columPtr = image->Image + ROIOffsetX + ROIOffsetY * image->Pitch;
804c263: 8b 45 0c mov 0xc(%ebp),%eax
804c266: 8b 10 mov (%eax),%edx
804c268: 8b 45 08 mov 0x8(%ebp),%eax
804c26b: 8b 80 c4 07 00 00 mov 0x7c4(%eax),%eax
804c271: 89 c1 mov %eax,%ecx
804c273: 8b 45 08 mov 0x8(%ebp),%eax
804c276: 8b 98 c0 07 00 00 mov 0x7c0(%eax),%ebx
804c27c: 8b 45 0c mov 0xc(%ebp),%eax
804c27f: 8b 40 18 mov 0x18(%eax),%eax
804c282: 0f af c3 imul %ebx,%eax
804c285: 8d 04 01 lea (%ecx,%eax,1),%eax
804c288: 8d 04 02 lea (%edx,%eax,1),%eax
804c28b: 89 45 f4 mov %eax,-0xc(%ebp)
inc = 1;
804c28e: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
}unsigned int delay=mpIntensityFilter==NULL ? 0 : (unsigned int)mpIntensityFilter->Delay();
804c295: 8b 45 08 mov 0x8(%ebp),%eax
804c298: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c29e: 85 c0 test %eax,%eax
804c2a0: 74 2f je 804c2d1 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xf1>
804c2a2: 8b 45 08 mov 0x8(%ebp),%eax
804c2a5: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c2ab: 89 04 24 mov %eax,(%esp)
804c2ae: e8 f5 07 00 00 call 804caa8 <_zn7cfilterihe5delayev>
804c2b3: d9 7d b6 fnstcw -0x4a(%ebp)
804c2b6: 0f b7 45 b6 movzwl -0x4a(%ebp),%eax
804c2ba: b4 0c mov $0xc,%ah
804c2bc: 66 89 45 b4 mov %ax,-0x4c(%ebp)
804c2c0: d9 6d b4 fldcw -0x4c(%ebp)
804c2c3: df 7d a8 fistpll -0x58(%ebp)
804c2c6: d9 6d b6 fldcw -0x4a(%ebp)
804c2c9: 8b 45 a8 mov -0x58(%ebp),%eax
804c2cc: 8b 55 ac mov -0x54(%ebp),%edx
804c2cf: eb 05 jmp 804c2d6 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0xf6>
804c2d1: b8 00 00 00 00 mov $0x0,%eax
804c2d6: 89 45 c4 mov %eax,-0x3c(%ebp)
unsigned char minIntensity = 255;
804c2d9: c6 45 ef ff movb $0xff,-0x11(%ebp)
unsigned char maxIntensity = 0;
804c2dd: c6 45 ee 00 movb $0x0,-0x12(%ebp)// @TODO Implement treshold value from ini setting
//unsigned char threshold = (unsigned char) (float)(pScanSettings->mLimHigh + pScanSettings->mLimLow)/2;
unsigned char threshold = 50;
804c2e1: c6 45 c3 32 movb $0x32,-0x3d(%ebp)
TEdgeDetectionState prvState = EDGE_DETECTION_STABLE;
804c2e5: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
unsigned char prvFilteredIntensity = 0;
804c2ec: c6 45 e7 00 movb $0x0,-0x19(%ebp)bool pendingPosEdge = false;
804c2f0: c6 45 e6 00 movb $0x0,-0x1a(%ebp)
bool pendingNegEdge = false;
804c2f4: c6 45 e5 00 movb $0x0,-0x1b(%ebp)
unsigned char edge_maximum = 0;
804c2f8: c6 45 e4 00 movb $0x0,-0x1c(%ebp)
unsigned char edge_minimum = 0;
804c2fc: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
unsigned char local_max = 0;
804c300: c6 45 e2 00 movb $0x0,-0x1e(%ebp)
unsigned char local_min = 0;
804c304: c6 45 e1 00 movb $0x0,-0x1f(%ebp)for (unsigned int i=0; i
Width; i++)
804c308: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
804c30f: e9 0c 03 00 00 jmp 804c620 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x440>
{
int sum = 0;
804c314: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
TImagePtr pixel = columPtr;
804c31b: 8b 45 f4 mov -0xc(%ebp),%eax
804c31e: 89 45 d4 mov %eax,-0x2c(%ebp)if (imageHeight==1)
804c321: 8b 45 08 mov 0x8(%ebp),%eax
804c324: 8b 80 b0 07 00 00 mov 0x7b0(%eax),%eax
804c32a: 83 f8 01 cmp $0x1,%eax
804c32d: 75 16 jne 804c345 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x165>
{
mVirtualLine = *pixel;
804c32f: 8b 45 d4 mov -0x2c(%ebp),%eax
804c332: 0f b6 00 movzbl (%eax),%eax
804c335: 8b 55 08 mov 0x8(%ebp),%edx
804c338: 03 55 dc add -0x24(%ebp),%edx
804c33b: 81 c2 e0 07 00 00 add $0x7e0,%edx
804c341: 88 02 mov %al,(%edx)
804c343: eb 5a jmp 804c39f <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x1bf>
}
else
{
for (unsigned int j=0; j804c345: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
804c34c: eb 19 jmp 804c367 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x187>
{
sum+=*pixel;
804c34e: 8b 45 d4 mov -0x2c(%ebp),%eax
804c351: 0f b6 00 movzbl (%eax),%eax
804c354: 0f b6 c0 movzbl %al,%eax
804c357: 01 45 d8 add %eax,-0x28(%ebp)
pixel+=image->Pitch;
804c35a: 8b 45 0c mov 0xc(%ebp),%eax
804c35d: 8b 40 18 mov 0x18(%eax),%eax
804c360: 01 45 d4 add %eax,-0x2c(%ebp)
{
mVirtualLine = *pixel;
}
else
{
for (unsigned int j=0; j804c363: 83 45 d0 01 addl $0x1,-0x30(%ebp)
804c367: 8b 45 08 mov 0x8(%ebp),%eax
804c36a: 8b 80 b0 07 00 00 mov 0x7b0(%eax),%eax
804c370: 3b 45 d0 cmp -0x30(%ebp),%eax
804c373: 0f 97 c0 seta %al
804c376: 84 c0 test %al,%al
804c378: 75 d4 jne 804c34e <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x16e>
{
sum+=*pixel;
pixel+=image->Pitch;
}
mVirtualLine = sum / imageHeight;
804c37a: 8b 45 08 mov 0x8(%ebp),%eax
804c37d: 8b 80 b0 07 00 00 mov 0x7b0(%eax),%eax
804c383: 89 45 a4 mov %eax,-0x5c(%ebp)
804c386: 8b 45 d8 mov -0x28(%ebp),%eax
804c389: 89 c2 mov %eax,%edx
804c38b: c1 fa 1f sar $0x1f,%edx
804c38e: f7 7d a4 idivl -0x5c(%ebp)
804c391: 8b 55 08 mov 0x8(%ebp),%edx
804c394: 03 55 dc add -0x24(%ebp),%edx
804c397: 81 c2 e0 07 00 00 add $0x7e0,%edx
804c39d: 88 02 mov %al,(%edx)
}
}
*/unsigned char filteredIntensity;
if (mpIntensityFilter)
804c39f: 8b 45 08 mov 0x8(%ebp),%eax
804c3a2: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c3a8: 85 c0 test %eax,%eax
804c3aa: 74 49 je 804c3f5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x215>
{
mpIntensityFilter->Update(mVirtualLine);
804c3ac: 8b 45 08 mov 0x8(%ebp),%eax
804c3af: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c3b5: 8b 00 mov (%eax),%eax
804c3b7: 83 c0 18 add $0x18,%eax
804c3ba: 8b 08 mov (%eax),%ecx
804c3bc: 8b 45 08 mov 0x8(%ebp),%eax
804c3bf: 03 45 dc add -0x24(%ebp),%eax
804c3c2: 05 e0 07 00 00 add $0x7e0,%eax
804c3c7: 0f b6 00 movzbl (%eax),%eax
804c3ca: 0f b6 d0 movzbl %al,%edx
804c3cd: 8b 45 08 mov 0x8(%ebp),%eax
804c3d0: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c3d6: 89 54 24 04 mov %edx,0x4(%esp)
804c3da: 89 04 24 mov %eax,(%esp)
804c3dd: ff d1 call *%ecx
filteredIntensity = mpIntensityFilter->Get();
804c3df: 8b 45 08 mov 0x8(%ebp),%eax
804c3e2: 8b 80 c8 07 00 00 mov 0x7c8(%eax),%eax
804c3e8: 89 04 24 mov %eax,(%esp)
804c3eb: e8 cc 06 00 00 call 804cabc <_zn7cfilterihe3getev>
804c3f0: 88 45 cf mov %al,-0x31(%ebp)
804c3f3: eb 11 jmp 804c406 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x226>
}
else
{
filteredIntensity = mVirtualLine;
804c3f5: 8b 45 08 mov 0x8(%ebp),%eax
804c3f8: 03 45 dc add -0x24(%ebp),%eax
804c3fb: 05 e0 07 00 00 add $0x7e0,%eax
804c400: 0f b6 00 movzbl (%eax),%eax
804c403: 88 45 cf mov %al,-0x31(%ebp)
}
mFilteredLine = filteredIntensity;
804c406: 8b 45 08 mov 0x8(%ebp),%eax
804c409: 8d 90 20 1c 00 00 lea 0x1c20(%eax),%edx
804c40f: 8b 45 dc mov -0x24(%ebp),%eax
804c412: 89 44 24 04 mov %eax,0x4(%esp)
804c416: 89 14 24 mov %edx,(%esp)
804c419: e8 aa 06 00 00 call 804cac8 <_znst6vectorihsaiheeixej>
804c41e: 0f b6 55 cf movzbl -0x31(%ebp),%edx
804c422: 88 10 mov %dl,(%eax)if (i==0) { prvFilteredIntensity = filteredIntensity; }
804c424: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
804c428: 75 07 jne 804c431 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x251>
804c42a: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c42e: 88 45 e7 mov %al,-0x19(%ebp)if (filteredIntensity < minIntensity) { minIntensity = (unsigned char)filteredIntensity; }
804c431: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c435: 3a 45 ef cmp -0x11(%ebp),%al
804c438: 73 07 jae 804c441 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x261>
804c43a: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c43e: 88 45 ef mov %al,-0x11(%ebp)
if (filteredIntensity > maxIntensity) { maxIntensity = (unsigned char)filteredIntensity; }
804c441: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c445: 3a 45 ee cmp -0x12(%ebp),%al
804c448: 76 07 jbe 804c451 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x271>
804c44a: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c44e: 88 45 ee mov %al,-0x12(%ebp)TEdgeDetectionState state = EDGE_DETECTION_STABLE;
804c451: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)//rising
if (filteredIntensity-prvFilteredIntensity > 0)
804c458: 0f b6 55 cf movzbl -0x31(%ebp),%edx
804c45c: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c460: 89 d1 mov %edx,%ecx
804c462: 29 c1 sub %eax,%ecx
804c464: 89 c8 mov %ecx,%eax
804c466: 85 c0 test %eax,%eax
804c468: 7e 5b jle 804c4c5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e5>
{
state = EDGE_DETECTION_RISING;
804c46a: c7 45 c8 01 00 00 00 movl $0x1,-0x38(%ebp)
local_max = filteredIntensity;
804c471: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c475: 88 45 e2 mov %al,-0x1e(%ebp)
if (prvState != EDGE_DETECTION_RISING)
804c478: 83 7d e8 01 cmpl $0x1,-0x18(%ebp)
804c47c: 74 47 je 804c4c5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e5>
{
if (prvState == EDGE_DETECTION_FALLING) { local_min = prvFilteredIntensity; }
804c47e: 83 7d e8 02 cmpl $0x2,-0x18(%ebp)
804c482: 75 07 jne 804c48b <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2ab>
804c484: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c488: 88 45 e1 mov %al,-0x1f(%ebp)if (pendingPosEdge)
804c48b: 80 7d e6 00 cmpb $0x0,-0x1a(%ebp)
804c48f: 74 34 je 804c4c5 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x2e5>
{
//add pos edge
pendingPosEdge = false;
804c491: c6 45 e6 00 movb $0x0,-0x1a(%ebp)
edge_minimum = local_min;
804c495: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax
804c499: 88 45 e3 mov %al,-0x1d(%ebp)
AddPosEdge(i, edge_minimum, edge_maximum, delay);
804c49c: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
804c4a0: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
804c4a4: 8b 4d c4 mov -0x3c(%ebp),%ecx
804c4a7: 89 4c 24 10 mov %ecx,0x10(%esp)
804c4ab: 89 54 24 0c mov %edx,0xc(%esp)
804c4af: 89 44 24 08 mov %eax,0x8(%esp)
804c4b3: 8b 45 dc mov -0x24(%ebp),%eax
804c4b6: 89 44 24 04 mov %eax,0x4(%esp)
804c4ba: 8b 45 08 mov 0x8(%ebp),%eax
804c4bd: 89 04 24 mov %eax,(%esp)
804c4c0: e8 93 01 00 00 call 804c658 <_zn11application12widthmonitor25capplication_widthmonitor10addposedgeejhhj>
}
}
}//falling
if (filteredIntensity-prvFilteredIntensity < 0)
804c4c5: 0f b6 55 cf movzbl -0x31(%ebp),%edx
804c4c9: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c4cd: 89 d1 mov %edx,%ecx
804c4cf: 29 c1 sub %eax,%ecx
804c4d1: 89 c8 mov %ecx,%eax
804c4d3: 85 c0 test %eax,%eax
804c4d5: 79 5b jns 804c532 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x352>
{
state = EDGE_DETECTION_FALLING;
804c4d7: c7 45 c8 02 00 00 00 movl $0x2,-0x38(%ebp)
local_min = filteredIntensity;
804c4de: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c4e2: 88 45 e1 mov %al,-0x1f(%ebp)
if (prvState != EDGE_DETECTION_FALLING)
804c4e5: 83 7d e8 02 cmpl $0x2,-0x18(%ebp)
804c4e9: 74 47 je 804c532 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x352>
{
if (prvState == EDGE_DETECTION_RISING) { local_max = prvFilteredIntensity; }
804c4eb: 83 7d e8 01 cmpl $0x1,-0x18(%ebp)
804c4ef: 75 07 jne 804c4f8 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x318>
804c4f1: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c4f5: 88 45 e2 mov %al,-0x1e(%ebp)if (pendingNegEdge)
804c4f8: 80 7d e5 00 cmpb $0x0,-0x1b(%ebp)
804c4fc: 74 34 je 804c532 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x352>
{
//add neg edge
pendingNegEdge = false;
804c4fe: c6 45 e5 00 movb $0x0,-0x1b(%ebp)
edge_maximum = local_max;
804c502: 0f b6 45 e2 movzbl -0x1e(%ebp),%eax
804c506: 88 45 e4 mov %al,-0x1c(%ebp)
AddNegEdge(i, edge_minimum, edge_maximum, delay);
804c509: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
804c50d: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
804c511: 8b 4d c4 mov -0x3c(%ebp),%ecx
804c514: 89 4c 24 10 mov %ecx,0x10(%esp)
804c518: 89 54 24 0c mov %edx,0xc(%esp)
804c51c: 89 44 24 08 mov %eax,0x8(%esp)
804c520: 8b 45 dc mov -0x24(%ebp),%eax
804c523: 89 44 24 04 mov %eax,0x4(%esp)
804c527: 8b 45 08 mov 0x8(%ebp),%eax
804c52a: 89 04 24 mov %eax,(%esp)
804c52d: e8 3e 02 00 00 call 804c770 <_zn11application12widthmonitor25capplication_widthmonitor10addnegedgeejhhj>
}
}
}//nor falling, nor rising
if (filteredIntensity-prvFilteredIntensity == 0)
804c532: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c536: 3a 45 e7 cmp -0x19(%ebp),%al
804c539: 0f 85 8e 00 00 00 jne 804c5cd <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3ed>
{
//check for pending edges//negative edge:
if (prvState != EDGE_DETECTION_FALLING) { local_max = prvFilteredIntensity; }
804c53f: 83 7d e8 02 cmpl $0x2,-0x18(%ebp)
804c543: 74 07 je 804c54c <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x36c>
804c545: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c549: 88 45 e2 mov %al,-0x1e(%ebp)if (pendingNegEdge)
804c54c: 80 7d e5 00 cmpb $0x0,-0x1b(%ebp)
804c550: 74 34 je 804c586 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3a6>
{
//add neg edge
pendingNegEdge = false;
804c552: c6 45 e5 00 movb $0x0,-0x1b(%ebp)
edge_maximum = local_max;
804c556: 0f b6 45 e2 movzbl -0x1e(%ebp),%eax
804c55a: 88 45 e4 mov %al,-0x1c(%ebp)
AddNegEdge(i, edge_minimum, edge_maximum, delay);
804c55d: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
804c561: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
804c565: 8b 4d c4 mov -0x3c(%ebp),%ecx
804c568: 89 4c 24 10 mov %ecx,0x10(%esp)
804c56c: 89 54 24 0c mov %edx,0xc(%esp)
804c570: 89 44 24 08 mov %eax,0x8(%esp)
804c574: 8b 45 dc mov -0x24(%ebp),%eax
804c577: 89 44 24 04 mov %eax,0x4(%esp)
804c57b: 8b 45 08 mov 0x8(%ebp),%eax
804c57e: 89 04 24 mov %eax,(%esp)
804c581: e8 ea 01 00 00 call 804c770 <_zn11application12widthmonitor25capplication_widthmonitor10addnegedgeejhhj>
}//positive edge
if (prvState != EDGE_DETECTION_RISING) { local_min = prvFilteredIntensity; }
804c586: 83 7d e8 01 cmpl $0x1,-0x18(%ebp)
804c58a: 74 07 je 804c593 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3b3>
804c58c: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c590: 88 45 e1 mov %al,-0x1f(%ebp)if (pendingPosEdge)
804c593: 80 7d e6 00 cmpb $0x0,-0x1a(%ebp)
804c597: 74 34 je 804c5cd <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x3ed>
{
//add pos edge
pendingPosEdge = false;
804c599: c6 45 e6 00 movb $0x0,-0x1a(%ebp)
edge_minimum = local_min;
804c59d: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax
804c5a1: 88 45 e3 mov %al,-0x1d(%ebp)
AddPosEdge(i, edge_minimum, edge_maximum, delay);
804c5a4: 0f b6 55 e4 movzbl -0x1c(%ebp),%edx
804c5a8: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
804c5ac: 8b 4d c4 mov -0x3c(%ebp),%ecx
804c5af: 89 4c 24 10 mov %ecx,0x10(%esp)
804c5b3: 89 54 24 0c mov %edx,0xc(%esp)
804c5b7: 89 44 24 08 mov %eax,0x8(%esp)
804c5bb: 8b 45 dc mov -0x24(%ebp),%eax
804c5be: 89 44 24 04 mov %eax,0x4(%esp)
804c5c2: 8b 45 08 mov 0x8(%ebp),%eax
804c5c5: 89 04 24 mov %eax,(%esp)
804c5c8: e8 8b 00 00 00 call 804c658 <_zn11application12widthmonitor25capplication_widthmonitor10addposedgeejhhj>
}
}if (filteredIntensity > threshold && prvFilteredIntensity <= threshold )
804c5cd: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c5d1: 3a 45 c3 cmp -0x3d(%ebp),%al
804c5d4: 76 16 jbe 804c5ec <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x40c>
804c5d6: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c5da: 3a 45 c3 cmp -0x3d(%ebp),%al
804c5dd: 77 0d ja 804c5ec <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x40c>
{
pendingNegEdge = true;
804c5df: c6 45 e5 01 movb $0x1,-0x1b(%ebp)
edge_minimum = local_min;
804c5e3: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax
804c5e7: 88 45 e3 mov %al,-0x1d(%ebp)
804c5ea: eb 1d jmp 804c609 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x429>
}
else if (filteredIntensity < threshold && prvFilteredIntensity >= threshold )
804c5ec: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c5f0: 3a 45 c3 cmp -0x3d(%ebp),%al
804c5f3: 73 14 jae 804c609 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x429>
804c5f5: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
804c5f9: 3a 45 c3 cmp -0x3d(%ebp),%al
804c5fc: 72 0b jb 804c609 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x429>
{
pendingPosEdge = true;
804c5fe: c6 45 e6 01 movb $0x1,-0x1a(%ebp)
edge_maximum = local_max;
804c602: 0f b6 45 e2 movzbl -0x1e(%ebp),%eax
804c606: 88 45 e4 mov %al,-0x1c(%ebp)
}prvState = state;
804c609: 8b 45 c8 mov -0x38(%ebp),%eax
804c60c: 89 45 e8 mov %eax,-0x18(%ebp)
prvFilteredIntensity = filteredIntensity;
804c60f: 0f b6 45 cf movzbl -0x31(%ebp),%eax
804c613: 88 45 e7 mov %al,-0x19(%ebp)
columPtr += inc;
804c616: 8b 45 f0 mov -0x10(%ebp),%eax
804c619: 01 45 f4 add %eax,-0xc(%ebp)
unsigned char edge_maximum = 0;
unsigned char edge_minimum = 0;
unsigned char local_max = 0;
unsigned char local_min = 0;for (unsigned int i=0; i
Width; i++)
804c61c: 83 45 dc 01 addl $0x1,-0x24(%ebp)
804c620: 8b 45 0c mov 0xc(%ebp),%eax
804c623: 8b 40 10 mov 0x10(%eax),%eax
804c626: 3b 45 dc cmp -0x24(%ebp),%eax
804c629: 0f 97 c0 seta %al
804c62c: 84 c0 test %al,%al
804c62e: 0f 85 e0 fc ff ff jne 804c314 <_ZN11Application12WidthMonitor25CApplication_WidthMonitor15DetectEdgesFastEPN6Camera10TImageInfoE+0x134>
prvState = state;
prvFilteredIntensity = filteredIntensity;
columPtr += inc;
}diagMinPixelVal = minIntensity;
804c634: 0f b6 55 ef movzbl -0x11(%ebp),%edx
804c638: 8b 45 08 mov 0x8(%ebp),%eax
804c63b: 89 90 d8 07 00 00 mov %edx,0x7d8(%eax)
diagMaxPixelVal = maxIntensity;
804c641: 0f b6 55 ee movzbl -0x12(%ebp),%edx
804c645: 8b 45 08 mov 0x8(%ebp),%eax
804c648: 89 90 dc 07 00 00 mov %edx,0x7dc(%eax)
}
804c64e: 81 c4 84 00 00 00 add $0x84,%esp
804c654: 5b pop %ebx
804c655: 5d pop %ebp
804c656: c3 ret
804c657: 90 nopDo you got a solution for this GDB bug?
August 20, 2013 at 16:43 #2524ketParticipantHi,
Try updating your gdb to a newer version, if there is no built newer version available, then build one from the latest sources (version 7.6 is latest currently).
August 21, 2013 at 06:25 #2512JordanWParticipantHi Ket,
Ii already had build the newest version of GDB, I am using version 7.6.
August 22, 2013 at 04:45 #2525ketParticipantHi,
In that case try understanding what causes the problem.
You say that you can set breakpoints and see the source of other functions in the same file, stop the execution at some breakpoint and try the info line command on all the other functions in the file DetectEdgesFast is declared. Is source for all the other functions found, is there a pattern?
Secondly, try renaming the DetectEdgesFast function to something else.
Last but not least, is your gdb and gcc compatible i.e. is gcc adding symbols that gdb can understand? Make sure that your gcc and gdb are meant for the same target and that their versions are roughly the same age i.e. not that the gdb is newest and gcc is ancient.
August 26, 2013 at 10:33 #2526JordanWParticipantHi Ket,
Before I want to update GCC , I updated the bin-utils (ld linker).
This fixed my debugging issue, to find the source files while debugging.I was using ld version 2.20 and updated it to 2.23.
Thanks for all your help!
-
AuthorPosts
- You must be logged in to reply to this topic.