This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
How to debug those functions in a .h file
- From: "Chen, Yukun" <yukun dot chen at intel dot com>
- To: <gdb at sources dot redhat dot com>
- Date: Wed, 24 Nov 2004 17:18:52 +0800
- Subject: How to debug those functions in a .h file
Hi all
I meet a problem when using gdb. Suppose I have the following dir structure:
/project/include/myfun.h
/project/src/demo.c
Under /project/src, after compile and link those 2 files, I get demo.o file. Then, I run
gdb demo.o
and go into the interface of gdb. I can break such functions in demo.c file but failed to break those in myfun.h unless I copy myfun.h under dir /project/src.
It seems that gdb will only search the .h file in the current dir but not other dir. Then how can I debug the functions in /project/include/myfun.h without copying the file to current dir?
Thanx.
Aaron
Intel China Software Lab
Tel: 8621-52574545 Ext.1587
E_mail:yukun.chen@intel.com