[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] How to compile a GSL progrma for gdb to debug?
From: |
Inigo Aldazabal Mensa |
Subject: |
Re: [Help-gsl] How to compile a GSL progrma for gdb to debug? |
Date: |
Thu, 1 Nov 2007 10:08:55 +0100 |
User-agent: |
KMail/1.9.5 |
El Miércoles, 31 de Octubre de 2007 00:54, gyuwang escribió:
> Hi, all.
> I am new to GSL. I want to use MAKE to compile the program.
> For example, I want to debug the program main.c by gdb.
>
> #This is the Makefile
> objects=main.o
> test:$(objects)
> cc -g -o test $(objects) -lgsl -lgslcblas -lm
> .PHONY:clean
> clean:
> rm test $(objects)
>
> It works well.
>
> But when the gdb runs,it seems something is wrong.
> Current directory is ~/c_code/
> 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) list 9
> 4 in ../sysdeps/i386/elf/start.S
> (gdb) lint main.c
> Undefined command: "lint". Try "help".
> (gdb)
> ......
Is lint supposed to be some gdb command? as I don't see to find it out.
If you are trying to statically check your main.c code with lint [1], you
should do it outside gdb. They are completely independent tools. In gdb
you tipically set your breakpoints etc and then (gdb) run (see eg. the gsl
manual[2], or [3]). Or am I missing something here?
[1]http://en.wikipedia.org/wiki/Lint_programming_tool
[2]http://www.gnu.org/software/gsl/manual/html_node/Debugging-Numerical-Programs.html
[3]http://www.network-theory.co.uk/docs/gccintro/gccintro_37.html
>
> I can not use print and breakpoint command.
> So, it is very helpful to give me some introduction of compiling GSL
> program for GDB.
>
> Thanks.
>
> Bowlderster
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Help-gsl] How to compile a GSL progrma for gdb to debug?,
Inigo Aldazabal Mensa <=