Hi All, I am writing some new optimized SSE assembler routines.
I am trying to debug them with gdb but are having the following problems. For some reason gdb doesn't find the source right, or shows the wrong source. When I set a breakpoint on float_dotprod_sse it thinks it is in file ../../../../../gnuradio-core/src/lib/general/gr_remez.cc, line 864. While in fact it is in file ../../../../../gnuradio-core/src/lib/filter/float_dotprod_sse.S I added -Wa,--gdwarf2 to CCASFLAGS to enable debugging assembler files. Also when I step in the assembler routine, it only shows me line line 864 of gr_remez.cc as it thinks this is the current sourcefile. And when I say list float_dotprod_sse it also shows gr_remez.cc Since I created a segfault in the assembler routine I would really like to step through it. Any ideas what goes wrong here, and how to solve it? Greetings and thanks, Martin Dudok van Heel $ cd trunk $ mkdir build $ cd build $ export CFLAGS="-g -O2 -march=pentium-m -mfpmath=sse -msse -msse2" $ export CXXFLAGS="-g -O2 -march=pentium-m -mfpmath=sse -msse -msse2" $ export CCASFLAGS=" -g -O2 -march=pentium-m -mfpmath=sse -msse -msse2 -Wall -Wa,--gdwarf2" $ $ ../configure 2>&1 | tee configure.log $ make 2>&1 | tee make.log $ sudo make install 2>&1 | tee make_install.log $ cd ../gnuradio-core/src/test/.libs $ gdb test_filter GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) break main Breakpoint 1 at 0x8048870: file ../../../../gnuradio-core/src/tests/test_filter.cc, line 27. (gdb) list 18 * along with GNU Radio; see the file COPYING. If not, write to 19 * the Free Software Foundation, Inc., 51 Franklin Street, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #include <cppunit/TextTestRunner.h> 24 #include <qa_filter.h> 25 26 int 27 main (int argc, char **argv) (gdb) break float_dotprod_sse Function "float_dotprod_sse" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 2 (float_dotprod_sse) pending. (gdb) run Starting program: /pub/projects/intel_LPIA/svn/trunk/build_q1_sse/gnuradio-core/src/tests/.libs/test_filter Failed to read a valid object file image from memory. [Thread debugging using libthread_db enabled] [New Thread -1214613824 (LWP 15638)] Breakpoint 3 at 0xb7e42ce5: file ../../../../../gnuradio-core/src/lib/general/gr_remez.cc, line 864. Pending breakpoint "float_dotprod_sse" resolved [Switching to Thread -1214613824 (LWP 15638)] Breakpoint 1, main () at ../../../../gnuradio-core/src/tests/test_filter.cc:27 27 main (int argc, char **argv) (gdb) break float_dotprod_sse Note: breakpoint 3 also set at pc 0xb7e42ce5. Breakpoint 4 at 0xb7e42ce5: file ../../../../../gnuradio-core/src/lib/general/gr_remez.cc, line 864. (gdb) list 859 punt ("gr_remez: insufficient extremals -- cannot continue"); 860 861 if (err == -3) 862 punt ("gr_remez: too many extremals -- cannot continue"); 863 864 return std::vector<double> (&coeff[0], &coeff[numtaps]); 865 } 866 867 868 (gdb) list float_dotprod_sse 859 punt ("gr_remez: insufficient extremals -- cannot continue"); 860 861 if (err == -3) 862 punt ("gr_remez: too many extremals -- cannot continue"); 863 864 return std::vector<double> (&coeff[0], &coeff[numtaps]); 865 } 866 867 868 _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio