This is the mail archive of the gdb-patches@sourceware.org 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]

python.exp: filename functions FAIL


Hi Phil,

getting 
	FAIL: gdb.python/python.exp: Test decode_line current locationn filename
	FAIL: gdb.python/python.exp: Test decode_line python.c:26 filename
	FAIL: gdb.python/python.exp: Test decode_line func1 filename
on x86_64-fedora14snapshot-linux-gnu (but even on fedora13 etc.).

The problem is the testcase gets compiled as:
	< c>   DW_AT_producer : GNU C 4.5.0 20100716 (Red Hat 4.5.0-3)
	<11>   DW_AT_name     : ./gdb.python/python-sl.c        
	<15>   DW_AT_comp_dir : /home/path/to/gdb-clean/gdb/testsuite   
while gdb uses
	result = PyString_FromString (symtab->filename);
and expects
	gdb_test "python print symtab\[1\]\[0\].symtab" "gdb/testsuite/gdb.python/python.c.*" "Test decode_line python.c:26 filename"
but it gets
	python print symtab[1][0].symtab
	./gdb.python/python.c
	(gdb) FAIL: gdb.python/python.exp: Test decode_line python.c:26 filename

It is a larger GDB problem with compilation directory vs. relative filename
path (wrt same base names in multiple directories etc.).  I do not know
specifically why sometimes the directory is
/home/path/to/gdb-clean/gdb/testsuite and sometimes /home/path/to/gdb-clean .

Suggesting to use for Python always only the absolute filename provided by:
	char * 
	symtab_to_fullname (struct symtab *s)

This is the only easy way how to solve the same filename in multiple source
directories anyway.


Thanks,
Jan


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