How to debug those functions in a .h file

Chen, Yukun yukun.chen@intel.com
Wed Nov 24 09:23:00 GMT 2004


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



More information about the Gdb mailing list