This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]