This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Fix Darwin failures on macscp.exp
- From: Tristan Gingold <gingold at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 3 Dec 2008 14:39:16 +0100
- Subject: [RFA] Fix Darwin failures on macscp.exp
Hi,
On Darwin the debugging info are never in the final executable. They
either stay in object files or
a separate debug file is created.
When an executable is directly created from source files (ie gcc -g -o
x x.c), the separate debug file
is created (as the object files are temporary). The Darwin tool that
creates the separate debug file,
dsymutil, doesn't put .dwarf_macinfo into it.
As a consequence, there are a lot of failures in macscp.exp (more than
100).
Instead of disabling this test on Darwin, I'd prefer to do a two steps
compilation: first create an object
file and then link.
Tristan.
gdb/testsuite:
2008-12-03 Tristan Gingold <gingold@adacore.com>
* gdb.base/macscp.exp: Generate an object file during compilation
to work around Darwin dsymutil limitations.
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/macscp.exp,v
retrieving revision 1.15
diff -c -r1.15 macscp.exp
*** testsuite/gdb.base/macscp.exp 9 Oct 2008 16:49:47 -0000 1.15
--- testsuite/gdb.base/macscp.exp 3 Dec 2008 13:34:21 -0000
***************
*** 23,28 ****
--- 23,29 ----
set srcfile macscp1.c
set testfile "macscp"
+ set objfile "macscp.o"
set binfile ${objdir}/${subdir}/${testfile}
set options { debug }
***************
*** 32,38 ****
lappend options additional_flags=-g3
}
! if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${binfile}"
executable $options] != "" } {
untested macscp.exp
return -1
}
--- 33,41 ----
lappend options additional_flags=-g3
}
! if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \
! object $options] != ""
! || [gdb_compile "${objfile}" "${binfile}" executable $options] !
= "" } {
untested macscp.exp
return -1
}