aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog29
-rw-r--r--gdb/testsuite/gdb.arch/spu-info.c235
-rw-r--r--gdb/testsuite/gdb.arch/spu-info.exp241
-rw-r--r--gdb/testsuite/gdb.arch/spu-ls.c31
-rw-r--r--gdb/testsuite/gdb.arch/spu-ls.exp47
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp5
-rw-r--r--gdb/testsuite/gdb.asm/spu.inc42
-rw-r--r--gdb/testsuite/gdb.base/dump.exp6
-rw-r--r--gdb/testsuite/gdb.base/overlays.exp3
-rw-r--r--gdb/testsuite/gdb.base/ovlymgr.c13
-rw-r--r--gdb/testsuite/gdb.base/spu.ld202
-rw-r--r--gdb/testsuite/gdb.base/stack-checking.c4
-rw-r--r--gdb/testsuite/gdb.cell/arch.exp116
-rw-r--r--gdb/testsuite/gdb.cell/break-spu.c43
-rw-r--r--gdb/testsuite/gdb.cell/break.c71
-rw-r--r--gdb/testsuite/gdb.cell/break.exp103
-rw-r--r--gdb/testsuite/gdb.cell/bt-spu.c30
-rw-r--r--gdb/testsuite/gdb.cell/bt.c101
-rw-r--r--gdb/testsuite/gdb.cell/bt.exp91
-rw-r--r--gdb/testsuite/gdb.cell/bt2-spu.c30
-rw-r--r--gdb/testsuite/gdb.cell/core.exp105
-rw-r--r--gdb/testsuite/gdb.cell/coremaker-spu.c46
-rw-r--r--gdb/testsuite/gdb.cell/coremaker.c70
-rw-r--r--gdb/testsuite/gdb.cell/data-spu.c36
-rw-r--r--gdb/testsuite/gdb.cell/data.c72
-rw-r--r--gdb/testsuite/gdb.cell/data.exp125
-rw-r--r--gdb/testsuite/gdb.cell/dwarfaddr.S190
-rw-r--r--gdb/testsuite/gdb.cell/dwarfaddr.exp53
-rw-r--r--gdb/testsuite/gdb.cell/ea-cache-spu.c41
-rw-r--r--gdb/testsuite/gdb.cell/ea-cache.c64
-rw-r--r--gdb/testsuite/gdb.cell/ea-cache.exp90
-rw-r--r--gdb/testsuite/gdb.cell/ea-standalone.c34
-rw-r--r--gdb/testsuite/gdb.cell/ea-standalone.exp64
-rw-r--r--gdb/testsuite/gdb.cell/ea-test.c33
-rw-r--r--gdb/testsuite/gdb.cell/ea-test.exp124
-rw-r--r--gdb/testsuite/gdb.cell/f-regs.exp89
-rw-r--r--gdb/testsuite/gdb.cell/fork-spu.c47
-rw-r--r--gdb/testsuite/gdb.cell/fork.c77
-rw-r--r--gdb/testsuite/gdb.cell/fork.exp86
-rw-r--r--gdb/testsuite/gdb.cell/gcore.exp108
-rw-r--r--gdb/testsuite/gdb.cell/mem-access-spu.c36
-rw-r--r--gdb/testsuite/gdb.cell/mem-access.c67
-rw-r--r--gdb/testsuite/gdb.cell/mem-access.exp170
-rw-r--r--gdb/testsuite/gdb.cell/ptype.exp145
-rw-r--r--gdb/testsuite/gdb.cell/registers.exp106
-rw-r--r--gdb/testsuite/gdb.cell/size-spu.c53
-rw-r--r--gdb/testsuite/gdb.cell/size.c87
-rw-r--r--gdb/testsuite/gdb.cell/sizeof.exp120
-rw-r--r--gdb/testsuite/gdb.cell/solib-symbol.exp79
-rw-r--r--gdb/testsuite/gdb.cell/solib.exp86
-rw-r--r--gdb/testsuite/gdb.cp/bs15503.exp5
-rw-r--r--gdb/testsuite/gdb.cp/cpexprs.exp5
-rw-r--r--gdb/testsuite/gdb.cp/exception.exp5
-rw-r--r--gdb/testsuite/gdb.cp/gdb2495.exp5
-rw-r--r--gdb/testsuite/gdb.cp/mb-templates.exp5
-rw-r--r--gdb/testsuite/gdb.cp/pr9167.exp5
-rw-r--r--gdb/testsuite/gdb.cp/userdef.exp5
-rw-r--r--gdb/testsuite/gdb.xml/tdesc-regs.exp10
-rw-r--r--gdb/testsuite/lib/cell.exp181
59 files changed, 29 insertions, 4143 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e86091e..64c7d38 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,32 @@
+2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdb.arch/spu-info.exp: Remove file.
+ * gdb.arch/spu-info.c: Remove file.
+ * gdb.arch/spu-ls.exp: Remove file.
+ * gdb.arch/spu-ls.c: Remove file.
+
+ * gdb.asm/asm-source.exp: Remove support for spu*-*-*.
+ * gdb.asm/spu.inc: Remove file.
+
+ * gdb.base/dump.exp: Remove support for spu*-*-*.
+ * gdb.base/stack-checking.exp: Likewise.
+ * gdb.base/overlays.exp: Likewise.
+ * gdb.base/ovlymgr.c: Likewise.
+ * gdb.base/spu.ld: Remove file.
+
+ * gdb.cp/bs15503.exp: Remove support for spu*-*-*.
+ * gdb.cp/cpexprs.exp: Likewise.
+ * gdb.cp/exception.exp: Likewise.
+ * gdb.cp/gdb2495.exp: Likewise.
+ * gdb.cp/mb-templates.exp: Likewise.
+ * gdb.cp/pr9167.exp: Likewise.
+ * gdb.cp/userdef.exp: Likewise.
+
+ * gdb.xml/tdesc-regs.exp: Remove support for spu*-*-*.
+
+ * gdb.cell: Remove directory.
+ * lib/cell.exp: Remove file.
+
2019-09-19 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_test): Eliminate "^FOOBAR$" pattern.
diff --git a/gdb/testsuite/gdb.arch/spu-info.c b/gdb/testsuite/gdb.arch/spu-info.c
deleted file mode 100644
index 3046525..0000000
--- a/gdb/testsuite/gdb.arch/spu-info.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* Copyright 2007-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- This file is part of the gdb testsuite.
-
- Contributed by Markus Deuling <deuling@de.ibm.com>.
- Tests for 'info spu' commands. */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <spu_mfcio.h>
-
-
-/* PPE-assisted call interface. */
-void
-send_to_ppe (unsigned int signalcode, unsigned int opcode, void *data)
-{
- __vector unsigned int stopfunc =
- {
- signalcode, /* stop */
- (opcode << 24) | (unsigned int) data,
- 0x4020007f, /* nop */
- 0x35000000 /* bi $0 */
- };
-
- void (*f) (void) = (void *) &stopfunc;
- asm ("sync");
- f ();
-}
-
-/* PPE-assisted call to mmap from SPU. */
-unsigned long long
-mmap_ea (unsigned long long start, size_t length,
- int prot, int flags, int fd, off_t offset)
-{
- struct mmap_args
- {
- unsigned long long start __attribute__ ((aligned (16)));
- size_t length __attribute__ ((aligned (16)));
- int prot __attribute__ ((aligned (16)));
- int flags __attribute__ ((aligned (16)));
- int fd __attribute__ ((aligned (16)));
- off_t offset __attribute__ ((aligned (16)));
- } args;
-
- args.start = start;
- args.length = length;
- args.prot = prot;
- args.flags = flags;
- args.fd = fd;
- args.offset = offset;
-
- send_to_ppe (0x2101, 11, &args);
- return args.start;
-}
-
-/* This works only in a Linux environment with <= 1024 open
- file descriptors for one process. Result is the file
- descriptor for the current context if available. */
-int
-find_context_fd (void)
-{
- int dir_fd = -1;
- int i;
-
- for (i = 0; i < 1024; i++)
- {
- struct stat stat;
-
- if (fstat (i, &stat) < 0)
- break;
- if (S_ISDIR (stat.st_mode))
- dir_fd = dir_fd == -1 ? i : -2;
- }
- return dir_fd < 0 ? -1 : dir_fd;
-}
-
-/* Open the context file and return the file handler. */
-int
-open_context_file (int context_fd, char *name, int flags)
-{
- char buf[128];
-
- if (context_fd < 0)
- return -1;
-
- sprintf (buf, "/proc/self/fd/%d/%s", context_fd, name);
- return open (buf, flags);
-}
-
-
-int
-do_event_test ()
-{
- spu_write_event_mask (MFC_MULTI_SRC_SYNC_EVENT); /* 0x1000 */ /* Marker Event */
- spu_write_event_mask (MFC_PRIV_ATTN_EVENT); /* 0x0800 */
- spu_write_event_mask (MFC_LLR_LOST_EVENT); /* 0x0400 */
- spu_write_event_mask (MFC_SIGNAL_NOTIFY_1_EVENT); /* 0x0200 */
- spu_write_event_mask (MFC_SIGNAL_NOTIFY_2_EVENT); /* 0x0100 */
- spu_write_event_mask (MFC_OUT_MBOX_AVAILABLE_EVENT); /* 0x0080 */
- spu_write_event_mask (MFC_OUT_INTR_MBOX_AVAILABLE_EVENT); /* 0x0040 */
- spu_write_event_mask (MFC_DECREMENTER_EVENT); /* 0x0020 */
- spu_write_event_mask (MFC_IN_MBOX_AVAILABLE_EVENT); /* 0x0010 */
- spu_write_event_mask (MFC_COMMAND_QUEUE_AVAILABLE_EVENT); /* 0x0008 */
- spu_write_event_mask (MFC_LIST_STALL_NOTIFY_EVENT); /* 0x0002 */
- spu_write_event_mask (MFC_TAG_STATUS_UPDATE_EVENT); /* 0x0001 */
-
- return 0;
-}
-
-int
-do_dma_test ()
-{
- #define MAP_FAILED (-1ULL)
- #define PROT_READ 0x1
- #define MAP_PRIVATE 0x002
- #define BSIZE 128
- static char buf[BSIZE] __attribute__ ((aligned (128)));
- char *file = "/var/tmp/tmp_buf";
- struct stat fdstat;
- int fd, cnt;
- unsigned long long src;
-
- /* Create a file and fill it with some bytes. */
- fd = open (file, O_CREAT | O_RDWR | O_TRUNC, 0777);
- if (fd == -1)
- return -1;
- memset ((void *)buf, '1', BSIZE);
- write (fd, buf, BSIZE);
- write (fd, buf, BSIZE);
- memset ((void *)buf, 0, BSIZE);
-
- if (fstat (fd, &fdstat) != 0
- || !fdstat.st_size)
- return -2;
-
- src = mmap_ea(0ULL, fdstat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
- if (src == MAP_FAILED)
- return -3;
-
- /* Copy some data via DMA. */
- mfc_get (&buf, src, BSIZE, 5, 0, 0); /* Marker DMA */
- mfc_write_tag_mask (1<<5); /* Marker DMAWait */
- spu_mfcstat (MFC_TAG_UPDATE_ALL);
-
- /* Close the file. */
- close (fd);
-
- return cnt;
-}
-
-int
-do_mailbox_test ()
-{
- /* Write to SPU Outbound Mailbox. */
- if (spu_stat_out_mbox ()) /* Marker Mbox */
- spu_write_out_mbox (0x12345678);
-
- /* Write to SPU Outbound Interrupt Mailbox. */
- if (spu_stat_out_intr_mbox ())
- spu_write_out_intr_mbox (0x12345678);
-
- return 0; /* Marker MboxEnd */
-}
-
-int
-do_signal_test ()
-{
- struct stat fdstat;
- int context_fd = find_context_fd ();
- int ret, buf, fd;
-
- buf = 23; /* Marker Signal */
- /* Write to signal1. */
- fd = open_context_file (context_fd, "signal1", O_RDWR);
- if (fstat (fd, &fdstat) != 0)
- return -1;
- ret = write (fd, &buf, sizeof (int));
- close (fd); /* Marker Signal1 */
-
- /* Write to signal2. */
- fd = open_context_file (context_fd, "signal2", O_RDWR);
- if (fstat (fd, &fdstat) != 0)
- return -1;
- ret = write (fd, &buf, sizeof (int));
- close (fd); /* Marker Signal2 */
-
- /* Read signal1. */
- if (spu_stat_signal1 ())
- ret = spu_read_signal1 ();
-
- /* Read signal2. */
- if (spu_stat_signal2 ())
- ret = spu_read_signal2 (); /* Marker SignalRead */
-
- return 0;
-}
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- int res;
-
- /* info spu event */
- res = do_event_test ();
-
- /* info spu dma */
- res = do_dma_test ();
-
- /* info spu mailbox */
- res = do_mailbox_test ();
-
- /* info spu signal */
- res = do_signal_test ();
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.arch/spu-info.exp b/gdb/testsuite/gdb.arch/spu-info.exp
deleted file mode 100644
index f840251..0000000
--- a/gdb/testsuite/gdb.arch/spu-info.exp
+++ /dev/null
@@ -1,241 +0,0 @@
-# Copyright 2007-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# This file is part of the gdb testsuite.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-# Tests for 'info spu' commands.
-
-
-if { ![istarget "spu-*-elf"] } then {
- verbose "Skipping SPU-only testcase"
- return
-}
-
-standard_testfile
-
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
- fail "cannot compile test program"
- return -1
-}
-
-
-# Continue to MARKER
-proc c_to { marker } {
- global srcfile
- set line [gdb_get_line_number $marker]
- gdb_test "break $line" \
- "Breakpoint.*at.*file.*$srcfile.*line $line.*" \
- "break $line"
- gdb_test "continue" \
- "Continuing.*Breakpoint.*at.*$srcfile.*$line.*" \
- "continue to $line"
-}
-
-
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Check the help.
-gdb_test "info spu" \
- ".*info spu.* must be followed by the name of an SPU facility.*" \
- "info spu"
-gdb_test "help info spu" \
- "Various SPU specific commands.*List of info spu subcommands.*" \
- "help info spu"
-
-gdb_test "help info spu dma" \
- "Display MFC DMA status." \
- "help info spu dma"
-gdb_test "help info spu event" \
- "Display SPU event facility status." \
- "help info spu event"
-gdb_test "help info spu mailbox" \
- "Display SPU mailbox facility status." \
- "help info spu mailbox"
-gdb_test "help info spu proxydma" \
- "Display MFC Proxy-DMA status." \
- "help info spu proxydma"
-gdb_test "help info spu signal" \
- "Display SPU signal notification facility status." \
- "help info spu signal"
-
-
-# architecture should be spu:256K.
-gdb_test "show architecture" \
- "The target architecture is set automatically.*currently spu:256K.*" \
- "architecture = spu256K"
-
-# 'info spu event'.
-gdb_test "info spu event" \
- "Event Status.*Event Mask.*" \
- "info spu event"
-
-# 'info spu signal'.
-gdb_test "info spu signal" \
- "Signal 1 not pending.*\(Type.*\).*Signal 2 not pending.*\(Type.*\).*" \
- "info spu signal"
-
-# 'info spu mailbox'.
-gdb_test "info spu mailbox" \
- "" \
- "info spu mailbox"
-
-# 'info spu dma'.
-gdb_test "info spu dma" \
- "Tag-Group Status.*Tag-Group Mask.*Stall-and-Notify .*Atomic Cmd Status.*" \
- "info spu dma"
-
-# 'info spu proxydma'.
-gdb_test "info spu proxydma" \
- "Tag-Group Status.*Tag-Group Mask.*" \
- "info spu proxydma"
-
-# Event tests.
-c_to "Marker Event"
-gdb_test "info spu event" \
- "Event Status 0x00000000.*Event Mask 0x00000000.*" \
- "empty event status"
-
-# MFC_MULTI_SRC_SYNC_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00001000.*" \
- "event mask 0x1000"
-# MFC_PRIV_ATTN_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000800.*" \
- "event mask 0x0800"
-# MFC_LLR_LOST_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000400.*" \
- "event mask 0x0400"
-# MFC_SIGNAL_NOTIFY_1_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000200.*" \
- "event mask 0x0200"
-# MFC_SIGNAL_NOTIFY_2_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000100.*" \
- "event mask 0x0100"
-# MFC_OUT_MBOX_AVAILABLE_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000080.*" \
- "event mask 0x0080"
-# MFC_OUT_INTR_MBOX_AVAILABLE_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000040.*" \
- "event mask 0x0040"
-# MFC_DECREMENTER_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000020.*" \
- "event mask 0x0020"
-# MFC_IN_MBOX_AVAILABLE_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000010.*" \
- "event mask 0x0010"
-# MFC_COMMAND_QUEUE_AVAILABLE_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000008.*" \
- "event mask 0x0008"
-# MFC_LIST_STALL_NOTIFY_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000002.*" \
- "event mask 0x0002"
-# MFC_TAG_STATUS_UPDATE_EVENT.
-gdb_test "next" "" "next"
-gdb_test "info spu event" \
- "Event Status 0x0000.*Event Mask 0x00000001.*" \
- "event mask 0x0001"
-
-
-# DMA tests.
-# 'info spu dma' should be empty.
-c_to "Marker DMA"
-gdb_test "info spu dma" \
- "Tag-Group Status.*0x00000000.*Tag-Group Mask.*0x00000000.*Stall-and-Notify.*0x00000000.*Atomic Cmd Status.*0x00000000\[\r\n\]+" \
- "info spu dma (empty)"
-
-# 'info spu dma' should be filled with some data.
-c_to "Marker DMAWait"
-gdb_test "next" "" "next"
-gdb_test "info spu dma" \
- "Tag-Group Status.*0x00000000.*Tag-Group Mask.*0x00000020.*Stall-and-Notify.*0x00000000.*Atomic Cmd Status.*0x00000000.*Opcode.*Tag.*TId.*RId.*EA.*LSA.*Size.*LstAddr.*LstSize.*E.*get.*5.*0.*0.*0x00080\[ \r\n\]+" \
- "info spu dma (non-empty)"
-gdb_test "finish" "" "finish"
-
-# Mailbox Test
-# 'info spu mailbox' should be empty.
-c_to "Marker Mbox"
-set msg "info spu mailbox"
-gdb_test_multiple "info spu mailbox" $msg {
- -re "$gdb_prompt $" {
- pass $msg
- }
- -re "SPU Outbound Mailbox.*0x.*SPU Outbound Interrupt Mailbox.*0x.*$gdb_prompt $" {
- # Older kernels had a bug that caused them to return arbitrary values
- # when attempting to read from an empty mailbox via spufs.
- xfail $msg
- }
-}
-
-# 'info spu mailbox' should now contain data.
-c_to "Marker MboxEnd"
-gdb_test "info spu mailbox" \
- "SPU Outbound Mailbox.*0x12345678.*SPU Outbound Interrupt Mailbox.*0x12345678.*" \
- "info spu mailbox"
-
-# Signal Test
-# 'info spu signal'.
-c_to "Marker Signal"
-gdb_test "info spu signal" \
- "Signal 1 not pending.*\(Type.*\).*Signal 2 not pending.*\(Type.*\).*" \
- "info spu signal"
-
-# 'info spu signal' with signal1 pending.
-c_to "Marker Signal1"
-gdb_test "info spu signal" \
- "Signal 1 control word 0x00000017.*Signal 2 not pending.*\(Type.*\).*" \
- "info spu signal"
-
-# 'info spu signal' with signal1 and signal2 pending.
-c_to "Marker Signal2"
-gdb_test "info spu signal" \
- "Signal 1 control word 0x00000017.*Signal 2 control word 0x00000017.*" \
- "info spu signal"
-
-# Read signal1. Only signal2 is pending.
-c_to "Marker SignalRead"
-gdb_test "info spu signal" \
- "Signal 1 not pending.*Signal 2 control word 0x00000017.*" \
- "info spu signal"
-
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.arch/spu-ls.c b/gdb/testsuite/gdb.arch/spu-ls.c
deleted file mode 100644
index f1a2049..0000000
--- a/gdb/testsuite/gdb.arch/spu-ls.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2010-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- This file is part of the gdb testsuite.
-
- Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
- Tests for SPU local-store access. */
-
-char *ptr = (char *)0x12345678;
-
-char array[256];
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.arch/spu-ls.exp b/gdb/testsuite/gdb.arch/spu-ls.exp
deleted file mode 100644
index af0b1ac..0000000
--- a/gdb/testsuite/gdb.arch/spu-ls.exp
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2010-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# This file is part of the gdb testsuite.
-#
-# Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
-# Tests for SPU local-store access.
-
-if { ![istarget "spu-*-elf"] } then {
- verbose "Skipping SPU-only testcase"
- return
-}
-
-standard_testfile
-
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
- fail "cannot compile test program"
- return -1
-}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-gdb_test "print ptr" " = 0x12345678 \".*\"" "print ptr"
-gdb_test_no_output "set ptr = array + \$lslr + 1" "set ptr = array + \$lslr + 1"
-gdb_test_no_output "set array\[0\] = 1" "set array\[0\] = 1"
-gdb_test "print *ptr" " = 1 '\\\\001'" "print *ptr"
-gdb_test_no_output "set *ptr = 2" "set *ptr = 2"
-gdb_test "print array\[0\]" " = 2 '\\\\002'" "print array\[0\]"
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 1bc384e..b10ee17 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -128,11 +128,6 @@ switch -glob -- [istarget] {
set asm-flags "-xarch=v9 -I${srcdir}/${subdir} $obj_include"
set debug-flags "-gdwarf-2"
}
- "spu*-*-*" {
- set asm-arch spu
- set asm-flags "-I${srcdir}/${subdir} $obj_include --no-warn"
- set debug-flags "-gdwarf-2"
- }
"xstormy16-*-*" {
set asm-arch xstormy16
set debug-flags "-gdwarf-2"
diff --git a/gdb/testsuite/gdb.asm/spu.inc b/gdb/testsuite/gdb.asm/spu.inc
deleted file mode 100644
index aabceb8..0000000
--- a/gdb/testsuite/gdb.asm/spu.inc
+++ /dev/null
@@ -1,42 +0,0 @@
- comment "subroutine prologue"
- .macro gdbasm_enter
- stqd $lr, 16($sp)
- stqd $sp, -32($sp)
- ai $sp, $sp, -32
- .endm
-
- comment "subroutine epilogue"
- .macro gdbasm_leave
- ai $sp, $sp, 32
- lqd $lr, 16($sp)
- bi $lr
- .endm
-
- .macro gdbasm_call subr
- brsl $lr, \subr
- .endm
-
- .macro gdbasm_several_nops
- nop
- nop
- nop
- nop
- .endm
-
- comment "exit (0)"
- .macro gdbasm_exit0
- stop 0x2000
- stop
- stop
- stop
- .endm
-
- comment "startup"
- .macro gdbasm_startup
- il $0, 0
- ila $sp, 16368
- stqd $0, 0($sp)
- stqd $sp, -32($sp)
- ai $sp, $sp, -32
- stqd $0, 16($sp)
- .endm
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 52ba5f8..77db179 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -30,12 +30,6 @@ if [istarget "alpha*-*-*"] then {
lappend options "additional_flags=-Wl,-taso"
}
-if {[istarget "spu*-*-*"]} then {
- # The internal address format used for the combined Cell/B.E.
- # debugger requires 64-bit.
- set is64bitonly "yes"
-}
-
# Debian9/Ubuntu16.10 onwards default to PIE enabled. Ensure it is disabled as
# this causes addresses to be out of range for IHEX.
lappend options {nopie}
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index d8ac619..388b87f 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -24,9 +24,6 @@ set data_overlays 1
if [istarget "m32r-*-*"] then {
set linker_script "${srcdir}/${subdir}/m32r.ld"
-} elseif [istarget "spu-*-*"] then {
- set linker_script "${srcdir}/${subdir}/spu.ld"
- set data_overlays 0
} else {
verbose "Skipping overlay test -- not implemented for this target."
return
diff --git a/gdb/testsuite/gdb.base/ovlymgr.c b/gdb/testsuite/gdb.base/ovlymgr.c
index 533606b..f4958ed 100644
--- a/gdb/testsuite/gdb.base/ovlymgr.c
+++ b/gdb/testsuite/gdb.base/ovlymgr.c
@@ -5,18 +5,6 @@
#include "ovlymgr.h"
-#ifdef __SPU__
-/* SPU tool chain provides its own overlay manager. */
-bool
-OverlayLoad (unsigned long ovlyno)
-{
-}
-bool
-OverlayUnload (unsigned long ovlyno)
-{
-}
-#else /* __SPU__ */
-
/* Local functions and data: */
extern unsigned long _ovly_table[][4];
@@ -243,4 +231,3 @@ ovly_copy (unsigned long dst, unsigned long src, long size)
return;
}
-#endif /* __SPU__ */
diff --git a/gdb/testsuite/gdb.base/spu.ld b/gdb/testsuite/gdb.base/spu.ld
deleted file mode 100644
index 0cd5a85..0000000
--- a/gdb/testsuite/gdb.base/spu.ld
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Script for -z combreloc: combine and sort reloc sections */
-OUTPUT_FORMAT("elf32-spu", "elf32-spu",
- "elf32-spu")
-OUTPUT_ARCH(spu)
-ENTRY(_start)
-SEARCH_DIR("/usr/spu/lib");
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-SECTIONS
-{
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0); . = 0;
- .interrupt : { KEEP(*(.interrupt)) }
- .interp : { *(.interp) }
- .hash : { *(.hash) }
- .dynsym : { *(.dynsym) }
- .dynstr : { *(.dynstr) }
- .gnu.version : { *(.gnu.version) }
- .gnu.version_d : { *(.gnu.version_d) }
- .gnu.version_r : { *(.gnu.version_r) }
- .rel.dyn :
- {
- *(.rel.init)
- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
- *(.rel.fini)
- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
- *(.rel.data.rel.ro*)
- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
- *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
- *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
- *(.rel.ctors)
- *(.rel.dtors)
- *(.rel.got)
- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
- }
- .rela.dyn :
- {
- *(.rela.init)
- *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
- *(.rela.fini)
- *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
- *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
- *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
- *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
- *(.rela.ctors)
- *(.rela.dtors)
- *(.rela.got)
- *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
- }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
- .init :
- {
- KEEP (*(.init))
- } =0
- .plt : { *(.plt) }
- .text :
- {
- *(EXCLUDE_FILE (foo.o bar.o baz.o grbx.o) .text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- *(.spu.elf)
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } =0
- .fini :
- {
- KEEP (*(.fini))
- } =0
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
- .rodata1 : { *(.rodata1) }
- .eh_frame_hdr : { *(.eh_frame_hdr) }
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
- /* Adjust the address for the data segment. We want to adjust up to
- the same address within the page on the next page up. */
- . = ALIGN(0x80);
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- . = ALIGN(16);
- PROVIDE (__preinit_array_start = .);
- .preinit_array : { KEEP (*(.preinit_array)) }
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) }
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) }
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- }
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- }
- .jcr : { KEEP (*(.jcr)) }
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
- .dynamic : { *(.dynamic) }
- .got : { *(.got.plt) *(.got) }
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- }
- .data1 : { *(.data1) }
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(16);
- }
- .toe ALIGN(128) : { *(.toe) } = 0
- . = ALIGN(16);
- OVERLAY :
- {
- .ovly0 { foo.o(.text) }
- .ovly1 { bar.o(.text) }
- }
- OVERLAY :
- {
- .ovly2 { baz.o(.text) }
- .ovly3 { grbx.o(.text) }
- }
- _end = .;
- PROVIDE (end = .);
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .note.spu_name 0 : { *(.note.spu_name) }
- PROVIDE (__stack = 0x3fff0);
- /DISCARD/ : { *(.note.GNU-stack) }
-}
-
diff --git a/gdb/testsuite/gdb.base/stack-checking.c b/gdb/testsuite/gdb.base/stack-checking.c
index e8af6a1..8f6dedb 100644
--- a/gdb/testsuite/gdb.base/stack-checking.c
+++ b/gdb/testsuite/gdb.base/stack-checking.c
@@ -36,11 +36,7 @@ void medium_frame ()
void big_frame ()
{
-#ifdef __SPU__
- char S [131072];
-#else
char S [524188];
-#endif
small_frame ();
}
diff --git a/gdb/testsuite/gdb.cell/arch.exp b/gdb/testsuite/gdb.cell/arch.exp
deleted file mode 100644
index dbfb20c..0000000
--- a/gdb/testsuite/gdb.cell/arch.exp
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcase checks if the "show architecture" command works properly.
-
-load_lib cell.exp
-
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-# No programm running, default architecture should be powerpc:common.
-gdb_test "show architecture" \
- "The target architecture is set automatically.*currently powerpc:common.*" \
- "startup architecture is powerpc:common"
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# In PPU thread, architecture should be powerpc:common.
-gdb_test "show architecture" \
- "The target architecture is set automatically.*currently powerpc:common.*" \
- "ppu architecture is powerpc:common"
-
-# Switch to SPU thread.
-cont_spu_main
-check_spu_arch ""
-
-# Remember thread ID of first thread to hit SPU main.
-send_gdb "thread\n"
-gdb_expect 10 {
- -re "Current thread is (\[0-9\]*) .*\r\n$gdb_prompt $" {
- pass "retrieve current thread"
- set thread_id $expect_out(1,string)
- }
- -re "$gdb_prompt $" {
- fail "retrieve current thread"
- return 0
- }
- timeout {
- fail "retrieve current thread (timed out)"
- return 0
- }
-}
-
-# Stress Test: Switching from PPU- to SPU-Thread and back 'rep' times.
-set rep 100
-for {set i 0} {$i < $rep} {incr i} {
- # Switch to PPU Thread.
- gdb_test "t 1" \
- "Switching to thread 1.*" \
- "switch back to thread 1 (PPU) #$i"
- # In PPU Thread, architecture should again be powerpc:common.
- gdb_test "show architecture" \
- "The target architecture is set automatically.*currently powerpc:common.*" \
- "ppu architecture is powerpc:common again #$i"
- # Thread switching to SPU.
- gdb_test "t $thread_id" \
- "Switching to thread $thread_id.*at.*$spu_file.c.*" \
- "switch back to thread $thread_id (spu) #$i"
- # Standing in SPU thread again, architecture should be spu:256K again.
- check_spu_arch "spu architecture is spu256K again #$i"
-}
-# End of Stress Test loop
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/break-spu.c b/gdb/testsuite/gdb.cell/break-spu.c
deleted file mode 100644
index f28a843..0000000
--- a/gdb/testsuite/gdb.cell/break-spu.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-
-void foo (void);
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- int i;
-
- printf ("Hello World! from spu\n");
-
- i = 5;
- foo ();
- printf ("i = %d\n", i);
-
- return 0;
-}
-
-void
-foo (void)
-{
- printf ("in foo\n");
-}
diff --git a/gdb/testsuite/gdb.cell/break.c b/gdb/testsuite/gdb.cell/break.c
deleted file mode 100644
index 95108d7..0000000
--- a/gdb/testsuite/gdb.cell/break.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t break_spu;
-#define nr_t 5
-
-void *
-spe_thread (void * arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &break_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-main (void)
-{
- int thread_id[nr_t];
- pthread_t pts[nr_t];
- spe_context_ptr_t ctx[nr_t];
- int value = 1;
- int cnt;
-
- for (cnt = 0; cnt < nr_t; cnt++)
- {
- ctx[cnt] = spe_context_create (0, NULL);
- thread_id[cnt]
- = pthread_create (&pts[cnt], NULL, &spe_thread, &ctx[cnt]);
- }
-
- for (cnt = 0; cnt < nr_t; cnt++)
- pthread_join (pts[cnt], NULL);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- spe_context_destroy (ctx[cnt]);
-
- return 0;
-}
-
-void
-foo ()
-{
- printf ("foo in break\n");
- return;
-}
diff --git a/gdb/testsuite/gdb.cell/break.exp b/gdb/testsuite/gdb.cell/break.exp
deleted file mode 100644
index 73e60ad..0000000
--- a/gdb/testsuite/gdb.cell/break.exp
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tests setting and deleting breakpoints on PPU and SPU.
-
-load_lib cell.exp
-
-set testfile "break"
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-# Delete breakpoints before starting the application. The debugger
-# shouldn't prompt for anything.
-gdb_test "delete breakpoints" \
- "" \
- "no prompt when deleting non-existing breakpoints"
-
-gdb_test "break main" \
- "Breakpoint.*at.* file .*$testfile.c, line.*" \
- "breakpoint main in ppu"
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-delete_breakpoints
-
-# Re-set breakpoint at main in PPU binary.
-gdb_test "break main" \
- "Breakpoint.*at.* file .*$testfile.c, line.*" \
- "breakpoint function"
-
-# Set breakpoint in SPU binary.
-send_gdb "break $spu_file.c:10\n"
-gdb_expect {
- -re ".*$spu_file.c.*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "Breakpoint.*$spu_file.*pending." "set pending breakpoint"
- }
- timeout { fail "timeout while setting breakpoint in spu binary" }
-}
-
-# Check breakpoints.
-gdb_test "info break" \
- "Num\[ \]+Type\[ \]+Disp\[ \]+Enb\[ \]+Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y.*in main at.*$testfile.c.*
-\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*$spu_file.c:10.*" \
- "breakpoint info"
-
-gdb_test "continue" \
- "Continuing.*Switching to Thread.*Breakpoint.*main.*at.*$spu_file.c.*" \
- "continuing to spu thread"
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/bt-spu.c b/gdb/testsuite/gdb.cell/bt-spu.c
deleted file mode 100644
index 6e83361..0000000
--- a/gdb/testsuite/gdb.cell/bt-spu.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <sys/syscall.h>
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- __send_to_ppe (0x2111, 0, NULL);
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/bt.c b/gdb/testsuite/gdb.cell/bt.c
deleted file mode 100644
index 31fb4ea..0000000
--- a/gdb/testsuite/gdb.cell/bt.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t bt_spu;
-extern spe_program_handle_t bt2_spu;
-#define nr_t 5
-
-void *
-spe_thread (void * arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &bt_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-indirect_handler (unsigned char *base, unsigned long offset)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t ctx = spe_context_create (0, NULL);
-
- spe_program_load (ctx, &bt2_spu);
- spe_context_run (ctx, &entry, flags, NULL, NULL, NULL);
-
- return 0;
-}
-
-static pthread_mutex_t crash_mutex = PTHREAD_MUTEX_INITIALIZER;
-static int crash_count = 0;
-
-int
-crash_handler (unsigned char *base, unsigned long offset)
-{
- int count;
-
- pthread_mutex_lock (&crash_mutex);
- count = ++crash_count;
- pthread_mutex_unlock (&crash_mutex);
-
- while (count < nr_t)
- ;
-
- abort ();
-}
-
-int
-main (void)
-{
- int thread_id[nr_t];
- pthread_t pts[nr_t];
- spe_context_ptr_t ctx[nr_t];
- int value = 1;
- int cnt;
-
- spe_callback_handler_register (indirect_handler, 0x11, SPE_CALLBACK_NEW);
- spe_callback_handler_register (crash_handler, 0x12, SPE_CALLBACK_NEW);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- {
- ctx[cnt] = spe_context_create (0, NULL);
- thread_id[cnt]
- = pthread_create (&pts[cnt], NULL, &spe_thread, &ctx[cnt]);
- }
-
- for (cnt = 0; cnt < nr_t; cnt++)
- pthread_join (pts[cnt], NULL);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- spe_context_destroy (ctx[cnt]);
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/bt.exp b/gdb/testsuite/gdb.cell/bt.exp
deleted file mode 100644
index cacf7c2..0000000
--- a/gdb/testsuite/gdb.cell/bt.exp
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tests mixed-architecture backtrace support
-
-load_lib cell.exp
-
-set testfile "bt"
-set ppu_file "bt"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "bt-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-set spu2_file "bt2-spu"
-set spu2_src ${srcdir}/${subdir}/${spu2_file}.c
-set spu2_bin [standard_output_file ${spu2_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binaries.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_spu $spu2_src $spu2_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_cell_embedspu $spu2_bin $spu2_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o $spu2_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-delete_breakpoints
-gdb_test "continue" ".*received signal SIGABRT, Aborted.*"
-
-gdb_test "backtrace" ".*abort.*crash_handler.*base.*offset.*<cross-architecture call>.*main.*speid.*argp.*envp.*at.*$spu2_file.c.*<cross-architecture call>.*spe_context_run.*indirect_handler.*base.*offset.*<cross-architecture call>.*main.*speid.*argp.*envp.*at.*$spu_file.c.*<cross-architecture call>.*spe_context_run.*spe_thread.*at.*$ppu_file.c.*"
-
-for {set thread_id 2} {$thread_id < 7} {incr thread_id} {
- gdb_test "t $thread_id" \
- "Switching to thread $thread_id.*" \
- "switch to thread $thread_id"
- gdb_test "backtrace" \
- ".*crash_handler.*base.*offset.*<cross-architecture call>.*main.*speid.*argp.*envp.*at.*$spu2_file.c.*<cross-architecture call>.*spe_context_run.*indirect_handler.*base.*offset.*<cross-architecture call>.*main.*speid.*argp.*envp.*at.*$spu_file.c.*<cross-architecture call>.*spe_context_run.*spe_thread.*at.*$ppu_file.c.*" \
- "backtrace in thread $thread_id"
-}
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/bt2-spu.c b/gdb/testsuite/gdb.cell/bt2-spu.c
deleted file mode 100644
index 67ed34c..0000000
--- a/gdb/testsuite/gdb.cell/bt2-spu.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <sys/syscall.h>
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- __send_to_ppe (0x2112, 0, NULL);
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/core.exp b/gdb/testsuite/gdb.cell/core.exp
deleted file mode 100644
index 2de7562..0000000
--- a/gdb/testsuite/gdb.cell/core.exp
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tests mixed-architecture core file support
-
-load_lib cell.exp
-
-set testfile "coremaker"
-set ppu_file "coremaker"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "coremaker-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {![isnative]} then {
- return 0
-}
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-# Run program to generate a core file -- see gdb.base/corefile.exp
-set found 0
-set coredir "${objdir}/${subdir}/coredir.[getpid]"
-file mkdir $coredir
-catch "system \"(cd ${coredir}; ulimit -c unlimited; ${ppu_bin}; true) >/dev/null 2>&1\""
-set names [glob -nocomplain -directory $coredir core.*]
-if {[llength $names] == 1} {
- set corefile [file join $coredir [lindex $names 0]]
- remote_exec build "mv $corefile ${objdir}/${subdir}/corefile"
- set found 1
-}
-remote_exec build "rmdir $coredir"
-if { $found == 0 } {
- warning "can't generate a core file - core tests suppressed - check ulimit -c"
- return 0
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-send_gdb "core-file $objdir/$subdir/corefile\n"
-gdb_expect {
- -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
- pass "core-file command"
- }
- -re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
- pass "core-file command (with bad program name)"
- }
- -re ".*$gdb_prompt $" { fail "core-file command" }
- timeout { fail "(timeout) core-file command" }
-}
-
-gdb_test "backtrace" ".*abort.*main.*at.*$ppu_file.c.*"
-
-for {set thread_id 2} {$thread_id < 7} {incr thread_id} {
- gdb_test "t $thread_id" \
- "Switching to thread $thread_id.*" \
- "switch to thread $thread_id"
- gdb_test "backtrace" \
- ".*terminal_func.*factorial_func.*value=1.*factorial_func.*value=2.*factorial_func.*value=3.*factorial_func.*value=4.*factorial_func.*value=5.*factorial_func.*value=6.*main.*speid.*argp.*envp.*at.*$spu_file.c.*<cross-architecture call>.*spe_context_run.*spe_thread.*at.*$ppu_file.c.*" \
- "backtrace in thread $thread_id"
-}
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/coremaker-spu.c b/gdb/testsuite/gdb.cell/coremaker-spu.c
deleted file mode 100644
index 472660d..0000000
--- a/gdb/testsuite/gdb.cell/coremaker-spu.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <spu_mfcio.h>
-
-void
-terminal_func ()
-{
- spu_write_out_intr_mbox (0);
- spu_read_in_mbox ();
-}
-
-int
-factorial_func (int value)
-{
- if (value > 1)
- value *= factorial_func (value - 1);
-
- terminal_func ();
- return value;
-}
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- factorial_func (6);
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/coremaker.c b/gdb/testsuite/gdb.cell/coremaker.c
deleted file mode 100644
index 741e948..0000000
--- a/gdb/testsuite/gdb.cell/coremaker.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t coremaker_spu;
-#define nr_t 5
-
-void *
-spe_thread (void * arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &coremaker_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-main (void)
-{
- int thread_id[nr_t];
- pthread_attr_t attr;
- pthread_t pts[nr_t];
- spe_context_ptr_t ctx[nr_t];
- unsigned int value;
- int cnt;
-
- /* Use small thread stacks to speed up writing out core file. */
- pthread_attr_init (&attr);
- pthread_attr_setstacksize (&attr, 2*PTHREAD_STACK_MIN);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- {
- ctx[cnt] = spe_context_create (0, NULL);
- thread_id[cnt]
- = pthread_create (&pts[cnt], &attr, &spe_thread, &ctx[cnt]);
- }
-
- pthread_attr_destroy (&attr);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- spe_out_intr_mbox_read (ctx[cnt], &value, 1, SPE_MBOX_ALL_BLOCKING);
-
- abort ();
-}
-
diff --git a/gdb/testsuite/gdb.cell/data-spu.c b/gdb/testsuite/gdb.cell/data-spu.c
deleted file mode 100644
index 56efbbc..0000000
--- a/gdb/testsuite/gdb.cell/data-spu.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- char var_char = 'c';
- short var_short = 7;
- int var_int = 1337;
- long var_long = 123456;
- long long var_longlong = 123456789;
- float var_float = 1.23;
- double var_double = 2.3456;
- long double var_longdouble = 3.45678;
- return 0; /* Marker SPU End */
-}
-
diff --git a/gdb/testsuite/gdb.cell/data.c b/gdb/testsuite/gdb.cell/data.c
deleted file mode 100644
index 7c38461..0000000
--- a/gdb/testsuite/gdb.cell/data.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t data_spu;
-#define nr_t 1
-
-void *
-spe_thread (void *arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &data_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int main (void)
-{
- int thread_id[nr_t];
- pthread_t pts[nr_t];
- spe_context_ptr_t ctx[nr_t];
-
- int cnt;
-
- char var_char = 'c';
- short var_short = 7;
- int var_int = 1337;
- long var_long = 123456;
- long long var_longlong = 123456789;
- float var_float = 1.23;
- double var_double = 2.3456;
- long double var_longdouble = 3.45678;
-
- for (cnt = 0; cnt < nr_t; cnt++)
- {
- ctx[cnt] = spe_context_create(0, NULL);
- thread_id[cnt]
- = pthread_create (&pts[cnt], NULL, &spe_thread, &ctx[cnt]);
- }
-
- for (cnt = 0; cnt < nr_t; cnt++)
- pthread_join (pts[cnt], NULL);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- spe_context_destroy (ctx[cnt]);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.cell/data.exp b/gdb/testsuite/gdb.cell/data.exp
deleted file mode 100644
index f5c0d20..0000000
--- a/gdb/testsuite/gdb.cell/data.exp
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tries to read variables of each kind both on PPU and SPU.
-
-load_lib cell.exp
-
-set testfile "data"
-set ppu_file "data"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "data-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-proc check_var { name value } {
- gdb_test "print $name" \
- ".*=.*$value" \
- "check_var $name = $value"
-}
-
-proc set_var { name value } {
- gdb_test "set var $name = $value" \
- "" \
- "set var $name = $value"
-}
-
-proc dotest { name value } {
- set_var $name $value
- check_var $name $value
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Set values.
-dotest var_char 'z'
-dotest var_short 8
-dotest var_int 321
-dotest var_long 523442
-dotest var_longlong 235354533
-xfail "dotest var_float 33.2113"
-xfail "dotest var_double 2.3456"
-xfail "dotest var_longdouble 3.456789"
-
-gdb_test "break 55" \
- "Breakpoint.*at.*file.*$testfile.c, line 55.*" \
- "set breakpoint"
-gdb_test "continue" \
- "Breakpoint.*at.*$testfile.c.*55.*" \
- "continue to bp at line 55"
-
-# Lookup variables.
-check_var var_char 'c'
-check_var var_short 7
-check_var var_int 1337
-check_var var_long 123456
-check_var var_longlong 123456789
-xfail "check_var var_float 1.23"
-xfail "check_var var_double 2.3456"
-xfail "check_var var_longdouble 3.456789"
-
-cont_spu_main
-c_to "Marker SPU End" $spu_file.c
-
-# In SPU Thread, arch should now be spu:256K.
-check_spu_arch ""
-
-# Lookup variables.
-check_var var_char 'c'
-check_var var_short 7
-check_var var_int 1337
-check_var var_long 123456
-check_var var_longlong 123456789
-xfail "check_var var_float 1.23"
-xfail "check_var var_double 2.3456"
-xfail "check_var var_longdouble 3.456789"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cell/dwarfaddr.S b/gdb/testsuite/gdb.cell/dwarfaddr.S
deleted file mode 100644
index 543da3d..0000000
--- a/gdb/testsuite/gdb.cell/dwarfaddr.S
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Copyright 2010-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- This file is part of the gdb testsuite.
-
- Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
- Tests for SPU addresses resulting from complex DWARF expressions. */
-
- .text
-main:
-.Ltext_s:
-.LFB1:
- stqd $1,-240($1)
- ai $1,$1,-240
- ai $2,$1,32
- ai $2,$2,127
- il $3,127
- andc $3,$2,$3
- il $2,1
- lqd $4,0($3)
- cwd $5,0($3)
- shufb $2,$2,$4,$5
- stqd $2,0($3)
- lqd $1,0($1)
- bi $0
-.LFE1:
- .global main
- .type main,@function
- .size main,.LFE1-.LFB1
-.Ltext_e:
-
- .section .debug_info,"",@progbits
-.Ldebug_info_s:
- .int .debug_info_size-4
- .short 0x2
- .int .Ldebug_abbrev_s
- .byte 0x4
-.Ldie0:
- .uleb128 0x1
- .string "test.c"
- .int .Ltext_s
- .int .Ltext_e
- .byte 0x1
-.Ldie1:
- .uleb128 0x2
- .string "int"
- .byte 0x4
- .byte 0x5
-.Ldie2:
- .uleb128 0x3
- .int .Ldie4-.Ldebug_info_s
- .int .Ldie1-.Ldebug_info_s
-.Ldie3:
- .uleb128 0x4
- .byte 0
- .byte 0xf
- .uleb128 0
-.Ldie4:
- .uleb128 0x5
- .string "main"
- .int .LFB1
- .int .LFE1
- .byte 0x1
- .byte 0x1
- .byte 0x3
- .byte 0x1
- .byte 0x1
- .byte 0x51
-.Ldie5:
- .uleb128 0x6
- .byte 0xe
- .byte 0x91
- .sleb128 0x20
- .byte 0xd
- .int 0x7f
- .byte 0x22
- .byte 0xd
- .int 0xffffff80
- .byte 0x1a
- .string "x"
- .byte 0x1
- .byte 0
- .int .Ldie2-.Ldebug_info_s
- .uleb128 0
- .uleb128 0
-.Ldebug_info_e:
- .set .debug_info_size,.Ldebug_info_e-.Ldebug_info_s
-
-
- .section .debug_abbrev,"",@progbits
-.Ldebug_abbrev_s:
- .uleb128 0x1
- .uleb128 0x11
- .byte 0x1
- .uleb128 0x3
- .uleb128 0x8
- .uleb128 0x11
- .uleb128 0x1
- .uleb128 0x12
- .uleb128 0x1
- .uleb128 0x13
- .uleb128 0xb
- .uleb128 0
- .uleb128 0
-
- .uleb128 0x2
- .uleb128 0x24
- .byte 0
- .uleb128 0x3
- .uleb128 0x8
- .uleb128 0xb
- .uleb128 0xb
- .uleb128 0x3e
- .uleb128 0xb
- .uleb128 0
- .uleb128 0
-
- .uleb128 0x3
- .uleb128 0x1
- .byte 0x1
- .uleb128 0x1
- .uleb128 0x13
- .uleb128 0x49
- .uleb128 0x13
- .uleb128 0
- .uleb128 0
-
- .uleb128 0x4
- .uleb128 0x21
- .byte 0
- .uleb128 0x22
- .uleb128 0xb
- .uleb128 0x2f
- .uleb128 0xb
- .uleb128 0
- .uleb128 0
-
- .uleb128 0x5
- .uleb128 0x2e
- .byte 0x1
- .uleb128 0x3
- .uleb128 0x8
- .uleb128 0x11
- .uleb128 0x1
- .uleb128 0x12
- .uleb128 0x1
- .uleb128 0x27
- .uleb128 0xc
- .uleb128 0x3a
- .uleb128 0xb
- .uleb128 0x3b
- .uleb128 0xb
- .uleb128 0x3f
- .uleb128 0xc
- .uleb128 0x40
- .uleb128 0xa
- .uleb128 0
- .uleb128 0
-
- .uleb128 0x6
- .uleb128 0x34
- .byte 0
- .uleb128 0x2
- .uleb128 0xa
- .uleb128 0x3
- .uleb128 0x8
- .uleb128 0x3a
- .uleb128 0xb
- .uleb128 0x3b
- .uleb128 0xb
- .uleb128 0x49
- .uleb128 0x13
- .uleb128 0
- .uleb128 0
- .uleb128 0
-.Ldebug_abbrev_e:
- .set .debug_abbrev_size,.Ldebug_abbrev_e-.Ldebug_abbrev_s
-
diff --git a/gdb/testsuite/gdb.cell/dwarfaddr.exp b/gdb/testsuite/gdb.cell/dwarfaddr.exp
deleted file mode 100644
index b61cd53..0000000
--- a/gdb/testsuite/gdb.cell/dwarfaddr.exp
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2010-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# This file is part of the gdb testsuite.
-#
-# Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
-# Tests for SPU addresses resulting from complex DWARF expressions.
-
-load_lib cell.exp
-
-set testfile "dwarfaddr"
-set srcfile ${srcdir}/${subdir}/${testfile}.S
-set binary [standard_output_file ${testfile}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $srcfile $binary executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binary}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-gdb_test "print x" " = \\{0 <repeats 16 times>\\}" "print x"
-gdb_test "print &x" " = \\(int \\(\\*\\)\\\[16\\\]\\) 0x\[0-9a-f\]*" "print &x"
-gdb_test "info address x" "Symbol \"x\" is a complex DWARF expression.*DW_OP_and\[\r\n\]+\." "info address x"
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/ea-cache-spu.c b/gdb/testsuite/gdb.cell/ea-cache-spu.c
deleted file mode 100644
index 07b11c1..0000000
--- a/gdb/testsuite/gdb.cell/ea-cache-spu.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <spu_mfcio.h>
-
-__ea int *ppe_int_ptr;
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- printf ("spe.c | argp = 0x%llx\n", argp);
-
-#ifdef __EA32__
- ppe_int_ptr = (__ea int *)(unsigned long)argp;
-#else
- ppe_int_ptr = (__ea int *)argp;
-#endif
- printf ("spe.c | value = %d\n", *ppe_int_ptr);
- *ppe_int_ptr = 42; /* Marker SPUEA */
- printf ("spe.c | value = %d\n", *ppe_int_ptr);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.cell/ea-cache.c b/gdb/testsuite/gdb.cell/ea-cache.c
deleted file mode 100644
index a0a828b..0000000
--- a/gdb/testsuite/gdb.cell/ea-cache.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t ea_cache_spu;
-int int_var = 23;
-
-void *
-spe_thread (void *arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &ea_cache_spu);
- spe_context_run (*ctx, &entry, flags, &int_var, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-main (void)
-{
- spe_context_ptr_t ctx;
- pthread_t pts;
- int thread_id;
-
- printf ("ppe.c | int_var vor %d | adr int_var %p\n", int_var, &int_var);
-
- /* Create SPE context and pthread. */
- ctx = spe_context_create (0, NULL);
- thread_id = pthread_create (&pts, NULL, &spe_thread, &ctx);
-
- /* Join the pthread. */
- pthread_join (pts, NULL);
-
- /* Destroy the SPE context. */
- spe_context_destroy (ctx);
-
- printf ("ppe.c | int_var nach %d\n", int_var);
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/ea-cache.exp b/gdb/testsuite/gdb.cell/ea-cache.exp
deleted file mode 100644
index e9bb709..0000000
--- a/gdb/testsuite/gdb.cell/ea-cache.exp
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# Testcase for ea software managed cache.
-
-load_lib cell.exp
-
-set ppu_file "ea-cache"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "ea-cache-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Set breakpoint in SPU binary.
-cont_spu_main
-c_to "Marker SPUEA" $spu_file.c
-
-gdb_test "p *ppe_int_ptr" \
- ".*=.*23.*" \
- "p *ppe_int_ptr"
-
-gdb_test "set *ppe_int_ptr=42" "" ""
-
-gdb_test "p *ppe_int_ptr" \
- ".*=.*42.*" \
- "p *ppe_int_ptr"
-
-# Now switch to thread 1 (PPU) and look at int_var. ppe_int_ptr points to
-# int_var and should now also contain 42 (ea cache has been flushed).
-gdb_test "t 1" \
- ".*Switching to thread 1.*" \
- "switch to thread 1"
-
-gdb_test "p int_var" \
- ".*=.*42.*" \
- "p int_var on ppu"
-
-gdb_exit
-return 0
-
-
diff --git a/gdb/testsuite/gdb.cell/ea-standalone.c b/gdb/testsuite/gdb.cell/ea-standalone.c
deleted file mode 100644
index 20b9af3..0000000
--- a/gdb/testsuite/gdb.cell/ea-standalone.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <ea.h>
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- int a;
- __ea int *myarray = malloc_ea (3 * sizeof (int));
-
- memset_ea (myarray, 0, 3 * sizeof (int));
- a = ++myarray[0]; /* Marker SPUEA1 */
- printf("a: %d, myarray[0]: %d\n", a, myarray[0]); /* Marker SPUEA2 */
- return 0;
-}
diff --git a/gdb/testsuite/gdb.cell/ea-standalone.exp b/gdb/testsuite/gdb.cell/ea-standalone.exp
deleted file mode 100644
index cae8e98..0000000
--- a/gdb/testsuite/gdb.cell/ea-standalone.exp
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# Testcase for ea software managed cache in a standalone binary.
-
-load_lib cell.exp
-
-set testfile "ea-standalone"
-set srcfile ${srcdir}/${subdir}/${testfile}.c
-set binary [standard_output_file ${testfile}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $srcfile $binary executable {debug}] != "" } {
- unsupported "failed to compile"
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binary}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-c_to "Marker SPUEA1" $testfile.c
-gdb_test "p myarray\[0\]" \
- ".*= 0" \
- "p myarray\[0\]"
-
-c_to "Marker SPUEA2" $testfile.c
-gdb_test "p myarray\[0\]" \
- ".*= 1" \
- "p myarray\[0\]"
-gdb_test "call __cache_flush()" "" "call cache_flush()"
-gdb_test "p myarray\[0\]" \
- ".*= 1" \
- "p myarray\[0\]"
-
-gdb_exit
-return 0
-
-
diff --git a/gdb/testsuite/gdb.cell/ea-test.c b/gdb/testsuite/gdb.cell/ea-test.c
deleted file mode 100644
index efe49c5..0000000
--- a/gdb/testsuite/gdb.cell/ea-test.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-
-__ea int *ppe_pointer;
-int *normal_pointer;
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- static __ea int *local_ppe_pointer;
- static int *local_normal_pointer;
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/ea-test.exp b/gdb/testsuite/gdb.cell/ea-test.exp
deleted file mode 100644
index cbb02f1..0000000
--- a/gdb/testsuite/gdb.cell/ea-test.exp
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# Testcase for __ea pointer
-
-load_lib cell.exp
-
-set testfile "ea-test"
-set source ${srcdir}/${subdir}/${testfile}.c
-set binary [standard_output_file ${testfile}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $source $binary executable {debug}] != "" } {
- unsupported "failed to compile"
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binary}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# p
-gdb_test "p ppe_pointer" \
- "(int.*@__ea).*0x0.*" \
- "p ppe_pointer"
-
-gdb_test "p normal_pointer" \
- "(int.*).*0x0.*" \
- "p normal_pointer"
-
-gdb_test "p local_ppe_pointer" \
- "(int.*@__ea).*0x0.*" \
- "p local_ppe_pointer"
-
-gdb_test "p local_normal_pointer" \
- "(int.*).*0x0.*" \
- "p local_normal_pointer"
-
-# ptype
-gdb_test "ptype ppe_pointer" \
- "type = int.*@__ea" \
- "ptype ppe_pointer"
-
-gdb_test "ptype normal_pointer" \
- "type = int.*" \
- "ptype normal_pointer"
-
-gdb_test "ptype local_ppe_pointer" \
- "type = int.*@__ea" \
- "ptype local_ppe_pointer"
-
-gdb_test "ptype local_normal_pointer" \
- "type = int.*" \
- "ptype local_normal_pointer"
-
-# info locals
-gdb_test "info locals" \
- ".*local_ppe_pointer =.*0x0.*local_normal_pointer =.*0x0.*" \
- "info locals"
-
-# p &
-gdb_test "p &ppe_pointer" \
- ".*=.*(int.*@__ea.*).*0x.*" \
- "p &ppe_pointer"
-
-gdb_test "p &normal_pointer" \
- ".*=.*(int.*).*0x.*" \
- "p &normal_pointer"
-
-gdb_test "p &local_ppe_pointer" \
- ".*=.*(int.*@__ea.*).*0x.*" \
- "p &local_ppe_pointer"
-
-gdb_test "p &local_normal_pointer" \
- ".*=.*(int.*).*0x.*" \
- "p &local_normal_pointer"
-
-# ptype *
-gdb_test "ptype *ppe_pointer" \
- "type = int" \
- "ptype *ppe_pointer"
-
-gdb_test "ptype *normal_pointer" \
- "type = int" \
- "ptype *normal_pointer"
-
-gdb_test "ptype *local_ppe_pointer" \
- "type = int" \
- "ptype *local_ppe_pointer"
-
-gdb_test "ptype *local_normal_pointer" \
- "type = int" \
- "ptype *local_normal_pointer"
-
-gdb_exit
-
-return 0
-
-
diff --git a/gdb/testsuite/gdb.cell/f-regs.exp b/gdb/testsuite/gdb.cell/f-regs.exp
deleted file mode 100644
index a37c77a..0000000
--- a/gdb/testsuite/gdb.cell/f-regs.exp
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcase tests access to SPU vector registers while language is fortran.
-
-load_lib cell.exp
-
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-proc check_vector_regs {} {
- for {set check_reg 0} {$check_reg < 128} {incr check_reg} {
-
- gdb_test "p \$r$check_reg" \
- "r$check_reg.*=.*\(.*\).*" \
- "p \$r$check_reg"
-
- gdb_test "ptype \$r$check_reg" \
- "type = Type,.*C_Union :: __spu_builtin_type_vec128.*int128_t :: uint128.*int64_t :: v2_int64.*int32_t :: v4_int32\(.*\).*int16_t :: v8_int16\(.*\).*int8_t :: v16_int8\(.*\).*double :: v2_double\(.*\).*float :: v4_float\(.*\).*End Type __spu_builtin_type_vec128.*" \
- "ptype \$r$check_reg"
- }
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-# No programm running, no registers should be available.
-gdb_test "info all-registers" \
- "The program has no registers now." \
- "info all-registers"
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-cont_spu_main
-gdb_test "set language fortran" \
- "Warning: the current language does not match this frame.*" \
- "set language fortran"
-check_vector_regs
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/fork-spu.c b/gdb/testsuite/gdb.cell/fork-spu.c
deleted file mode 100644
index 7777165..0000000
--- a/gdb/testsuite/gdb.cell/fork-spu.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2010-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Ulrich Weigand <uweigand@de.ibm.com> */
-
-#include <spu_mfcio.h>
-
-int var;
-
-void
-func (void)
-{
-}
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- /* Signal to PPU side that it should fork now. */
- spu_write_out_intr_mbox (0);
-
- /* Wait until fork completed. */
- spu_read_in_mbox ();
-
- /* Trigger watchpoint. */
- var = 1;
-
- /* Now call some function to trigger breakpoint. */
- func ();
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/fork.c b/gdb/testsuite/gdb.cell/fork.c
deleted file mode 100644
index 240af47..0000000
--- a/gdb/testsuite/gdb.cell/fork.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2010-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Ulrich Weigand <uweigand@de.ibm.com> */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-extern spe_program_handle_t fork_spu;
-
-void *
-spe_thread (void * arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &fork_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-main (void)
-{
- pthread_t pts;
- spe_context_ptr_t ctx;
- unsigned int value;
- unsigned int pid;
-
- ctx = spe_context_create (0, NULL);
- pthread_create (&pts, NULL, &spe_thread, &ctx);
-
- /* Wait until the SPU thread is running. */
- spe_out_intr_mbox_read (ctx, &value, 1, SPE_MBOX_ALL_BLOCKING);
-
- pid = fork ();
- if (pid == 0)
- {
- /* This is the child. Just exit immediately. */
- exit (0);
- }
- else
- {
- /* This is the parent. Wait for the child to exit. */
- waitpid (pid, NULL, 0);
- }
-
- /* Tell SPU to continue. */
- spe_in_mbox_write (ctx, &value, 1, SPE_MBOX_ALL_BLOCKING);
-
- pthread_join (pts, NULL);
- spe_context_destroy (ctx);
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/fork.exp b/gdb/testsuite/gdb.cell/fork.exp
deleted file mode 100644
index 0092191..0000000
--- a/gdb/testsuite/gdb.cell/fork.exp
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 2010-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tests support for PPU-side fork during SPU debugging
-
-load_lib cell.exp
-
-set testfile "fork"
-set ppu_file "fork"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "fork-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-delete_breakpoints
-
-gdb_test_no_output "set spu stop-on-load" "set spu stop-on-load"
-
-gdb_test "continue" "Continuing\\..*Temporary breakpoint \[0-9\]+, main \\(speid=.*, argp=.*, envp=.*\\) at .*$spu_file\\.c:.*spu_write_out_intr_mbox.*" \
- "run until SPU main"
-
-gdb_test "break func" "Breakpoint \[0-9\]+ at.* file .*$spu_file.c, line \[0-9\]+\\." "break func"
-gdb_test "watch var" "Watchpoint \[0-9\]+: var" "watch var"
-
-gdb_test "continue" "Continuing\\..*Watchpoint.*Old value = 0.*New value = 1.*" \
- "run until watchpoint hit"
-
-gdb_test_no_output "delete \$bpnum" "delete watchpoint"
-
-gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, func \\(\\) at .*$spu_file.c:.*" \
- "run until breakpoint hit"
-
-gdb_continue_to_end "" continue 1
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/gcore.exp b/gdb/testsuite/gdb.cell/gcore.exp
deleted file mode 100644
index f586b75..0000000
--- a/gdb/testsuite/gdb.cell/gcore.exp
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tests mixed-architecture core file support
-
-load_lib cell.exp
-
-set testfile "coremaker"
-set ppu_file "coremaker"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "coremaker-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {![isnative]} then {
- return 0
-}
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-delete_breakpoints
-
-gdb_test "continue" ".*Aborted.*"
-
-if {![gdb_gcore_cmd "${objdir}/${subdir}/gcore.test" \
- "save a corefile"]} {
- return -1
-}
-
-# Now restart gdb and load the corefile.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-send_gdb "core-file $objdir/$subdir/gcore.test\n"
-gdb_expect {
- -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
- pass "core-file command"
- }
- -re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
- pass "core-file command (with bad program name)"
- }
- -re ".*$gdb_prompt $" { fail "core-file command" }
- timeout { fail "(timeout) core-file command" }
-}
-
-gdb_test "backtrace" ".*abort.*main.*at.*$ppu_file.c.*"
-
-for {set thread_id 2} {$thread_id < 7} {incr thread_id} {
- gdb_test "t $thread_id" \
- "Switching to thread $thread_id.*" \
- "switch to thread $thread_id"
- gdb_test "backtrace" \
- ".*terminal_func.*factorial_func.*value=1.*factorial_func.*value=2.*factorial_func.*value=3.*factorial_func.*value=4.*factorial_func.*value=5.*factorial_func.*value=6.*main.*speid.*argp.*envp.*at.*$spu_file.c.*<cross-architecture call>.*spe_context_run.*spe_thread.*at.*$ppu_file.c.*" \
- "backtrace in thread $thread_id"
-}
-
-gdb_exit
-
-return 0
diff --git a/gdb/testsuite/gdb.cell/mem-access-spu.c b/gdb/testsuite/gdb.cell/mem-access-spu.c
deleted file mode 100644
index 3baa3a2..0000000
--- a/gdb/testsuite/gdb.cell/mem-access-spu.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- int i;
- static int test_var;
-
- printf ("Hello World! from spu\n");
-
- test_var = 5;
- i = 5; /* Marker SPUEA */
- printf ("i = %d\n", i);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.cell/mem-access.c b/gdb/testsuite/gdb.cell/mem-access.c
deleted file mode 100644
index 442e8a2..0000000
--- a/gdb/testsuite/gdb.cell/mem-access.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t mem_access_spu;
-#define nr_t 1
-
-void *
-spe_thread (void *arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &mem_access_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-main (void)
-{
- int thread_id[nr_t];
- pthread_t pts[nr_t];
- spe_context_ptr_t ctx[nr_t];
- int value = 1;
- int cnt;
- static int test_var;
-
- test_var = 5;
- for (cnt = 0; cnt < nr_t; cnt++) /* Marker PPUEA */
- {
- ctx[cnt] = spe_context_create (0, NULL);
- thread_id[cnt]
- = pthread_create (&pts[cnt], NULL, &spe_thread, &ctx[cnt]);
- }
-
- for (cnt = 0; cnt < nr_t; cnt++)
- pthread_join (pts[cnt], NULL);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- spe_context_destroy (ctx[cnt]);
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/mem-access.exp b/gdb/testsuite/gdb.cell/mem-access.exp
deleted file mode 100644
index 86d2294..0000000
--- a/gdb/testsuite/gdb.cell/mem-access.exp
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcases tests on PPU and SPU if variables and registers are accessible
-# via print and set by using names and adresses.
-
-load_lib cell.exp
-
-set ppu_file "mem-access"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "mem-access-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-# Get the adress to symbol name. If $reg
-# is set to 1, get address from a register.
-proc get_adress_from_name { name reg } {
- global gdb_prompt
- set adr ""
-
- if { $reg == 1 } {
- set q "x/x $name"
- } else {
- set q "x/x &$name"
- }
-
- gdb_test_multiple $q "get address from $name" {
- -re "(0x.....):.*$gdb_prompt $" { # Registers.
- set adr $expect_out(1,string)
- pass "get adress from $name = $adr"
- }
- -re "(0x........) <.*$gdb_prompt $" { # PPU address.
- set adr $expect_out(1,string)
- pass "get adress from $name = $adr"
- }
- -re "(0x....) <.*$gdb_prompt $" { # SPU address.
- set adr $expect_out(1,string)
- pass "get adress from $name = $adr"
- }
- -re "(0x...) <.*$gdb_prompt $" { # SPU address.
- set adr $expect_out(1,string)
- pass "get adress from $name = $adr"
- }
- }
-
- return ${adr}
-}
-
-# Try to set a $value at adress $adr.
-proc set_adr_content { adr value } {
- gdb_test "set *$adr=$value" \
- "" \
- "set *$adr=$value"
-}
-
-# Try to set a $value for $symbol.
-proc set_symbol_content { symbol value } {
- gdb_test "set $symbol=$value" \
- "" \
- "set *$symbol=$value"
-}
-
-# Check if $value is at *adr
-proc test_adr_content { adr value } {
- gdb_test "p *$adr" \
- ".*=.*$value.*" \
- "(ptr) *$adr==$value"
-}
-
-proc test_symbol_content { symbol value } {
- gdb_test "p $symbol" \
- ".*=.*$value.*" \
- "(symbol) $symbol==$value"
-}
-
-# Check VARNAME. Check if it has the inital
-# value INITIALVALUE. Set it to NEWVALUE.
-# Check if set properly. Do it via symbols and
-# pointers.
-proc check_var { varname initalvalue newvalue } {
-
- # Initial value should be $initalvalue.
- test_symbol_content $varname $initalvalue
-
- # Get pointer to symbol and check if the
- # initial value is found.
- set adr [get_adress_from_name $varname 0]
- test_adr_content $adr $initalvalue
-
- # Re-set value using the pointer.
- set_adr_content $adr $newvalue
-
- # Test values by pointer and by symbol.
- test_adr_content $adr $newvalue
- test_symbol_content $varname $newvalue
-
- # Set value back to initalvalue using symbol
- # name and check it.
- set_symbol_content $varname $initalvalue
- test_adr_content $adr $initalvalue
- test_symbol_content $varname $initalvalue
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Check in PPU thread.
-c_to "Marker PPUEA" $ppu_file.c
-check_var "test_var" 5 7
-
-# Go to SPU thread.
-cont_spu_main
-c_to "Marker SPUEA" $spu_file.c
-check_spu_arch ""
-
-# Check in SPU thread.
-check_var "test_var" 5 7
-# Check $sp register.
-set adr [get_adress_from_name "\$sp" 1]
-set_adr_content $adr 8
-test_adr_content $adr 8
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cell/ptype.exp b/gdb/testsuite/gdb.cell/ptype.exp
deleted file mode 100644
index 39311e7..0000000
--- a/gdb/testsuite/gdb.cell/ptype.exp
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# Test ptype and print/set of SPU-side registers.
-
-load_lib cell.exp
-
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Continue to SPU
-cont_spu_main
-
-gdb_test "info registers r2" \
- "r2.*\{uint128 =.*v2_int64 =.*v4_int32 =.*v8_int16 =.*v16_int8 =.*v2_double =.*v4_float =.*\}.*" \
- "info registers r2"
-
-for {set check_reg 10} {$check_reg < 12} {incr check_reg} {
- gdb_test "print \$r$check_reg\.v4_int32" \
- ".*= \{.*,.*,.*,.*\}" \
- "print \$r$check_reg\.v4_int32"
-
- gdb_test "ptype \$r$check_reg" \
- "type = union __spu_builtin_type_vec128.*\{.*int128_t uint128.* \
- int64_t v2_int64.*int32_t v4_int32.*int16_t v8_int16.* \
- int8_t v16_int8.*double v2_double.*float v4_float.*\}" \
- "ptype \$r$check_reg"
-
- gdb_test "set \$r$check_reg\.v4_int32 = {1,2,3,4}" \
- "" \
- "set \$r$check_reg\.v4_int32 = {1,2,3,4}"
-
- gdb_test "print \$r$check_reg\.v4_int32" \
- ".*= \{.*1, 2, 3, 4.*\}" \
- "print \$r$check_reg\.v4_int32"
-
- gdb_test "print \$r$check_reg.v4_int32\[0\]" \
- ".*= 1.*" \
- "print \$r$check_reg.v4_int32\[0\]"
-
- gdb_test "print \$r$check_reg.v4_int32\[1\]" \
- ".*= 2.*" \
- "print \$r$check_reg.v4_int32\[1\]"
-
- gdb_test "print \$r$check_reg.v4_int32\[2\]" \
- ".*= 3.*" \
- "print \$r$check_reg.v4_int32\[2\]"
-
- gdb_test "print \$r$check_reg.v4_int32\[3\]" \
- ".*= 4.*" \
- "print \$r$check_reg.v4_int32\[3\]"
-
- gdb_test "print \$r$check_reg.v4_int32\[4\]" \
- "no such vector element" \
- "print \$r$check_reg.v4_int32\[4\]"
-
- # Set single array elements to other values and check the results.
- gdb_test "set \$r$check_reg\.v4_int32\[0\] = 5" \
- "" \
- "set \$r$check_reg\.v4_int32\[0\] = 5"
- gdb_test "print \$r$check_reg.v4_int32\[0\]" \
- ".*= 5.*" \
- "print \$r$check_reg.v4_int32\[0\]"
-
- gdb_test "set \$r$check_reg\.v4_int32\[1\] = 6" \
- "" \
- "set \$r$check_reg\.v4_int32\[1\] = 6"
- gdb_test "print \$r$check_reg.v4_int32\[1\]" \
- ".*= 6.*" \
- "print \$r$check_reg.v4_int32\[1\]"
-
- gdb_test "set \$r$check_reg\.v4_int32\[2\] = 7" \
- "" \
- "set \$r$check_reg\.v4_int32\[2\] = 7"
- gdb_test "print \$r$check_reg.v4_int32\[2\]" \
- ".*= 7.*" \
- "print \$r$check_reg.v4_int32\[2\]"
-
- gdb_test "set \$r$check_reg\.v4_int32\[3\] = 8" \
- "" \
- "set \$r$check_reg\.v4_int32\[3\] = 8"
- gdb_test "print \$r$check_reg.v4_int32\[3\]" \
- ".*= 8.*" \
- "print \$r$check_reg.v4_int32\[3\]"
-
- # Now there should be {5, 6, 7, 8} in that array.
- gdb_test "print \$r$check_reg\.v4_int32" \
- ".*= \{.*5, 6, 7, 8.*\}" \
- "print \$r$check_reg\.v4_int32"
-}
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cell/registers.exp b/gdb/testsuite/gdb.cell/registers.exp
deleted file mode 100644
index c4d2710..0000000
--- a/gdb/testsuite/gdb.cell/registers.exp
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcase tests registers on PPU and SPU.
-
-load_lib cell.exp
-
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-# No programm running, no registers should be available.
-gdb_test "info all-registers" \
- "The program has no registers now." \
- "info all-registers"
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Check registers in PPU thread.
-gdb_test "info reg r0" "r0.*" "info register r0"
-gdb_test "info reg r31" "r31.*" "info register r31"
-gdb_test "info reg r32" "Invalid register.*r32.*" "(invalid) info register r32"
-gdb_test "info reg pc" "pc.*" "info register pc"
-gdb_test "info reg cr" "cr.*" "info register cr"
-gdb_test "info reg lr" "lr.*" "info register lr"
-gdb_test "info reg ctr" "ctr.*" "info register ctr"
-gdb_test "info reg xer" "xer.*" "info register xer"
-
-# Continue to SPU thread.
-cont_spu_main
-
-# In SPU thread, check SPU registers.
-for {set check_reg 0} {$check_reg < 128} {incr check_reg} {
- gdb_test "info reg r$check_reg" \
- "r$check_reg.*uint128.*=.*v2\_int64.*v4\_int32.*v8\_int16.*v16\_int8.*v2\_double.*v4\_float.*" \
- "info register r$check_reg"
-}
-gdb_test "info reg r128" \
- "Invalid register.*r128.*" \
- "(invalid) info register r128"
-
-gdb_test "info reg pc" "pc.*main.*" "info register pc"
-gdb_test "info reg id" "id.*" "info register id"
-gdb_test "info reg sp" "sp.*" "info register sp"
-gdb_test "info reg fpscr" "fpscr.*" "info register fpscr"
-gdb_test "info reg srr0" "srr0.*" "info register srr0"
-gdb_test "info reg lslr" "lslr.*" "info register lslr"
-gdb_test "info reg decr" "decr.*" "info register decr"
-gdb_test "info reg decr_status" "decr_status.*" "info register decr-status"
-
-gdb_test "info reg cr" "Invalid register.*cr.*" "info register cr"
-gdb_test "info reg lr" "Invalid register.*lr.*" "info register lr"
-gdb_test "info reg ctr" "Invalid register.*ctr.*" "info register ctr"
-gdb_test "info reg xer" "Invalid register.*xer.*" "info register xer"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cell/size-spu.c b/gdb/testsuite/gdb.cell/size-spu.c
deleted file mode 100644
index 4d8b881..0000000
--- a/gdb/testsuite/gdb.cell/size-spu.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-
-
-int
-main (unsigned long long speid, unsigned long long argp,
- unsigned long long envp)
-{
- int c = sizeof (char); /* Break here. */
- printf ("sizeof(char)=%d\n", c);
-
- int s = sizeof (short);
- printf ("sizeof(short)=%d\n", s);
-
- int i = sizeof (int);
- printf ("sizeof(int)=%d\n", i);
-
- int l = sizeof (long);
- printf ("sizeof(long)=%d\n", l);
-
- int ll = sizeof (long long);
- printf ("sizeof(long long)=%d\n", ll);
-
- int f = sizeof (float);
- printf ("sizeof(float)=%d\n", f);
-
- int d = sizeof (double);
- printf ("sizeof(double)=%d\n", d);
-
- int ld = sizeof (long double);
- printf ("sizeof(long double)=%d\n", ld);
-
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.cell/size.c b/gdb/testsuite/gdb.cell/size.c
deleted file mode 100644
index be9c8d3..0000000
--- a/gdb/testsuite/gdb.cell/size.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
- Copyright 2009-2019 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- Contributed by Markus Deuling <deuling@de.ibm.com> */
-
-#include <stdio.h>
-#include <libspe2.h>
-#include <pthread.h>
-#include <sys/wait.h>
-
-extern spe_program_handle_t size_spu;
-#define nr_t 1
-
-void *
-spe_thread (void *arg)
-{
- int flags = 0;
- unsigned int entry = SPE_DEFAULT_ENTRY;
- spe_context_ptr_t *ctx = (spe_context_ptr_t *) arg;
-
- spe_program_load (*ctx, &size_spu);
- spe_context_run (*ctx, &entry, flags, NULL, NULL, NULL);
-
- pthread_exit (NULL);
-}
-
-int
-main (void)
-{
- int thread_id[nr_t];
- pthread_t pts[nr_t];
- spe_context_ptr_t ctx[nr_t];
- int cnt;
-
- int c = sizeof (char);
- printf ("sizeof(char)=%d\n", c);
-
- int s = sizeof (short);
- printf ("sizeof(short)=%d\n", s);
-
- int i = sizeof (int);
- printf ("sizeof(int)=%d\n", i);
-
- int l = sizeof (long);
- printf ("sizeof(long)=%d\n", l);
-
- int ll = sizeof (long long);
- printf ("sizeof(long long)=%d\n", ll);
-
- int f = sizeof (float);
- printf ("sizeof(float)=%d\n", f);
-
- int d = sizeof (double);
- printf ("sizeof(double)=%d\n", d);
-
- int ld = sizeof (long double);
- printf ("sizeof(long double)=%d\n", ld);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- {
- ctx[cnt] = spe_context_create (0, NULL);
- thread_id[cnt]
- = pthread_create (&pts[cnt], NULL, &spe_thread, &ctx[cnt]);
- }
-
- for (cnt = 0; cnt < nr_t; cnt++)
- pthread_join (pts[cnt], NULL);
-
- for (cnt = 0; cnt < nr_t; cnt++)
- spe_context_destroy (ctx[cnt]);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.cell/sizeof.exp b/gdb/testsuite/gdb.cell/sizeof.exp
deleted file mode 100644
index 8ea69e6..0000000
--- a/gdb/testsuite/gdb.cell/sizeof.exp
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# Check size of data types both on PPU and SPU.
-
-load_lib cell.exp
-
-set ppu_file "size"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "size-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-
-# Ask GDB about the sizes of data types. This has
-# to be done in PPU thread and SPU thread.
-proc get_gdb_size { type } {
- global gdb_prompt
-
- set val "0"
- gdb_test_multiple "print/d sizeof(${type})" "get sizeof(${type})" {
- -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
- set val $expect_out(1,string)
- pass "get sizeof ($type) = $val"
- }
- }
- return ${val}
-}
-
-# Compare sizes from GDB and sizeof().
-proc size_compare { type gdb_size } {
- set expr [string_to_regexp "sizeof(${type})=${gdb_size}"]
- gdb_test "next" \
- ".*" \
- "next"
- # Checks against string_to_regexp fails in remote testing.
- if ![is_remote target] {
- gdb_test "next" \
- "${expr}.*" \
- "check sizeof \"$type\" \"$gdb_size\" "
- } else {
- gdb_test "next" ".*" "check sizeof deactivate in remote testing"
- }
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Compare sizes.
-size_compare "char" [get_gdb_size "char"]
-size_compare "short" [get_gdb_size "short"]
-size_compare "int" [get_gdb_size "int"]
-size_compare "long" [get_gdb_size "long"]
-size_compare "long long" [get_gdb_size "long long"]
-size_compare "float" [get_gdb_size "float"]
-size_compare "double" [get_gdb_size "double"]
-size_compare "long double" [get_gdb_size "long double"]
-
-# Continue to SPU thread.
-cont_spu_main
-check_spu_arch ""
-
-# Compare sizes in SPU thread.
-size_compare "char" [get_gdb_size "char"]
-size_compare "short" [get_gdb_size "short"]
-size_compare "int" [get_gdb_size "int"]
-size_compare "long" [get_gdb_size "long"]
-size_compare "long long" [get_gdb_size "long long"]
-size_compare "float" [get_gdb_size "float"]
-size_compare "double" [get_gdb_size "double"]
-size_compare "long double" [get_gdb_size "long double"]
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cell/solib-symbol.exp b/gdb/testsuite/gdb.cell/solib-symbol.exp
deleted file mode 100644
index 685ccf5..0000000
--- a/gdb/testsuite/gdb.cell/solib-symbol.exp
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# Testcase for multiple symbol disambiguation patch.
-
-load_lib cell.exp
-
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Symbol resolved in PPU thread.
-gdb_test "info symbol foo" \
- "foo in section \.text of .*$ppu_file\[\r\n\]+.*" \
- "info symbol foo in break"
-
-# Continue to SPU
-cont_spu_main
-check_spu_arch ""
-
-# Symbol resolved in SPU thread.
-gdb_test "info symbol foo" \
- "foo in section \.text of .*$spu_file@.*" \
- "info symbol foo in break-spu"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cell/solib.exp b/gdb/testsuite/gdb.cell/solib.exp
deleted file mode 100644
index d6ed65d..0000000
--- a/gdb/testsuite/gdb.cell/solib.exp
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Testsuite for Cell Broadband Engine combined debugger
-# This testcase checks 'info sharedlibrary ' command.
-
-load_lib cell.exp
-
-set ppu_file "break"
-set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
-set ppu_bin [standard_output_file ${ppu_file}]
-set spu_file "break-spu"
-set spu_src ${srcdir}/${subdir}/${spu_file}.c
-set spu_bin [standard_output_file ${spu_file}]
-
-if {[skip_cell_tests]} {
- return 0
-}
-
-# Compile SPU binary.
-if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
- unsupported "compiling spu binary failed."
- return -1
-}
-# Compile PPU binary.
-if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
- unsupported "embedding spu binary failed."
- return -1
-}
-if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
- unsupported "compiling ppu binary failed."
- return -1
-}
-
-if [get_compiler_info] {
- return -1
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${ppu_bin}
-
-# No programm running, no libraries should be loaded.
-gdb_test "info sharedlibrary" \
- "No shared libraries loaded at this time." \
- "no shared library is loaded"
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-# Standing in PPU thread, now some libs should be loaded
-# including libspe library.
-gdb_test "info sharedlibrary" \
- "From.*To.*Syms Read.*Shared Object Library.*libspe.*" \
- "binary started, some libraries loaded"
-
-# Continue to SPU
-cont_spu_main
-check_spu_arch ""
-
-# In SPU thread now, the SPU binary should now appear in the list
-# of shared libraries.
-gdb_test "info sharedlibrary" \
- "From.*To.*Syms Read.*Shared Object Library.*libspe.*$spu_bin.*@.*x.*" \
- "spu thread, spu binary as shared library"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.cp/bs15503.exp b/gdb/testsuite/gdb.cp/bs15503.exp
index 920b02a..f238f51 100644
--- a/gdb/testsuite/gdb.cp/bs15503.exp
+++ b/gdb/testsuite/gdb.cp/bs15503.exp
@@ -19,11 +19,6 @@
if { [skip_stl_tests] } { continue }
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
standard_testfile .cc
if [get_compiler_info] {
diff --git a/gdb/testsuite/gdb.cp/cpexprs.exp b/gdb/testsuite/gdb.cp/cpexprs.exp
index ecf3a2f..d7decaf 100644
--- a/gdb/testsuite/gdb.cp/cpexprs.exp
+++ b/gdb/testsuite/gdb.cp/cpexprs.exp
@@ -681,11 +681,6 @@ add {policyd5::function} \
# Start the test
if {[skip_cplus_tests]} { continue }
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
#
# test running programs
#
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp
index 0be382b..13631df 100644
--- a/gdb/testsuite/gdb.cp/exception.exp
+++ b/gdb/testsuite/gdb.cp/exception.exp
@@ -35,11 +35,6 @@ set nl "\[\r\n\]+"
if { [skip_stl_tests] } { continue }
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp
index bcb6c5e..a7de2cc 100644
--- a/gdb/testsuite/gdb.cp/gdb2495.exp
+++ b/gdb/testsuite/gdb.cp/gdb2495.exp
@@ -38,11 +38,6 @@ if [target_info exists gdb,nosignals] {
continue
}
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
standard_testfile .cc
# Create and source the file that provides information about the compiler
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp
index ad42ef6..5946c0b 100644
--- a/gdb/testsuite/gdb.cp/mb-templates.exp
+++ b/gdb/testsuite/gdb.cp/mb-templates.exp
@@ -18,11 +18,6 @@
if { [skip_stl_tests] } { continue }
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
standard_testfile .cc
diff --git a/gdb/testsuite/gdb.cp/pr9167.exp b/gdb/testsuite/gdb.cp/pr9167.exp
index e8a7722..2142252 100644
--- a/gdb/testsuite/gdb.cp/pr9167.exp
+++ b/gdb/testsuite/gdb.cp/pr9167.exp
@@ -13,11 +13,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp
index dad9be3..7907593 100644
--- a/gdb/testsuite/gdb.cp/userdef.exp
+++ b/gdb/testsuite/gdb.cp/userdef.exp
@@ -21,11 +21,6 @@
if { [skip_stl_tests] } { continue }
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
- return 0
-}
-
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 35fcc00..efd2227 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -69,16 +69,6 @@ switch -glob -- [istarget] {
set regdir "sparc/"
set core-regs {sparc64-cpu.xml sparc64-fpu.xml sparc64-cp0.xml}
}
- "spu*-*-*" {
- # This may be either the spu-linux-nat target, or the Cell/B.E.
- # multi-architecture debugger in SPU standalone executable mode.
- # We do not support XML register sets on SPU in either case.
- # However, the multi-arch debugger will accept XML registers sets
- # (on the PowerPC side), hence the test below would fail.
- # Simply return unconditionally here.
- unsupported "register tests"
- return 0
- }
"tic6x-*-*" {
set core-regs {tic6x-core.xml}
}
diff --git a/gdb/testsuite/lib/cell.exp b/gdb/testsuite/lib/cell.exp
deleted file mode 100644
index 4a32805..0000000
--- a/gdb/testsuite/lib/cell.exp
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright 2009-2019 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Contributed by Markus Deuling <deuling@de.ibm.com>.
-#
-# Support library for testing the combined debugger for Linux
-# on the Cell Broadband Engine.
-
-# Compile SPU objects.
-proc gdb_compile_cell_spu {source dest type options} {
- global board
-
- # Save and unset multilib flags; these are not appropriate
- # for the SPU compiler.
- set board [target_info name]
- set save_multilib_flag [board_info $board multilib_flags]
- unset_board_info "multilib_flags"
-
- set options_spu [concat $options [list compiler=spu-gcc]]
- set ccout [gdb_compile $source $dest $type $options_spu]
-
- set_board_info multilib_flags $save_multilib_flag
- return $ccout
-}
-
-# Compile PPU objects. This is just like gdb_compile_pthreads, except that we
-# always add the libspe2 library for compiling Cell/B.E. programs.
-proc gdb_compile_cell_ppu {source dest type options} {
- # We do not need to try multiple names for the pthread library
- # -lpthread works on all Cell/B.E. systems
- set lib "-lspe2 -lpthread"
- set options_ppu [concat $options [list libs=$lib]]
- return [gdb_compile $source $dest $type $options_ppu]
-}
-
-# Embed SPU executable into a PPU object.
-proc gdb_cell_embedspu {source dest options} {
- global CC_FOR_TARGET
-
- if [info exists CC_FOR_TARGET] {
- set compiler $CC_FOR_TARGET
- } else {
- set compiler [board_info [target_info name] compiler]
- }
-
- # We assume the PPU compiler is called gcc or ppu-gcc,
- # and find the appropriate embedspu based on that.
- regsub gcc "$compiler" embedspu embedspu
-
- # Determine default embedded symbol name from source filename.
- set path [split "$source" /]
- set filename [lindex $path [expr [llength $path] - 1]]
- regsub -all -- "\[-\.\]" "$filename" "_" symbol
-
- set options_embed [concat $options [list compiler=$embedspu]]
- return [gdb_compile "$symbol $source $dest" "" none $options_embed]
-}
-
-# Run a test on the target to see if it supports Cell/B.E. hardware.
-# Return 0 if so, 1 if it does not.
-gdb_caching_proc skip_cell_tests {
- global srcdir subdir gdb_prompt inferior_exited_re
-
- set me "skip_cell_tests"
-
- # Set up, compile, and execute a combined Cell/B.E. test program.
- # Include the current process ID in the file names to prevent conflicts
- # with invocations for multiple testsuites.
- set src [standard_temp_file cell[pid].c]
- set exe [standard_temp_file cell[pid].x]
- set src_spu [standard_temp_file cell[pid]-spu.c]
- set exe_spu [standard_temp_file cell[pid]-spu.x]
-
- set f [open $src "w"]
- puts $f "#include <libspe2.h>"
- puts $f "extern spe_program_handle_t cell[pid]_spu_x;"
- puts $f "int main (void) {"
- puts $f "unsigned int entry = SPE_DEFAULT_ENTRY;"
- puts $f "spe_context_ptr_t ctx = spe_context_create (0, NULL);"
- puts $f "spe_program_load (ctx, &cell[pid]_spu_x);"
- puts $f "return spe_context_run (ctx, &entry, 0, NULL, NULL, NULL); }"
- close $f
-
- set f [open $src_spu "w"]
- puts $f "int main (void) { return 0; }"
- close $f
-
- verbose "$me: compiling testfile $src" 2
- set compile_flags {debug nowarnings quiet}
-
- set skip 0
- if { [gdb_compile_cell_spu $src_spu $exe_spu executable $compile_flags] != "" } {
- verbose "$me: compiling spu binary failed, returning 1" 2
- set skip 1
- }
- if { ! $skip && [gdb_cell_embedspu $exe_spu $exe_spu-embed.o $compile_flags] != "" } {
- verbose "$me: embedding spu binary failed, returning 1" 2
- set skip 1
- }
- if { ! $skip && [gdb_compile_cell_ppu [list $src $exe_spu-embed.o] $exe executable $compile_flags] != "" } {
- verbose "$me: compiling ppu binary failed, returning 1" 2
- set skip 1
- }
- file delete $src
- file delete $src_spu
- file delete $exe_spu
- file delete $exe_spu-embed.o
-
- if { $skip } {
- return 1
- }
-
- # Compilation succeeded so now run it via gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load "$exe"
- gdb_run_cmd
- gdb_expect {
- -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
- verbose -log "\n$me: Cell/B.E. hardware detected"
- set result 0
- }
- -re ".*$inferior_exited_re with code.*${gdb_prompt} $" {
- verbose -log "\n$me: Cell/B.E. hardware not detected"
- set result 1
- }
- default {
- unresolved "$me: unexpected failure"
- set result 1
- }
- }
- gdb_exit
- remote_file build delete $exe
-
- verbose "$me: returning $result" 2
- return $result
-}
-
-# Delete all breakpoints and stop on the next new SPU thread
-proc cont_spu_main { } {
- delete_breakpoints
- gdb_test "set spu stop-on-load on"
- gdb_test "continue" \
- "Continuing.*Temporary breakpoint .*main .*" \
- "continue to SPU main"
-}
-
-# Continue to MARKER
-proc c_to { marker srcfile } {
- set line [gdb_get_line_number $marker $srcfile]
- gdb_test "break $line" \
- "Breakpoint.*at.*file.*$srcfile.*line $line.*" \
- "break $line"
- gdb_test "continue" \
- "Continuing.*Breakpoint.*at.*$srcfile.*$line.*" \
- "continue to $line"
-}
-
-# Check if the current thread has SPU architecture
-proc check_spu_arch { msg } {
- if { $msg == "" } {
- set msg "spu architecture is spu256K"
- }
- gdb_test "show architecture" \
- "The target architecture is set automatically.*currently spu:256K.*" \
- $msg
-}