Date: Sun, 27 Feb 2011 19:30:38 -0500 From: Eric Dedrick <dedrick@vbnm.net> To: freebsd-questions@freebsd.org Subject: gcc45 wrong debug info? Message-ID: <20110228003038.GA4842@vbnm.net>
next in thread | raw e-mail | index | archive | help
Wondering if anyone has encountered this problem where gdb/gcc doesn't seem to be getting the line number info right. I compiled code in as ---------------------------------------------------------------------- gcc45 -g -W -Wall -O0 -std=c99 -D_BSD_SOURCE -DDEBUG -D__BSD_VISIBLE -DFREEBSD -c interreflect3d.c -o x86-debug/objects/interreflections/interreflect3d.o gcc45 -g -W -Wall -O0 -std=c99 -D_BSD_SOURCE -DDEBUG -D__BSD_VISIBLE -DFREEBSD interreflect_driver.c x86-debug/objects/interreflections/interreflect3d.o -o x86-debug/bin/interreflect_driver -I./ -Ix86-debug/include -Ix86-debug/../external/include -Lx86-debug/../external/lib -llapack -lf77blas -lcblas -latlas -lgfortran ---------------------------------------------------------------------- and then I go to debug. I seem to stop in my function ok, locals and such seem ok, gdb seems to handle OK, except the line number information is wrong: #0 0x000000000040467b in reconstruction_prune (r=0x7fffffffe420, intensity_threshold_min=1, intensity_threshold_max=999999, jump_discontinuity_threshold=100, clustersize=5) at interreflect3d.c:296 #1 0x00000000004013ef in main (argc=26, argv=0x7fffffffe620) at interreflect_driver.c:103 For #0, the correct line is 1108, not 296. #1 is correct. This incorrect line number info is giving me grief while I'm trying to step through my code. Anyone have a hunch what's going on here? Thanks.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110228003038.GA4842>