From de6a2704094abee6cdd46e626908bdf32db25882 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 6 Jul 1993 17:15:02 +0000 Subject: [PATCH] * Makefile.in (ALLPARAM): Add config/{alpha/xm-alpha.h,pa/xm-pa.h}. (ALLCONFIG): Add config/alpha/alpha-osf1.mh. * infcmd.c (_initialize_infcmd): In docstring for "continue", describe argument as setting ignore count. --- gdb/ChangeLog | 8 ++++ gdb/Makefile.in | 7 +++- gdb/infcmd.c | 98 ++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 97 insertions(+), 16 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fb9fefd1ca..a83d2b8ad1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +Tue Jul 6 11:51:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * Makefile.in (ALLPARAM): Add config/{alpha/xm-alpha.h,pa/xm-pa.h}. + (ALLCONFIG): Add config/alpha/alpha-osf1.mh. + + * infcmd.c (_initialize_infcmd): In docstring for "continue", + describe argument as setting ignore count. + Sun Jul 4 15:04:47 1993 Doug Evans (dje@cygnus.com) * h8300-tdep.c (examine_prologue): Fix call to diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 583500227a..8d21ccb237 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -809,7 +809,8 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \ xcoffexec.c xcoffread.c xcoffsolib.c z8k-tdep.c ALLPARAM = config/a29k/nm-ultra3.h config/a29k/tm-a29k.h \ - config/a29k/tm-ultra3.h config/a29k/xm-ultra3.h config/arm/tm-arm.h \ + config/a29k/tm-ultra3.h config/a29k/xm-ultra3.h \ + config/alpha/xm-alpha.h config/arm/tm-arm.h \ config/arm/xm-arm.h config/convex/tm-convex.h \ config/convex/xm-convex.h config/gould/tm-np1.h config/gould/tm-pn.h \ config/gould/xm-np1.h config/gould/xm-pn.h config/h8300/tm-h8300.h \ @@ -856,7 +857,8 @@ ALLPARAM = config/a29k/nm-ultra3.h config/a29k/tm-a29k.h \ config/ns32k/nm-umax.h config/ns32k/tm-merlin.h config/ns32k/tm-umax.h \ config/ns32k/xm-merlin.h config/ns32k/xm-umax.h config/pa/nm-hppab.h \ config/pa/nm-hppah.h config/pa/tm-hppab.h config/pa/tm-hppah.h \ - config/pa/xm-hppab.h config/pa/xm-hppah.h config/pyr/tm-pyr.h \ + config/pa/xm-hppab.h config/pa/xm-hppah.h config/pa/xm-pa.h \ + config/pyr/tm-pyr.h \ config/pyr/xm-pyr.h config/romp/xm-rtbsd.h config/rs6000/nm-rs6000.h \ config/rs6000/tm-rs6000.h config/rs6000/xm-rs6000.h config/sh/tm-sh.h \ config/sparc/nm-sun4os4.h config/sparc/tm-sparclite.h \ @@ -869,6 +871,7 @@ ALLPARAM = config/a29k/nm-ultra3.h config/a29k/tm-a29k.h \ ALLCONFIG = config/a29k/a29k-kern.mt config/a29k/a29k-udi.mt \ config/a29k/a29k.mt config/a29k/ultra3.mh config/a29k/ultra3.mt \ + config/alpha/alpha-osf1.mh \ config/arm/arm.mh config/arm/arm.mt config/convex/convex.mh \ config/convex/convex.mt config/gould/np1.mh config/gould/np1.mt \ config/gould/pn.mh config/gould/pn.mt config/h8300/h8300hms.mt \ diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 666be8eecb..389ed17f71 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -493,10 +493,25 @@ signal_command (signum_exp, from_tty) if (!signum_exp) error_no_arg ("signal number"); - signum = parse_and_eval_address (signum_exp); + /* It would be even slicker to make signal names be valid expressions, + (the type could be "enum $signal" or some such), then the user could + assign them to convenience variables. */ + signum = strtosigno (signum_exp); + + if (signum == 0) + /* Not found as a name, try it as an expression. */ + signum = parse_and_eval_address (signum_exp); if (from_tty) - printf_filtered ("Continuing with signal %d.\n", signum); + { + char *signame = strsigno (signum); + printf_filtered ("Continuing with signal "); + if (signame == NULL || signum == 0) + printf_filtered ("%d.\n", signum); + else + /* Do we need to print the number as well as the name? */ + printf_filtered ("%s (%d).\n", signame, signum); + } clear_proceed_status (); proceed (stop_pc, signum, 0); @@ -730,12 +745,19 @@ program_info (args, from_tty) num = bpstat_num (&bs); } } - else if (stop_signal) { + else if (stop_signal) + { #ifdef PRINT_RANDOM_SIGNAL - PRINT_RANDOM_SIGNAL (stop_signal); + PRINT_RANDOM_SIGNAL (stop_signal); #else - printf_filtered ("It stopped with signal %d (%s).\n", - stop_signal, safe_strsignal (stop_signal)); + char *signame = strsigno (stop_signal); + printf_filtered ("It stopped with signal "); + if (signame == NULL) + printf_filtered ("%d", stop_signal); + else + /* Do we need to print the number as well as the name? */ + printf_filtered ("%s (%d)", signame, stop_signal); + printf_filtered (", %s.\n", safe_strsignal (stop_signal)); #endif } @@ -890,8 +912,9 @@ path_command (dirname, from_tty) path_info ((char *)NULL, from_tty); } -/* XXX - This routine is getting awfully cluttered with #if's. It's probably - time to turn this into target_read_pc. Ditto for write_pc. */ +/* This routine is getting awfully cluttered with #if's. It's probably + time to turn this into READ_PC and define it in the tm.h file. + Ditto for write_pc. */ CORE_ADDR read_pc () @@ -903,8 +926,8 @@ read_pc () return read_register(31) & ~0x3; /* User PC is here when in sys call */ return read_register (PC_REGNUM) & ~0x3; #else -#ifdef GDB_TARGET_IS_H8500 - return (read_register (SEG_C_REGNUM) << 16) | read_register (PC_REGNUM); +#ifdef TARGET_READ_PC + return TARGET_READ_PC (); #else return ADDR_BITS_REMOVE ((CORE_ADDR) read_register (PC_REGNUM)); #endif @@ -915,6 +938,9 @@ void write_pc (val) CORE_ADDR val; { +#ifdef TARGET_WRITE_PC + TARGET_WRITE_PC (val); +#else write_register (PC_REGNUM, (long) val); #ifdef NPC_REGNUM write_register (NPC_REGNUM, (long) val + 4); @@ -922,12 +948,55 @@ write_pc (val) write_register (NNPC_REGNUM, (long) val + 8); #endif #endif -#ifdef GDB_TARGET_IS_H8500 - write_register (SEG_C_REGNUM, val >> 16); #endif pc_changed = 0; } +/* Cope with strage ways of getting to the stack and frame pointers */ + +CORE_ADDR +read_sp () +{ +#ifdef TARGET_READ_SP + return TARGET_READ_SP (); +#else + return read_register (SP_REGNUM); +#endif +} + +void +write_sp (val) + CORE_ADDR val; +{ +#ifdef TARGET_WRITE_SP + TARGET_WRITE_SP (val); +#else + write_register (SP_REGNUM, val); +#endif +} + + +CORE_ADDR +read_fp () +{ +#ifdef TARGET_READ_FP + return TARGET_READ_FP (); +#else + return read_register (FP_REGNUM); +#endif +} + +void +write_fp (val) + CORE_ADDR val; +{ +#ifdef TARGET_WRITE_FP + TARGET_WRITE_FP (val); +#else + write_register (FP_REGNUM, val); +#endif +} + const char * const reg_names[] = REGISTER_NAMES; /* Print out the machine register regnum. If regnum is -1, @@ -1294,8 +1363,9 @@ for an address to start at."); add_com ("continue", class_run, continue_command, "Continue program being debugged, after signal or breakpoint.\n\ -If proceeding from breakpoint, a number N may be used as an argument:\n\ -then the same breakpoint won't break until the Nth time it is reached."); +If proceeding from breakpoint, a number N may be used as an argument,\n\ +which means to set the ignore count of that breakpoint to N - 1 (so that\n\ +the breakpoint won't break until the Nth time it is reached)."); add_com_alias ("c", "cont", class_run, 1); add_com_alias ("fg", "cont", class_run, 1);