help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] How to compile a GSL progrma for gdb to debug?


From: gyuwang
Subject: [Help-gsl] How to compile a GSL progrma for gdb to debug?
Date: Wed, 31 Oct 2007 07:54:28 +0800
User-agent: Mutt/1.5.13 (2006-08-11)

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) 
......

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]