import gdb-1999-0519

This commit is contained in:
Jason Molenda 1999-05-19 19:58:41 +00:00
parent 1ceea51453
commit 9e086581c7
20 changed files with 806 additions and 658 deletions

View File

@ -1,3 +1,46 @@
1999-05-19 Keith Seitz <keiths@cygnus.com>
* monitor.c (monitor_open): Only assume we have eight
breakpoints if the monitor implementation does not tell
us how many there really are. Alloc memory for these
dynamically.
(monitor_close): Free memory associated with breakpoint
storage.
(monitor_insert_breakpoint): Don't rely on a hardcoded
number of breakpoints.
(monitor_remove_breakpoint): Ditto.
(NUM_MONITOR_BREAKPOINTS): Removed and replaced with monitor_ops
specification.
* monitor.h (struct monitor_ops): Add new member so that the
individual monitor implementations can tell us how many
breakpoints the monitor supports.
1999-05-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From Philippe De Muyter <phdm@macqel.be>:
* event-loop.h: Include sys/wait.h only if HAVE_SYS_WAIT_H.
1999-05-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
* top.c (print_command_line): added the missing stream argument.
* gdbcmd.h: added argument to prototype.
* command.c: fixed call to include extra argument.
* breakpoint.c: same.
1999-05-14 Jim Blandy <jimb@zwingli.cygnus.com>
Targets are #defining PREPARE_TO_PROCEED with inconsistent numbers
of arguments. Since the Mach 3 target needs an argument, we'll
make things consistent by adding an argument everywhere.
* infrun.c (proceed): Pass an argument to PREPARE_TO_PROCEED.
* config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Add ignored argument
to definition.
1999-05-11 Stan Shebs <shebs@andros.cygnus.com>
Fri Apr 23 13:27:34 PDT 1999 Toshiyasu Morita (tm@netcom.com)
* sh-stub.c: Mostly localize processor dependencies.
1999-05-10 Martin Hunt <hunt@cygnus.com>
* debugify.c, debugify.h: Removed because they are no

View File

@ -219,7 +219,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
VERSION = 19990510
VERSION = 19990519
DIST=gdb
LINT=/usr/5bin/lint
@ -944,7 +944,8 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
infptrace.c inftarg.c irix4-nat.c irix5-nat.c isi-xdep.c \
lynx-nat.c m3-nat.c \
m68k-tdep.c \
m88k-nat.c m88k-tdep.c mac-nat.c mips-nat.c \
m88k-nat.c m88k-tdep.c mac-nat.c \
mips-nat.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c news-xdep.c \
nindy-share/Onindy.c nindy-share/nindy.c \
nindy-share/ttyflush.c nindy-tdep.c \

View File

@ -2928,7 +2928,7 @@ breakpoint_1 (bnum, allflag)
while (l)
{
print_command_line (l, 4);
print_command_line (l, 4, gdb_stdout);
l = l->next;
}
}

View File

@ -1513,7 +1513,7 @@ show_user_1 (c, stream)
while (cmdlines)
{
print_command_line (cmdlines, 4);
print_command_line (cmdlines, 4, stream);
cmdlines = cmdlines->next;
}
fputs_filtered ("\n", stream);

View File

@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* While this is for use by threaded programs, it doesn't appear
* to hurt non-threaded ones. This is used in infrun.c: */
#define PREPARE_TO_PROCEED() hppa_prepare_to_proceed()
#define PREPARE_TO_PROCEED(select_it) hppa_prepare_to_proceed()
extern int hppa_prepare_to_proceed PARAMS(( void ));
/* In infptrace.c or infttrace.c: */

551
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,9 @@
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include "defs.h"
/* An event loop listens for events from multiple event sources. When

View File

@ -105,7 +105,8 @@ execute_command PARAMS ((char *, int));
enum command_control_type
execute_control_command PARAMS ((struct command_line *));
void print_command_line PARAMS ((struct command_line *, unsigned int));
extern void
print_command_line PARAMS ((struct command_line *, unsigned int, GDB_FILE *));
extern char **noop_completer PARAMS ((char *, char *));

View File

@ -925,7 +925,7 @@ proceed (addr, siggnal, step)
PREPARE_TO_PROCEED checks the current thread against the thread
that reported the most recent event. If a step-over is required
it returns TRUE and sets the current thread to the old thread. */
if (PREPARE_TO_PROCEED () && breakpoint_here_p (read_pc ()))
if (PREPARE_TO_PROCEED (1) && breakpoint_here_p (read_pc ()))
{
oneproc = 1;
thread_step_needed = 1;

View File

@ -120,6 +120,8 @@ static int in_monitor_wait = 0; /* Non-zero means we are in monitor_wait() */
static void (*ofunc)(); /* Old SIGINT signal handler */
static CORE_ADDR *breakaddr;
/* Extra remote debugging for developing a new rom monitor variation */
#if ! defined(EXTRA_RDEBUG)
#define EXTRA_RDEBUG 0
@ -796,6 +798,16 @@ monitor_open (args, mon_ops, from_tty)
SERIAL_FLUSH_INPUT (monitor_desc);
/* Alloc breakpoints */
if (mon_ops->set_break != NULL)
{
if (mon_ops->num_breakpoints == 0)
mon_ops->num_breakpoints = 8;
breakaddr = (CORE_ADDR *) xmalloc (mon_ops->num_breakpoints * sizeof (CORE_ADDR));
memset (breakaddr, 0, mon_ops->num_breakpoints * sizeof (CORE_ADDR));
}
/* Remove all breakpoints */
if (mon_ops->clr_all_break)
@ -831,6 +843,14 @@ monitor_close (quitting)
{
if (monitor_desc)
SERIAL_CLOSE (monitor_desc);
/* Free breakpoint memory */
if (breakaddr != NULL)
{
free (breakaddr);
breakaddr = NULL;
}
monitor_desc = NULL;
}
@ -1981,10 +2001,6 @@ monitor_mourn_inferior ()
generic_mourn_inferior (); /* Do all the proper things now */
}
#define NUM_MONITOR_BREAKPOINTS 8
static CORE_ADDR breakaddr[NUM_MONITOR_BREAKPOINTS] = {0};
/* Tell the monitor to add a breakpoint. */
static int
@ -2006,7 +2022,7 @@ monitor_insert_breakpoint (addr, shadow)
/* Determine appropriate breakpoint size for this address. */
bp = memory_breakpoint_from_pc (&addr, &bplen);
for (i = 0; i < NUM_MONITOR_BREAKPOINTS; i++)
for (i = 0; i < current_monitor->num_breakpoints; i++)
{
if (breakaddr[i] == 0)
{
@ -2018,7 +2034,7 @@ monitor_insert_breakpoint (addr, shadow)
}
}
error ("Too many breakpoints (> %d) for monitor.", NUM_MONITOR_BREAKPOINTS);
error ("Too many breakpoints (> %d) for monitor.", current_monitor->num_breakpoints);
}
/* Tell the monitor to remove a breakpoint. */
@ -2037,7 +2053,7 @@ monitor_remove_breakpoint (addr, shadow)
if (current_monitor->flags & MO_ADDR_BITS_REMOVE)
addr = ADDR_BITS_REMOVE (addr);
for (i = 0; i < NUM_MONITOR_BREAKPOINTS; i++)
for (i = 0; i < current_monitor->num_breakpoints; i++)
{
if (breakaddr[i] == addr)
{

View File

@ -78,7 +78,8 @@ struct monitor_ops
char *cont; /* continue command */
char *step; /* single step */
char *stop; /* Interrupt program string */
char *set_break; /* set a breakpoint */
char *set_break; /* set a breakpoint. If NULL, monitor implementation
sets its own to_insert_breakpoint method. */
char *clr_break; /* clear a breakpoint */
char *clr_all_break; /* Clear all breakpoints */
char *fill; /* Memory fill cmd (addr len val) */
@ -111,6 +112,8 @@ struct monitor_ops
struct target_ops *target; /* target operations */
int stopbits; /* number of stop bits */
char **regnames; /* array of register names in ascii */
int num_breakpoints; /* If set_break != NULL, number of supported
breakpoints */
int magic; /* Check value */
};

View File

@ -1,8 +1,8 @@
/* sh-stub.c -- debugging stub for the Hitachi-SH.
/* sh-stub.c -- debugging stub for the Hitachi-SH.
NOTE!! This code has to be compiled with optimization, otherwise the
function inlining which generates the exception handlers won't work.
*/
/* This is originally based on an m68k software stub written by Glenn
@ -147,33 +147,37 @@
#include <string.h>
#include <setjmp.h>
/* Hitachi SH architecture instruction encoding masks */
#define COND_BR_MASK 0xff00
#define UCOND_DBR_MASK 0xe000
#define UCOND_RBR_MASK 0xf0df
#define TRAPA_MASK 0xff00
#define COND_BR_MASK 0xff00
#define UCOND_DBR_MASK 0xe000
#define UCOND_RBR_MASK 0xf0df
#define TRAPA_MASK 0xff00
#define COND_DISP 0x00ff
#define UCOND_DISP 0x0fff
#define UCOND_REG 0x0f00
#define COND_DISP 0x00ff
#define UCOND_DISP 0x0fff
#define UCOND_REG 0x0f00
/* Hitachi SH instruction opcodes */
#define BF_INSTR 0x8b00
#define BT_INSTR 0x8900
#define BRA_INSTR 0xa000
#define BSR_INSTR 0xb000
#define JMP_INSTR 0x402b
#define JSR_INSTR 0x400b
#define RTS_INSTR 0x000b
#define RTE_INSTR 0x002b
#define TRAPA_INSTR 0xc300
#define BF_INSTR 0x8b00
#define BT_INSTR 0x8900
#define BRA_INSTR 0xa000
#define BSR_INSTR 0xb000
#define JMP_INSTR 0x402b
#define JSR_INSTR 0x400b
#define RTS_INSTR 0x000b
#define RTE_INSTR 0x002b
#define TRAPA_INSTR 0xc300
#define SSTEP_INSTR 0xc3ff
#define SSTEP_INSTR 0xc3ff
/* Hitachi SH processor register masks */
#define T_BIT_MASK 0x0001
#define T_BIT_MASK 0x0001
/*
* BUFMAX defines the maximum number of characters in inbound/outbound
* buffers at least NUMREGBYTES*2 are needed for register packets
* buffers. At least NUMREGBYTES*2 are needed for register packets.
*/
#define BUFMAX 1024
@ -228,23 +232,10 @@ void breakpoint (void);
int init_stack[init_stack_size] __attribute__ ((section ("stack"))) = {0};
int stub_stack[stub_stack_size] __attribute__ ((section ("stack"))) = {0};
typedef struct
{
void (*func_cold) ();
int *stack_cold;
void (*func_warm) ();
int *stack_warm;
void (*(handler[256 - 4])) ();
}
vec_type;
void INIT ();
void BINIT ();
/* When you link take care that this is at address 0 -
or wherever your vbr points */
#define CPU_BUS_ERROR_VEC 9
#define DMA_BUS_ERROR_VEC 10
#define NMI_VEC 11
@ -255,270 +246,6 @@ void BINIT ();
#define USER_VEC 255
#define BCR (*(volatile short *)(0x05FFFFA0)) /* Bus control register */
#define BAS (0x800) /* Byte access select */
#define WCR1 (*(volatile short *)(0x05ffffA2)) /* Wait state control register */
const vec_type vectable =
{
&BINIT, /* 0: Power-on reset PC */
init_stack + init_stack_size, /* 1: Power-on reset SP */
&BINIT, /* 2: Manual reset PC */
init_stack + init_stack_size, /* 3: Manual reset SP */
{
&catch_exception_4, /* 4: General invalid instruction */
&catch_exception_random, /* 5: Reserved for system */
&catch_exception_6, /* 6: Invalid slot instruction */
&catch_exception_random, /* 7: Reserved for system */
&catch_exception_random, /* 8: Reserved for system */
&catch_exception_9, /* 9: CPU bus error */
&catch_exception_10, /* 10: DMA bus error */
&catch_exception_11, /* 11: NMI */
&catch_exception_random, /* 12: User break */
&catch_exception_random, /* 13: Reserved for system */
&catch_exception_random, /* 14: Reserved for system */
&catch_exception_random, /* 15: Reserved for system */
&catch_exception_random, /* 16: Reserved for system */
&catch_exception_random, /* 17: Reserved for system */
&catch_exception_random, /* 18: Reserved for system */
&catch_exception_random, /* 19: Reserved for system */
&catch_exception_random, /* 20: Reserved for system */
&catch_exception_random, /* 21: Reserved for system */
&catch_exception_random, /* 22: Reserved for system */
&catch_exception_random, /* 23: Reserved for system */
&catch_exception_random, /* 24: Reserved for system */
&catch_exception_random, /* 25: Reserved for system */
&catch_exception_random, /* 26: Reserved for system */
&catch_exception_random, /* 27: Reserved for system */
&catch_exception_random, /* 28: Reserved for system */
&catch_exception_random, /* 29: Reserved for system */
&catch_exception_random, /* 30: Reserved for system */
&catch_exception_random, /* 31: Reserved for system */
&catch_exception_32, /* 32: Trap instr (user vectors) */
&catch_exception_33, /* 33: Trap instr (user vectors) */
&catch_exception_random, /* 34: Trap instr (user vectors) */
&catch_exception_random, /* 35: Trap instr (user vectors) */
&catch_exception_random, /* 36: Trap instr (user vectors) */
&catch_exception_random, /* 37: Trap instr (user vectors) */
&catch_exception_random, /* 38: Trap instr (user vectors) */
&catch_exception_random, /* 39: Trap instr (user vectors) */
&catch_exception_random, /* 40: Trap instr (user vectors) */
&catch_exception_random, /* 41: Trap instr (user vectors) */
&catch_exception_random, /* 42: Trap instr (user vectors) */
&catch_exception_random, /* 43: Trap instr (user vectors) */
&catch_exception_random, /* 44: Trap instr (user vectors) */
&catch_exception_random, /* 45: Trap instr (user vectors) */
&catch_exception_random, /* 46: Trap instr (user vectors) */
&catch_exception_random, /* 47: Trap instr (user vectors) */
&catch_exception_random, /* 48: Trap instr (user vectors) */
&catch_exception_random, /* 49: Trap instr (user vectors) */
&catch_exception_random, /* 50: Trap instr (user vectors) */
&catch_exception_random, /* 51: Trap instr (user vectors) */
&catch_exception_random, /* 52: Trap instr (user vectors) */
&catch_exception_random, /* 53: Trap instr (user vectors) */
&catch_exception_random, /* 54: Trap instr (user vectors) */
&catch_exception_random, /* 55: Trap instr (user vectors) */
&catch_exception_random, /* 56: Trap instr (user vectors) */
&catch_exception_random, /* 57: Trap instr (user vectors) */
&catch_exception_random, /* 58: Trap instr (user vectors) */
&catch_exception_random, /* 59: Trap instr (user vectors) */
&catch_exception_random, /* 60: Trap instr (user vectors) */
&catch_exception_random, /* 61: Trap instr (user vectors) */
&catch_exception_random, /* 62: Trap instr (user vectors) */
&catch_exception_random, /* 63: Trap instr (user vectors) */
&catch_exception_random, /* 64: IRQ0 */
&catch_exception_random, /* 65: IRQ1 */
&catch_exception_random, /* 66: IRQ2 */
&catch_exception_random, /* 67: IRQ3 */
&catch_exception_random, /* 68: IRQ4 */
&catch_exception_random, /* 69: IRQ5 */
&catch_exception_random, /* 70: IRQ6 */
&catch_exception_random, /* 71: IRQ7 */
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_255}};
char in_nmi; /* Set when handling an NMI, so we don't reenter */
int dofault; /* Non zero, bus errors will raise exception */
@ -1085,6 +812,306 @@ breakpoint (void)
BREAKPOINT ();
}
/**** Processor-specific routines start here ****/
/**** Processor-specific routines start here ****/
/**** Processor-specific routines start here ****/
/* Note:
The Hitachi SH family uses two exception architectures:
SH1 & SH2:
These processors utilize an exception vector table.
Exceptions are vectored to the address stored at VBR + (exception_num * 4)
SH3, SH3E, & SH4:
These processors have fixed entry points relative to the VBR for
various exception classes.
*/
#if defined(__sh1__) || defined(__sh2__)
/* SH1/SH2 exception vector table format */
typedef struct
{
void (*func_cold) ();
int *stack_cold;
void (*func_warm) ();
int *stack_warm;
void (*(handler[256 - 4])) ();
}
vec_type;
/* vectable is the SH1/SH2 vector table. It must be at address 0
or wherever your vbr points. */
const vec_type vectable =
{
&BINIT, /* 0: Power-on reset PC */
init_stack + init_stack_size, /* 1: Power-on reset SP */
&BINIT, /* 2: Manual reset PC */
init_stack + init_stack_size, /* 3: Manual reset SP */
{
&catch_exception_4, /* 4: General invalid instruction */
&catch_exception_random, /* 5: Reserved for system */
&catch_exception_6, /* 6: Invalid slot instruction */
&catch_exception_random, /* 7: Reserved for system */
&catch_exception_random, /* 8: Reserved for system */
&catch_exception_9, /* 9: CPU bus error */
&catch_exception_10, /* 10: DMA bus error */
&catch_exception_11, /* 11: NMI */
&catch_exception_random, /* 12: User break */
&catch_exception_random, /* 13: Reserved for system */
&catch_exception_random, /* 14: Reserved for system */
&catch_exception_random, /* 15: Reserved for system */
&catch_exception_random, /* 16: Reserved for system */
&catch_exception_random, /* 17: Reserved for system */
&catch_exception_random, /* 18: Reserved for system */
&catch_exception_random, /* 19: Reserved for system */
&catch_exception_random, /* 20: Reserved for system */
&catch_exception_random, /* 21: Reserved for system */
&catch_exception_random, /* 22: Reserved for system */
&catch_exception_random, /* 23: Reserved for system */
&catch_exception_random, /* 24: Reserved for system */
&catch_exception_random, /* 25: Reserved for system */
&catch_exception_random, /* 26: Reserved for system */
&catch_exception_random, /* 27: Reserved for system */
&catch_exception_random, /* 28: Reserved for system */
&catch_exception_random, /* 29: Reserved for system */
&catch_exception_random, /* 30: Reserved for system */
&catch_exception_random, /* 31: Reserved for system */
&catch_exception_32, /* 32: Trap instr (user vectors) */
&catch_exception_33, /* 33: Trap instr (user vectors) */
&catch_exception_random, /* 34: Trap instr (user vectors) */
&catch_exception_random, /* 35: Trap instr (user vectors) */
&catch_exception_random, /* 36: Trap instr (user vectors) */
&catch_exception_random, /* 37: Trap instr (user vectors) */
&catch_exception_random, /* 38: Trap instr (user vectors) */
&catch_exception_random, /* 39: Trap instr (user vectors) */
&catch_exception_random, /* 40: Trap instr (user vectors) */
&catch_exception_random, /* 41: Trap instr (user vectors) */
&catch_exception_random, /* 42: Trap instr (user vectors) */
&catch_exception_random, /* 43: Trap instr (user vectors) */
&catch_exception_random, /* 44: Trap instr (user vectors) */
&catch_exception_random, /* 45: Trap instr (user vectors) */
&catch_exception_random, /* 46: Trap instr (user vectors) */
&catch_exception_random, /* 47: Trap instr (user vectors) */
&catch_exception_random, /* 48: Trap instr (user vectors) */
&catch_exception_random, /* 49: Trap instr (user vectors) */
&catch_exception_random, /* 50: Trap instr (user vectors) */
&catch_exception_random, /* 51: Trap instr (user vectors) */
&catch_exception_random, /* 52: Trap instr (user vectors) */
&catch_exception_random, /* 53: Trap instr (user vectors) */
&catch_exception_random, /* 54: Trap instr (user vectors) */
&catch_exception_random, /* 55: Trap instr (user vectors) */
&catch_exception_random, /* 56: Trap instr (user vectors) */
&catch_exception_random, /* 57: Trap instr (user vectors) */
&catch_exception_random, /* 58: Trap instr (user vectors) */
&catch_exception_random, /* 59: Trap instr (user vectors) */
&catch_exception_random, /* 60: Trap instr (user vectors) */
&catch_exception_random, /* 61: Trap instr (user vectors) */
&catch_exception_random, /* 62: Trap instr (user vectors) */
&catch_exception_random, /* 63: Trap instr (user vectors) */
&catch_exception_random, /* 64: IRQ0 */
&catch_exception_random, /* 65: IRQ1 */
&catch_exception_random, /* 66: IRQ2 */
&catch_exception_random, /* 67: IRQ3 */
&catch_exception_random, /* 68: IRQ4 */
&catch_exception_random, /* 69: IRQ5 */
&catch_exception_random, /* 70: IRQ6 */
&catch_exception_random, /* 71: IRQ7 */
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_random,
&catch_exception_255}};
#define BCR (*(volatile short *)(0x05FFFFA0)) /* Bus control register */
#define BAS (0x800) /* Byte access select */
#define WCR1 (*(volatile short *)(0x05ffffA2)) /* Wait state control register */
asm ("_BINIT: mov.l L1,r15");
asm ("bra _INIT");
asm ("nop");
@ -1547,3 +1574,4 @@ handleError (char theSSR)
SSR1 &= ~(SCI_ORER | SCI_PER | SCI_FER);
}
#endif

View File

@ -1,3 +1,17 @@
1999-05-17 Keith Seitz <keiths@cygnus.com>
* gdb.base/call-ar-st.exp: Skip "print print_double_array (double_array)"
when "skip_float_tests" set.
Ditto for "print print_double_array(array_d)", "print print_small_structs",
"print print_ten_doubles", and "step into print_long_arg_list".
Don't assume we can step into "print_long_arg_list": we could step into memcpy.
* gdb.base/call-rt-st.exp: Don't run float-related tests when "skip_float_tests"
is set: "print print_one_double(*d1)" and "print print_two_floats(*f3)".
* gdb.base/funcargs.exp: Don't run "float_and_integral_args" when
"skip_float_tests" is set.
* gdb.base/varargs.exp: Skip "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)"
when "skip_float_tests" set.
1999-05-06 Keith Seitz <keiths@cygnus.com>
* gdb.base/annota2.cc: Include stdio.h.

View File

@ -112,15 +112,16 @@ gdb_test continue \
#call print_double_array(double_array)
send_gdb "print print_double_array(double_array)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_double_array(double_array)\n"
gdb_expect {
-re "array_d :\[ \t\r\n\]+=========\[ \t\r\n\]+\[ \t\r\n\]+0.000000\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600\[ \t\r\n\]+211.110300 234.567000 258.023700 281.480400 304.937100 328.393800 351.850500 375.307200\[ \t\r\n\]+398.763900 422.220600 445.677300 469.134000 492.590700 516.047400 539.504100 562.960800\[ \t\r\n\]+586.417500 609.874200 633.330900 656.787600 680.244300 703.701000 727.157700 750.614400\[ \t\r\n\]+774.071100 797.527800 820.984500 844.441200 867.897900 891.354600 914.811300 938.268000\[ \t\r\n\]+961.724700 985.181400 1008.638100 1032.094800 1055.551500 1079.008200 1102.464900 1125.921600\[ \t\r\n\]+1149.378300 1172.835000 1196.291700 1219.748400 1243.205100 1266.661800 1290.118500 1313.575200\[ \t\r\n\]+1337.031900 1360.488600 1383.945300 1407.402000 1430.858700 1454.315400 1477.772100 1501.228800\[ \t\r\n\]+1524.685500 1548.142200 1571.598900 1595.055600 1618.512300 1641.969000 1665.425700 1688.882400\[ \t\r\n\]+1712.339100 1735.795800 1759.252500 1782.709200 1806.165900 1829.622600 1853.079300 1876.536000\[ \t\r\n\]+1899.992700 1923.449400 1946.906100 1970.362800 1993.819500 2017.276200 2040.732900 2064.189600\[ \t\r\n\]+2087.646300 2111.103000 2134.559700 2158.016400 2181.473100 2204.929800 2228.386500 2251.843200\[ \t\r\n\]+2275.299900 2298.756600 2322.213300\[ \t\r\n\]+\[ \t\r\n\]+.*$gdb_prompt $" {
pass "print print_double_array(double_array)"
}
pass "print print_double_array(double_array)"
}
-re ".*$gdb_prompt $" { fail "print print_double_array(double_array)" }
timeout { fail "(timeout) print print_double_array(double_array)" }
}
}
#call print_char_array(char_array)
@ -191,15 +192,16 @@ gdb_test continue \
#call print_double_array(array_d)
send_gdb "print print_double_array(array_d)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_double_array(array_d)\n"
gdb_expect {
-re "array_d :\[ \t\r\n\]+=========\[ \t\r\n\]+\[ \t\r\n\]+0.000000\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600\[ \t\r\n\]+211.110300 234.567000 258.023700 281.480400 304.937100 328.393800 351.850500 375.307200\[ \t\r\n\]+398.763900 422.220600 445.677300 469.134000 492.590700 516.047400 539.504100 562.960800\[ \t\r\n\]+586.417500 609.874200 633.330900 656.787600 680.244300 703.701000 727.157700 750.614400\[ \t\r\n\]+774.071100 797.527800 820.984500 844.441200 867.897900 891.354600 914.811300 938.268000\[ \t\r\n\]+961.724700 985.181400 1008.638100 1032.094800 1055.551500 1079.008200 1102.464900 1125.921600\[ \t\r\n\]+1149.378300 1172.835000 1196.291700 1219.748400 1243.205100 1266.661800 1290.118500 1313.575200\[ \t\r\n\]+1337.031900 1360.488600 1383.945300 1407.402000 1430.858700 1454.315400 1477.772100 1501.228800\[ \t\r\n\]+1524.685500 1548.142200 1571.598900 1595.055600 1618.512300 1641.969000 1665.425700 1688.882400\[ \t\r\n\]+1712.339100 1735.795800 1759.252500 1782.709200 1806.165900 1829.622600 1853.079300 1876.536000\[ \t\r\n\]+1899.992700 1923.449400 1946.906100 1970.362800 1993.819500 2017.276200 2040.732900 2064.189600\[ \t\r\n\]+2087.646300 2111.103000 2134.559700 2158.016400 2181.473100 2204.929800 2228.386500 2251.843200\[ \t\r\n\]+2275.299900 2298.756600 2322.213300\[ \t\r\n\]+\[ \t\r\n\]+.*$gdb_prompt $" {
pass "print print_double_array(array_d)"
}
pass "print print_double_array(array_d)"
}
-re ".*$gdb_prompt $" { fail "print print_double_array(array_d)" }
timeout { fail "(timeout) print print_double_array(array_d)" }
}
}
#go -until 1034
gdb_test "tbreak 1034" \
@ -298,15 +300,16 @@ gdb_expect {
#call print_small_structs(*struct1, *struct2, *struct3, *struct4,*flags, *flags_combo,
#*three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
send_gdb "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
gdb_expect {
-re ".*alpha\[\t\r\n \]+gamma\[\t\r\n \]+epsilon\[\t\r\n \]+alpha\[\t\r\n \]+gamma\[\t\r\n \]+epsilon\[\t\r\n \]+ch1: y\tch2: n\[\t\r\n \]+Contents of three_char_t:\[\t\r\n \]+a\tb\tc\[\t\r\n \]+Contents of five_char_t:\[\t\r\n \]+l\tm\tn\to\tp\[\t\r\n \]+Contents of int_char_combo_t:\[\t\r\n \]+123.*z\[\t\r\n \]+Sum of the 4 struct values and seed :\[\t\r\n \]+52\[\t\r\n \]+Contents of struct1:\[\t\r\n \]+6.*0\[\t\r\n \]+Contents of struct2:\[\t\r\n \]+10.*0\[\t\r\n \]+Contents of struct3:\[\t\r\n \]+12.*0\[\t\r\n \]+Contents of one_double_t:\[\t\r\n \]+10.500000\[\t\r\n \]+Contents of one_double_t:.*-3.340000\[\t\r\n \]+Contents of one_double_t:.*675.091230\[\t\r\n \]+Contents of two_floats_t:.*45.234001.*43.599998\[\t\r\n \]+Contents of two_floats_t:.*78.010002.*122.099998\[\t\r\n \]+Contents of two_floats_t:.*-1232.344971.*-199.210007\[\t\r\n \]+.*$gdb_prompt $" {
pass "print print_small_structs"
}
pass "print print_small_structs"
}
-re ".*$gdb_prompt $" { fail "print print_small_structs" }
timeout { fail "(timeout) print_small_structs" }
}
}
#call compute_with_small_structs(20)
send_gdb "print compute_with_small_structs(20)\n"
@ -320,14 +323,16 @@ gdb_expect {
#call print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)
send_gdb "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)\n"
gdb_expect {
-re ".*Two Doubles : 123.456000.*123.456000\[\t\r\n \]+Two Doubles : -0.120000.*-1.230000\[\t\r\n \]+Two Doubles : 343434.800000.*89.098000\[\t\r\n \]+Two Doubles : 3.140000.*-5678.123450\[\t\r\n \]+Two Doubles : -0.111111.*216.970650\[\t\r\n \]+.*$gdb_prompt $" {
pass "print print_ten_doubles"
}
pass "print print_ten_doubles"
}
-re ".*$gdb_prompt $" { fail "print print_ten_doubles" }
timeout { fail "(timeout) print_ten_doubles" }
}
}
#go -until 1084
gdb_test "tbreak 1084" \
@ -336,25 +341,36 @@ gdb_test "tbreak 1084" \
gdb_test continue "Continuing\\..*main \\(.*\\) at.*call-ar-st.c:1084\[\t\r\n \]+1084.*print_long_arg_list \\( a, b, c, d, e, f, .struct1, .struct2, .struct3, .struct4,.*" "continue to 1084"
send_gdb "step\n"
gdb_expect {
-re ".*print_long_arg_list \\(a=22.219999999999999, b=33.332999999999998, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.3399999999999999\}, d3=\{double1 = 675.09123\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at ${srcdir}/${subdir}/${srcfile}:813\[\r\n\]+813\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {pass "step into print_long_arg_list"}
-re ".*$gdb_prompt $" { fail "step into print_long_arg_list" }
timeout { fail "step into print_long_arg_list (timeout)" }
}
# We can't just assume that a "step" will get us into print_long_arg_list here,either.
gdb_test "tbreak print_long_arg_list" \
"Breakpoint .* file .*call-ar-st.c, line .*" \
"tbreak in print_long_arg_list after stepping into memcpy"
send_gdb "continue\n"
if {![target_info exists gdb,skip_float_tests]} {
gdb_expect {
-re ".*print_long_arg_list \\(a=22.219999999999999, b=33.332999999999998, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.3399999999999999\}, d3=\{double1 = 675.09123\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at ${srcdir}/${subdir}/${srcfile}:813\[\r\n\]+813\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {pass "step into print_long_arg_list"}
-re ".*$gdb_prompt $" { fail "step into print_long_arg_list" }
timeout { fail "step into print_long_arg_list (timeout)" }
}
} else {
gdb_expect {
-re ".*print_long_arg_list \\(.*\\).*$gdb_prompt $" { pass "step into print_long_arg_list" }
-re ".*$gdb_prompt $" { fail "step into print_long_arg_list" }
timeout { fail "step into print_long_arg_list (timeout)" }
}
}
#call print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)
send_gdb "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)\n"
gdb_expect {
-re ".*alpha\[\t\r\n \]+gamma\[\t\r\n \]+epsilon\[\t\r\n \]+alpha\[\t\r\n \]+gamma\[\t\r\n \]+epsilon\[\t\r\n \]+ch1: y\tch2: n\[\t\r\n \]+Contents of three_char_t:\[\t\r\n \]+a\tb\tc\[\t\r\n \]+Contents of five_char_t:\[\t\r\n \]+l\tm\tn\to\tp\[\t\r\n \]+Contents of int_char_combo_t:\[\t\r\n \]+123.*z\[\t\r\n \]+Sum of the 4 struct values and seed :\[\t\r\n \]+52\[\t\r\n \]+Contents of struct1:\[\t\r\n \]+6.*0\[\t\r\n \]+Contents of struct2:\[\t\r\n \]+10.*0\[\t\r\n \]+Contents of struct3:\[\t\r\n \]+12.*0\[\t\r\n \]+Contents of one_double_t:\[\t\r\n \]+10.500000\[\t\r\n \]+Contents of one_double_t:\[\t\r\n \]+-3.340000\[\t\r\n \]+Contents of one_double_t:\[\t\r\n \]+675.091230\[\t\r\n \]+Contents of two_floats_t:\[\t\r\n \]+45.234001.*43.599998\[\t\r\n \]+Contents of two_floats_t:\[\t\r\n \]+78.010002.*122.099998\[\t\r\n \]+Contents of two_floats_t:\[\t\r\n \]+-1232.344971.*-199.210007\[\t\r\n \]+.*$gdb_prompt $" {
pass "print print_small_structs from print_long_arg_list "
}
pass "print print_small_structs from print_long_arg_list "
}
-re ".*$gdb_prompt $" { fail "print print_small_structs from print_long_arg_list" }
timeout { fail "(timeout) print_small_structs from print_long_arg_list" }
}
}
#go -until 1098
@ -362,9 +378,8 @@ gdb_test "tbreak 1098" \
"Breakpoint.* file .*call-ar-st.c, line 1098.*" \
"tbreakpoint line 1098"
gdb_test continue "Continuing\\..*Contents of two_floats_t:.*-1232.344971.*-199.210007.*main \\(\\) at.*call-ar-st.c:1098.*1098.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
"continue to 1098"
gdb_test continue "Continuing\\..*Contents of two_floats_t:.*main \\(\\) at.*call-ar-st.c:1098.*1098.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
"continue to 1098"
#step
send_gdb "step\n"
@ -396,14 +411,16 @@ gdb_test continue "Continuing\\..*main \\(\\) at .*call-ar-st.c:1103\[\r\n\t \]+
"continue to 1103"
#call print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
send_gdb "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
gdb_expect {
-re ".*double : 22.220000.*double : 33.333000.*int : 0.*int : -25.*int : 100.*int : 2345.*alpha.*gamma.*epsilon.*ch1: y\tch2: n.*Contents of three_char_t:.*x\ty\tz.*Contents of five_char_t:.*h\te\tl\tl\to.*Contents of int_char_combo_t:.*123\tz.*Sum of the 4 struct values and seed :.*52.*Contents of struct1:.*6\[ \]+0.*Contents of struct2:.*10\[ \]+0.*Contents of struct3:.*12.*0.*Contents of one_double_t:\[ \n\r\t\]+1.111110\[ \n\r\t\]+Contents of one_double_t:\[ \n\r\t\]+-345.340000\[ \n\r\t\]+Contents of one_double_t:\[ \n\r\t\]+546464.200000\[ \n\r\t\]+Contents of two_floats_t:\[ \n\r\t\]+0.234000\t453.100006\[ \n\r\t\]+Contents of two_floats_t:\[ \n\r\t\]+78.345001\t23.090000\[ \n\r\t\]+Contents of two_floats_t:\[ \n\r\t\]+-2.345000\t1.000000.*$gdb_prompt $" {
pass "print print_long_arg_list"
}
pass "print print_long_arg_list"
}
-re ".*$gdb_prompt $" { fail "print print_long_arg_list" }
timeout { fail "(timeout) print_long_arg_list" }
}
}
#go -until 1109

View File

@ -147,25 +147,25 @@ gdb_expect {
timeout { fail "(timeout) print_one_large_struct(*list1)" }
}
send_gdb "print print_one_double(*d1)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print print_one_double(*d1)\n"
gdb_expect {
-re ".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+.\[0-9\]+ = \{double1 = 1\\.11111\}.*$gdb_prompt $" {
pass "print print_one_double(*d1)"
}
pass "print print_one_double(*d1)"
}
-re ".*$gdb_prompt $" { fail "print print_one_double(*d1)" }
timeout { fail "(timeout) print_one_double(*d1)" }
}
send_gdb "print print_two_floats(*f3)\n"
gdb_expect {
send_gdb "print print_two_floats(*f3)\n"
gdb_expect {
-re ".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+.\[0-9\]+ = \{float1 = -2\\.34500003, float2 = 1\}.*$gdb_prompt $" {
pass "print print_two_floats(*f3)"
}
pass "print print_two_floats(*f3)"
}
-re ".*$gdb_prompt $" { fail "print print_two_floats(*f3)" }
timeout { fail "(timeout) print_two_floats(*f3)" }
}
}
send_gdb "print print_bit_flags(*flags)\n"
gdb_expect {

View File

@ -994,7 +994,9 @@ integral_args
funcargs_reload
unsigned_integral_args
funcargs_reload
float_and_integral_args
if {![target_info exists gdb,skip_float_tests]} {
float_and_integral_args
}
funcargs_reload
pointer_args
funcargs_reload

View File

@ -128,12 +128,14 @@ gdb_expect {
}
send_gdb "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)\n"
gdb_expect {
if {![target_info exists gdb,skip_float_tests]} {
send_gdb "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)\n"
gdb_expect {
-re ".*find_max\\(.*\\) returns 17\\.000000\[ \r\n\]+.\[0-9\]+ = 17.*$gdb_prompt $" {
pass "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)"
}
pass "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)"
}
-re ".*$gdb_prompt $" { fail "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)" }
timeout { fail "(timeout) print find_max_double(5,1.0,17.0,2.0,3.0,4.0)" }
}
}

View File

@ -763,23 +763,24 @@ get_command_line (type, arg)
/* Recursively print a command (including full control structures). */
void
print_command_line (cmd, depth)
print_command_line (cmd, depth, stream)
struct command_line *cmd;
unsigned int depth;
GDB_FILE *stream;
{
unsigned int i;
if (depth)
{
for (i = 0; i < depth; i++)
fputs_filtered (" ", gdb_stdout);
fputs_filtered (" ", stream);
}
/* A simple command, print it and return. */
if (cmd->control_type == simple_control)
{
fputs_filtered (cmd->line, gdb_stdout);
fputs_filtered ("\n", gdb_stdout);
fputs_filtered (cmd->line, stream);
fputs_filtered ("\n", stream);
return;
}
@ -787,14 +788,14 @@ print_command_line (cmd, depth)
and return. */
if (cmd->control_type == continue_control)
{
fputs_filtered ("loop_continue\n", gdb_stdout);
fputs_filtered ("loop_continue\n", stream);
return;
}
/* loop_break to break out of a while loop, print it and return. */
if (cmd->control_type == break_control)
{
fputs_filtered ("loop_break\n", gdb_stdout);
fputs_filtered ("loop_break\n", stream);
return;
}
@ -802,13 +803,13 @@ print_command_line (cmd, depth)
if (cmd->control_type == while_control)
{
struct command_line *list;
fputs_filtered ("while ", gdb_stdout);
fputs_filtered (cmd->line, gdb_stdout);
fputs_filtered ("\n", gdb_stdout);
fputs_filtered ("while ", stream);
fputs_filtered (cmd->line, stream);
fputs_filtered ("\n", stream);
list = *cmd->body_list;
while (list)
{
print_command_line (list, depth + 1);
print_command_line (list, depth + 1, stream);
list = list->next;
}
}
@ -816,11 +817,11 @@ print_command_line (cmd, depth)
/* An if command. Recursively print both arms before returning. */
if (cmd->control_type == if_control)
{
fputs_filtered ("if ", gdb_stdout);
fputs_filtered (cmd->line, gdb_stdout);
fputs_filtered ("\n", gdb_stdout);
fputs_filtered ("if ", stream);
fputs_filtered (cmd->line, stream);
fputs_filtered ("\n", stream);
/* The true arm. */
print_command_line (cmd->body_list[0], depth + 1);
print_command_line (cmd->body_list[0], depth + 1, stream);
/* Show the false arm if it exists. */
if (cmd->body_count == 2)
@ -828,17 +829,17 @@ print_command_line (cmd, depth)
if (depth)
{
for (i = 0; i < depth; i++)
fputs_filtered (" ", gdb_stdout);
fputs_filtered (" ", stream);
}
fputs_filtered ("else\n", gdb_stdout);
print_command_line (cmd->body_list[1], depth + 1);
fputs_filtered ("else\n", stream);
print_command_line (cmd->body_list[1], depth + 1, stream);
}
if (depth)
{
for (i = 0; i < depth; i++)
fputs_filtered (" ", gdb_stdout);
fputs_filtered (" ", stream);
}
fputs_filtered ("end\n", gdb_stdout);
fputs_filtered ("end\n", stream);
}
}

View File

@ -1,3 +1,9 @@
1999-05-17 Keith Seitz <keiths@cygnus.com>
* interp.c (NUM_MCORE_REGS): Increase by one to allow access to PC.
(sim_resume): Correct off by one instruction error when a breakpoint
is hit.
1999-05-08 Felix Lee <flee@cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.

View File

@ -118,8 +118,8 @@ union
word asints [1]; /* but accessed larger... */
} cpu;
#define LAST_VALID_CREG 12 /* only 0..12 implemented */
#define NUM_MCORE_REGS (16 + 16 + LAST_VALID_CREG)
#define LAST_VALID_CREG 32 /* only 0..12 implemented */
#define NUM_MCORE_REGS (16 + 16 + LAST_VALID_CREG + 1)
int memcycles = 1;
@ -840,6 +840,7 @@ sim_resume (sd, step, siggnal)
{
case 0x0: /* bkpt */
cpu.asregs.exception = SIGTRAP;
pc -= 2;
break;
case 0x1: /* sync */