mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
[gdb/testsuite] Fix gdb.base/return-nodebug.exp with local-remote-host.exp
With host board local-remote-host.exp and test-case gdb.base/return-nodebug.exp, I run into: ... Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never \ -DTYPE=signed\ char -c -g -o return-nodebug-signed-char0.o \ /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/return-nodebug.c \ (timeout = 300) builtin_spawn [open ...]^M gcc: error: char: No such file or directory ... Avoid the quoting problem by not using spaces in the define. Tested on x86_64-linux.
This commit is contained in:
@ -15,6 +15,14 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#ifdef TYPE_NOSPACE_long_long
|
||||||
|
#define TYPE long long
|
||||||
|
#elif defined TYPE_NOSPACE_signed_char
|
||||||
|
#define TYPE signed char
|
||||||
|
#else
|
||||||
|
#define TYPE TYPE_NOSPACE
|
||||||
|
#endif
|
||||||
|
|
||||||
extern TYPE func (void);
|
extern TYPE func (void);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -52,17 +52,23 @@ foreach type {{signed char} {short} {int} {long} {long long} {float} {double}} {
|
|||||||
if { $skip_float_test && ($type == "float" || $type == "double") } {
|
if { $skip_float_test && ($type == "float" || $type == "double") } {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
set typeesc [string map {{ } {\ }} $type]
|
set typenospace_dash \
|
||||||
set typenospace [string map {{ } -} $type]
|
[string map {{ } -} $type]
|
||||||
|
set typenospace_underscore \
|
||||||
|
[string map {{ } _} $type]
|
||||||
|
|
||||||
standard_testfile .c return-nodebug1.c
|
standard_testfile .c return-nodebug1.c
|
||||||
|
|
||||||
set additional_flags "additional_flags=-DTYPE=$typeesc"
|
set additional_flags {}
|
||||||
|
lappend additional_flags \
|
||||||
|
additional_flags=-DTYPE_NOSPACE=$typenospace_underscore
|
||||||
|
lappend additional_flags \
|
||||||
|
additional_flags=-DTYPE_NOSPACE_$typenospace_underscore
|
||||||
|
|
||||||
if {[prepare_for_testing_full "failed to prepare" \
|
if {[prepare_for_testing_full "failed to prepare" \
|
||||||
[list ${testfile}-${typenospace} debug \
|
[list ${testfile}-${typenospace_dash} debug \
|
||||||
$srcfile [list debug $additional_flags] \
|
$srcfile [concat {debug} $additional_flags] \
|
||||||
$srcfile2 [list $additional_flags]]]} {
|
$srcfile2 $additional_flags]]} {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,14 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#ifdef TYPE_NOSPACE_long_long
|
||||||
|
#define TYPE long long
|
||||||
|
#elif defined TYPE_NOSPACE_signed_char
|
||||||
|
#define TYPE signed char
|
||||||
|
#else
|
||||||
|
#define TYPE TYPE_NOSPACE
|
||||||
|
#endif
|
||||||
|
|
||||||
TYPE
|
TYPE
|
||||||
func (void)
|
func (void)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user