aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog123
-rw-r--r--gdb/acconfig.h6
-rw-r--r--gdb/config.in6
-rw-r--r--gdb/config/mips/tm-irix5.h2
-rw-r--r--gdb/config/mips/tm-mips64.h5
-rw-r--r--gdb/config/mips/tm-vr4300.h5
-rw-r--r--gdb/config/mips/tm-vr4300el.h5
-rw-r--r--gdb/config/mips/xm-irix5.h4
-rw-r--r--gdb/config/pa/tm-hppa.h52
-rw-r--r--gdb/config/powerpc/xm-aix.h6
-rw-r--r--gdb/config/sparc/tm-sp64.h8
-rw-r--r--gdb/config/xm-nbsd.h7
-rwxr-xr-xgdb/configure138
-rw-r--r--gdb/configure.in30
-rw-r--r--gdb/convex-tdep.c16
-rw-r--r--gdb/defs.h26
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/f-lang.c7
-rw-r--r--gdb/hppa-tdep.c81
-rw-r--r--gdb/hppah-nat.c4
-rw-r--r--gdb/hpread.c3
-rw-r--r--gdb/infcmd.c8
-rw-r--r--gdb/remote-pa.c25
-rw-r--r--gdb/somread.c11
-rw-r--r--gdb/somsolib.c6
-rw-r--r--gdb/stabsread.c20
-rw-r--r--gdb/top.c2
-rw-r--r--gdb/valops.c6
28 files changed, 476 insertions, 141 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b52d931..404a6bd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,126 @@
+Sat Jul 27 17:47:35 1996 Fred Fish <fnf@cygnus.com>
+
+ * configure.in: Add test for "long long" support.
+ * configure: Regenerate with autoconf.
+ * acconfig.h: Add CC_HAS_LONG_LONG
+ * config.in: Regenerate with autoheader.
+ * config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove
+ * config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove.
+ * config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove.
+ * config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove.
+ * config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove
+ (PRINTF_HAS_LONG_LONG): Remove.
+ (FORCE_LONG_LONG): Remove.
+ * config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version.
+ * config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove
+ (PRINTF_HAS_LONG_LONG): Remove.
+ * config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove.
+ (PRINTF_HAS_LONG_LONG): Remove.
+ * config/pa/tm-hppa.h (GET_FIELD): Put parens around
+ subtraction inside shift. Put parens around subtraction
+ in operand of bitwise and.
+ (struct frame_info): Forward declare
+ if __STDC__ defined.
+ (frame_saved_regs): Ditto.
+ (struct value): Ditto.
+ (struct type): Ditto.
+ (struct inferior_status): Ditto.
+ (init_extra_frame_info): Add prototype.
+ (skip_prologue): Ditto.
+ (frameless_function_invocation): Ditto.
+ (frame_chain): Ditto.
+ (frame_chain_valid): Ditto.
+ (saved_pc_after_call): Ditto.
+ (hppa_fix_call_dummy): Ditto.
+ (hppa_push_arguments): Ditto.
+ (pa_do_registers_info): Ditto.
+ (in_solib_call_trampoline): Ditto.
+ (in_solib_return_trampoline): Ditto.
+ (push_dummy_frame): Ditto.
+ * convex-tdep.c (decout): Use print_longest rather than
+ fprintf_filtered.
+ * defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set
+ CC_HAS_LONG_LONG.
+ (INT_MIN): Fix so it works correctly when assigned to a long long.
+ * valprint.c (longest_to_int): Rewrite to remove dependence
+ on INT_MIN and INT_MAX.
+ (print_longest): Rewrite the code that falls back to synthesized
+ hex output when LONGEST value is not representable as in a long and
+ printf doesn't support printing long longs.
+ * ch-valprint.c (chill_val_print): Cast 2nd arg of
+ chill_print_type_scalar to LONGEST.
+ chill_print_type_scalar): Make static and add prototype.
+ * hppa-tdep.c (get_field): Ifdef out unused function.
+ (set_field): Ditto.
+ (extract_3): Ditto.
+ (extract_5_store): Ditto.
+ (extract_11): Ditto.
+ (extract_12): Ditto.
+ (deposit_17): Ditto.
+ (extract_14): Convert to static and add prototype.
+ (deposit_14): Ditto.
+ (extract_21): Ditto.
+ (deposit_21): Ditto.
+ (extract_17): Ditto.
+ (extract_5r_store): Ditto.
+ (extract_5R_store): Ditto.
+ (extract_5_load): Ditto.
+ (find_proc_framesize): Ditto.
+ (find_dummy_frame_regs): Ditto.
+ (sign_extend): Ditto.
+ (find_unwind_entry): Add prototype.
+ (find_return_regnum): Ditto.
+ (unwind_command): Ditto.
+ (find_dummy_frame_regs): Add parens around subtraction in operand
+ of bitwise-and.
+ (skip_prologue): Add parens around operands of logical-and inside
+ operand of logical-or.
+ (sign_extend): Add parens around operands of subtraction inside
+ operand of shift.
+ (low_sign_extend): Ditto.
+ * top.c (filename_completer): Convert old style decl of
+ filename_completion_function into prototype.
+ * f-lang.c (patch_common_entries): Ifdef out unused function.
+ * stabsread.c (read_cfront_baseclasses): Remove unused local
+ variable "msg_noterm".
+ (resolve_cfront_continuation): Remove unused local variable "fip".
+ (read_type): Remove unused variable xtypenums.
+ (read_cfront_static_fields): Remove unused variable "i".
+ (read_cfront_static_fields): Remove unused variable "nfields".
+ (read_cfront_member_functions): Add missing comment terminator.
+ (read_cfront_static_fields): Return 1 rather than random value.
+ (read_cfront_baseclasses): Ditto.
+ (read_cfront_baseclasses): Ditto.
+ (read_cfront_baseclasses): Ditto.
+ * somsolib.c (som_solib_create_inferior_hook): Remove unused
+ variable "u".
+ (som_solib_create_inferior_hook): Remove unused variable
+ shadow_contents.
+ (language.h): Add for needed prototypes.
+ (som_solib_sharedlibrary_command): Add prototype.
+ * hpread.c: (hpread_read_array_type): Add prototype.
+ * somread.c (hpread_build_pysmtabs): Add prototype.
+ (hpread_symfile_finish): Ditto.
+ (hpread_symfile_init): Ditto.
+ * hppah-nat.c (fetch_register): Convert old style decl
+ to prototype.
+ (gdbcore.h): Include for needed prototypes.
+ (fetch_register): Remove unused variable "mess".
+ * remote-pa.c (get_offsets): Ifdef out unused function.
+ (remote_start_remote): Remove unused variable "timeout".
+ (boot_board): Add prototype.
+ (reaad_frame): Add prototype.
+ (getpkt): Remove unused variable "bp".
+ (remote_kill): Add prototype.
+ (remote_mourn): Add prototype.
+ (remote_insert_breakpoint): Add prototype.
+ (remote_remove_breakpoint): Add prototype.
+ * valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined.
+ * infcmd.c (do_registers_info): Only need prototype if
+ DO_REGISTERS_INFO is not defined.
+ (breakpoint_auto_delete_contents): Only need if
+ CALL_DUMMY_BREAKPOINT_OFFSET is defined.
+
Sat Jul 27 08:49:49 1996 Fred Fish <fnf@cygnus.com>
* xcoffread.c (xcoff_end_psymtab): Add textlow_not_set parameter.
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index 07a0e98..34fa8c8 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -5,6 +5,12 @@
/* Define if gregset_t type is available. */
#undef HAVE_GREGSET_T
+/* Define if the `long long' type works. */
+#undef CC_HAS_LONG_LONG
+
+/* Define if the "ll" format works to print long long ints. */
+#undef PRINTF_HAS_LONG_LONG
+
/* Define if the "%Lg" format works to print long doubles. */
#undef PRINTF_HAS_LONG_DOUBLE
diff --git a/gdb/config.in b/gdb/config.in
index 29f6374..1e1d347 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -35,6 +35,12 @@
/* Define if gregset_t type is available. */
#undef HAVE_GREGSET_T
+/* Define if the `long long' type works. */
+#undef CC_HAS_LONG_LONG
+
+/* Define if the "ll" format works to print long long ints. */
+#undef PRINTF_HAS_LONG_LONG
+
/* Define if the "%Lg" format works to print long doubles. */
#undef PRINTF_HAS_LONG_DOUBLE
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index 3cda7b7..c8c6a49 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -19,8 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "mips/tm-irix3.h"
-#define FORCE_LONG_LONG
-
/* When calling functions on Irix 5 (or any MIPS SVR4 ABI compliant
platform) $25 must hold the function address. Dest_Reg is a macro
used in CALL_DUMMY in tm-mips.h. */
diff --git a/gdb/config/mips/tm-mips64.h b/gdb/config/mips/tm-mips64.h
index 4265ab6..41472e9 100644
--- a/gdb/config/mips/tm-mips64.h
+++ b/gdb/config/mips/tm-mips64.h
@@ -1,5 +1,5 @@
/* Target machine parameters for MIPS r4000
- Copyright 1994 Free Software Foundation, Inc.
+ Copyright 1994, 1996 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor (ian@cygnus.com)
This file is part of GDB.
@@ -20,9 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define GDB_TARGET_IS_MIPS64 1
-/* force LONGEST to be long long in gdb */
-#define FORCE_LONG_LONG
-
/* Use eight byte registers. */
#define MIPS_REGSIZE 8
diff --git a/gdb/config/mips/tm-vr4300.h b/gdb/config/mips/tm-vr4300.h
index 201174a..e531f98 100644
--- a/gdb/config/mips/tm-vr4300.h
+++ b/gdb/config/mips/tm-vr4300.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,7 +19,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_BYTE_ORDER_SELECTABLE
#define TARGET_MONITOR_PROMPT "<RISQ> "
-/* Hack to allow 64bit register reads, from 32bit BFD world */
-#define CC_HAS_LONG_LONG 1
-
#include "mips/tm-bigmips64.h"
diff --git a/gdb/config/mips/tm-vr4300el.h b/gdb/config/mips/tm-vr4300el.h
index 3148f9f..8fca4c5 100644
--- a/gdb/config/mips/tm-vr4300el.h
+++ b/gdb/config/mips/tm-vr4300el.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,7 +19,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_BYTE_ORDER_SELECTABLE
#define TARGET_MONITOR_PROMPT "<RISQ> "
-/* Hack to allow 64bit register reads, from 32bit BFD world */
-#define CC_HAS_LONG_LONG 1
-
#include "mips/tm-mips64.h"
diff --git a/gdb/config/mips/xm-irix5.h b/gdb/config/mips/xm-irix5.h
index c3d339b..a64277b 100644
--- a/gdb/config/mips/xm-irix5.h
+++ b/gdb/config/mips/xm-irix5.h
@@ -1,6 +1,6 @@
/* Definitions for irix5 hosting support.
-Copyright (C) 1993 Free Software Foundation, Inc.
+Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "xm-sysv4.h"
-#define CC_HAS_LONG_LONG 1
-#define PRINTF_HAS_LONG_LONG 1
#define HOST_BYTE_ORDER BIG_ENDIAN
/* Override register locations in upage for SGI machines */
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index bfae85e..5220c64 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -21,10 +21,25 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* Forward declarations of some types we use in prototypes */
+
+#ifdef __STDC__
+struct frame_info;
+struct frame_saved_regs;
+struct value;
+struct type;
+struct inferior_status;
+#endif
+
/* Target system byte order. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
+/* By default assume we don't have to worry about software floating point. */
+#ifndef SOFT_FLOAT
+#define SOFT_FLOAT 0
+#endif
+
/* Get at various relevent fields of an instruction word. */
#define MASK_5 0x1f
@@ -35,7 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This macro gets bit fields using HP's numbering (MSB = 0) */
#define GET_FIELD(X, FROM, TO) \
- ((X) >> 31 - (TO) & (1 << ((TO) - (FROM) + 1)) - 1)
+ ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
/* Watch out for NaNs */
@@ -57,6 +72,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
to reach some "real" code. */
#define SKIP_PROLOGUE(pc) pc = skip_prologue (pc)
+extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR));
/* If PC is in some function-call trampoline code, return the PC
where the function itself actually starts. If not, return NULL. */
@@ -67,9 +83,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
in_solib_call_trampoline (pc, name)
+extern int in_solib_call_trampoline PARAMS ((CORE_ADDR, char *));
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) \
in_solib_return_trampoline (pc, name)
+extern int in_solib_return_trampoline PARAMS ((CORE_ADDR, char *));
/* Immediately after a function call, return the saved pc.
Can't go through the frames for this because on some machines
@@ -78,6 +96,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef SAVED_PC_AFTER_CALL
#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call (frame)
+extern CORE_ADDR saved_pc_after_call PARAMS ((struct frame_info *));
/* Stack grows upward */
@@ -198,6 +217,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
of register dumps. */
#define DO_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp)
+extern void pa_do_registers_info PARAMS ((int, int));
/* PA specific macro to see if the current instruction is nullified. */
#ifndef INSTRUCTION_NULLIFIED
@@ -302,6 +322,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
((regno) > IPSW_REGNUM && (regno) < FP4_REGNUM)
#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) init_extra_frame_info (fromleaf, frame)
+extern void init_extra_frame_info PARAMS ((int, struct frame_info *));
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
@@ -321,9 +342,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
address (previous FP). */
#define FRAME_CHAIN(thisframe) frame_chain (thisframe)
+extern CORE_ADDR frame_chain PARAMS ((struct frame_info *));
#define FRAME_CHAIN_VALID(chain, thisframe) \
frame_chain_valid (chain, thisframe)
+extern int frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
@@ -334,6 +357,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_function_invocation(FI)
+extern int frameless_function_invocation PARAMS ((struct frame_info *));
#define FRAME_SAVED_PC(FRAME) frame_saved_pc (FRAME)
@@ -353,6 +377,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
hppa_frame_find_saved_regs (frame_info, &frame_saved_regs)
+extern void
+hppa_frame_find_saved_regs PARAMS ((struct frame_info *,
+ struct frame_saved_regs *));
/* Things needed for making the inferior call functions. */
@@ -360,10 +387,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Push an empty stack frame, to record the current PC, etc. */
#define PUSH_DUMMY_FRAME push_dummy_frame (&inf_status)
+extern void push_dummy_frame PARAMS ((struct inferior_status *));
/* Discard from the stack the innermost frame,
restoring all saved registers. */
#define POP_FRAME hppa_pop_frame ()
+extern void hppa_pop_frame PARAMS ((void));
#define INSTRUCTION_SIZE 4
@@ -500,10 +529,15 @@ call_dummy
#define FIX_CALL_DUMMY hppa_fix_call_dummy
-CORE_ADDR hppa_fix_call_dummy();
+extern CORE_ADDR
+hppa_fix_call_dummy PARAMS ((char *, CORE_ADDR, CORE_ADDR, int,
+ struct value **, struct type *, int));
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = hppa_push_arguments(nargs, args, sp, struct_return, struct_addr)
+extern CORE_ADDR
+hppa_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int,
+ CORE_ADDR));
/* The low two bits of the PC on the PA contain the privilege level. Some
genius implementing a (non-GCC) compiler apparently decided this means
@@ -616,3 +650,17 @@ extern CORE_ADDR skip_trampoline_code PARAMS ((CORE_ADDR, char *));
#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
extern int hpread_adjust_stack_address PARAMS ((CORE_ADDR));
+
+/* If the current gcc for for this target does not produce correct debugging
+ information for float parameters, both prototyped and unprototyped, then
+ define this macro. This forces gdb to always assume that floats are
+ passed as doubles and then converted in the callee.
+
+ For the pa, it appears that the debug info marks the parameters as
+ floats regardless of whether the function is prototyped, but the actual
+ values are passed as doubles for the non-prototyped case and floats for
+ the prototyped case. Thus we choose to make the non-prototyped case work
+ for C and break the prototyped case, since the non-prototyped case is
+ probably much more common. (FIXME). */
+
+#define COERCE_FLOAT_TO_DOUBLE (current_language -> la_language == language_c)
diff --git a/gdb/config/powerpc/xm-aix.h b/gdb/config/powerpc/xm-aix.h
index f1ebb5e..efd0e74 100644
--- a/gdb/config/powerpc/xm-aix.h
+++ b/gdb/config/powerpc/xm-aix.h
@@ -22,3 +22,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This doesn't seem to be declared in any header file I can find. */
char *termdef PARAMS ((int, int));
+
+/* UINT_MAX is defined in <sys/limits.h> as a decimal constant (4294967295)
+ which is too large to fit in a signed int when it is parsed by the
+ compiler, so it issues a diagnostic. Just undef it here so that we
+ use gdb's version in defs.h */
+#undef UINT_MAX
diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h
index 825f14a..3cef0fc 100644
--- a/gdb/config/sparc/tm-sp64.h
+++ b/gdb/config/sparc/tm-sp64.h
@@ -1,6 +1,6 @@
/* Target machine sub-parameters for SPARC64, for GDB, the GNU debugger.
This is included by other tm-*.h files to define SPARC64 cpu-related info.
- Copyright 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
This is (obviously) based on the SPARC Vn (n<9) port.
Contributed by Doug Evans (dje@cygnus.com).
@@ -22,12 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define GDB_TARGET_IS_SPARC64
-/* Need to define this so gdb will know what to do with long long's.
- Defining FORCE_LONG_LONG is incorrect (as of 940731) because that
- doesn't work for BFD64 targets. */
-
-#define CC_HAS_LONG_LONG
-
#include "sparc/tm-sparc.h"
/* Stack has strict alignment. */
diff --git a/gdb/config/xm-nbsd.h b/gdb/config/xm-nbsd.h
index 5d52270..2332bb5 100644
--- a/gdb/config/xm-nbsd.h
+++ b/gdb/config/xm-nbsd.h
@@ -1,5 +1,5 @@
/* Host-dependent definitions for any CPU running NetBSD.
- Copyright 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -30,8 +30,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* NetBSD has termios facilities. */
#define HAVE_TERMIOS
-
-#if 0
-#define CC_HAS_LONG_LONG 1
-#define PRINTF_HAS_LONG_LONG 1
-#endif
diff --git a/gdb/configure b/gdb/configure
index 9e1c594..99dadbe 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -1547,12 +1547,82 @@ EOF
fi
+echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1556 "configure"
+#include "confdefs.h"
+
+int main() { return 0; }
+int t() {
+long long foo;
+; return 0; }
+EOF
+if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_c_long_long=yes
+else
+ rm -rf conftest*
+ gdb_cv_c_long_long=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gdb_cv_c_long_long" 1>&6
+if test $gdb_cv_c_long_long = yes; then
+ cat >> confdefs.h <<\EOF
+#define CC_HAS_LONG_LONG 1
+EOF
+
+fi
+
+
+echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ gdb_cv_printf_has_long_long=no
+else
+cat > conftest.$ac_ext <<EOF
+#line 1592 "configure"
+#include "confdefs.h"
+
+int main () {
+ char buf[16];
+ long long l = 0x12345;
+ sprintf (buf, "%llx", l);
+ return (strcmp ("12345", buf));
+}
+EOF
+{ (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+ gdb_cv_printf_has_long_long=yes
+else
+ gdb_cv_printf_has_long_long=no
+fi
+fi
+rm -fr conftest*
+fi
+
+if test $gdb_cv_printf_has_long_long = yes; then
+ cat >> confdefs.h <<\EOF
+#define PRINTF_HAS_LONG_LONG 1
+EOF
+
+fi
+echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
+
+
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1556 "configure"
+#line 1626 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1560,7 +1630,7 @@ int t() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -1588,7 +1658,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 1592 "configure"
+#line 1662 "configure"
#include "confdefs.h"
int main () {
@@ -1598,7 +1668,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-{ (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
gdb_cv_printf_has_long_double=yes
else
@@ -1623,7 +1693,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1627 "configure"
+#line 1697 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1647,7 +1717,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1677,7 +1747,7 @@ else
ac_cv_func_mmap=no
else
cat > conftest.$ac_ext <<EOF
-#line 1681 "configure"
+#line 1751 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. */
@@ -1746,7 +1816,7 @@ main()
}
EOF
-{ (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_func_mmap=yes
else
@@ -1938,12 +2008,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1942 "configure"
+#line 2012 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2010,7 +2080,7 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2014 "configure"
+#line 2084 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -2018,7 +2088,7 @@ int t() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -2139,7 +2209,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2143 "configure"
+#line 2213 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2151,7 +2221,7 @@ int t() {
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2187,7 +2257,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2191 "configure"
+#line 2261 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2199,7 +2269,7 @@ int t() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2226,7 +2296,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2230 "configure"
+#line 2300 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2238,7 +2308,7 @@ int t() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2270,7 +2340,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2274 "configure"
+#line 2344 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2282,7 +2352,7 @@ int t() {
t_accept()
; return 0; }
EOF
-if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2313,7 +2383,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2317 "configure"
+#line 2387 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2325,7 +2395,7 @@ int t() {
socket()
; return 0; }
EOF
-if { (eval echo configure:2329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2423,12 +2493,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2427 "configure"
+#line 2497 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2629,13 +2699,13 @@ else
ac_cv_c_tclib="-l$installedtcllibroot"
else
cat > conftest.$ac_ext <<EOF
-#line 2633 "configure"
+#line 2703 "configure"
#include "confdefs.h"
Tcl_AppInit()
{ exit(0); }
EOF
-{ (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_tcllib="-l$installedtcllibroot"
else
@@ -2745,12 +2815,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2749 "configure"
+#line 2819 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2977,13 +3047,13 @@ else
ac_cv_c_tklib="-l$installedtklibroot"
else
cat > conftest.$ac_ext <<EOF
-#line 2981 "configure"
+#line 3051 "configure"
#include "confdefs.h"
Tcl_AppInit()
{ exit(0); }
EOF
-{ (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_tklib="-l$installedtklibroot"
else
@@ -3024,7 +3094,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3028 "configure"
+#line 3098 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -3032,7 +3102,7 @@ int t() {
main()
; return 0; }
EOF
-if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3062,7 +3132,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3066 "configure"
+#line 3136 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -3070,7 +3140,7 @@ int t() {
main()
; return 0; }
EOF
-if { (eval echo configure:3074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
diff --git a/gdb/configure.in b/gdb/configure.in
index 98dd37a..0325100 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -62,6 +62,36 @@ if test $gdb_cv_have_fpregset_t = yes; then
AC_DEFINE(HAVE_FPREGSET_T)
fi
+dnl See if compiler supports "long long" type.
+
+AC_MSG_CHECKING(for long long support in compiler)
+AC_CACHE_VAL(gdb_cv_c_long_long,
+[AC_TRY_COMPILE(, [long long foo;],
+gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)])
+AC_MSG_RESULT($gdb_cv_c_long_long)
+if test $gdb_cv_c_long_long = yes; then
+ AC_DEFINE(CC_HAS_LONG_LONG)
+fi
+
+dnl See if the compiler and runtime support printing long long
+
+AC_MSG_CHECKING(for long long support in printf)
+AC_CACHE_VAL(gdb_cv_printf_has_long_long,
+[AC_TRY_RUN([
+int main () {
+ char buf[16];
+ long long l = 0x12345;
+ sprintf (buf, "%llx", l);
+ return (strcmp ("12345", buf));
+}],
+gdb_cv_printf_has_long_long=yes,
+gdb_cv_printf_has_long_long=no,
+gdb_cv_printf_has_long_long=no)])
+if test $gdb_cv_printf_has_long_long = yes; then
+ AC_DEFINE(PRINTF_HAS_LONG_LONG)
+fi
+AC_MSG_RESULT($gdb_cv_printf_has_long_long)
+
dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
dnl because autoconf complains about cross-compilation issues. However, this
dnl code uses the same variables as the macro for compatibility.
diff --git a/gdb/convex-tdep.c b/gdb/convex-tdep.c
index 1cc4736..75a90bc 100644
--- a/gdb/convex-tdep.c
+++ b/gdb/convex-tdep.c
@@ -1,5 +1,5 @@
/* Convex stuff for GDB.
- Copyright (C) 1990, 1991 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1991, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -444,26 +444,20 @@ decout (stream, type, val)
&& ((lv & 0xf0000000) == 0x80000000
|| ((lv & 0xf0000000) == 0xf0000000 && lv < STACK_END_ADDR)))
{
- fprintf_filtered (stream, "%#x", lv);
+ print_longest (stream, "x", 0, val);
return;
}
case 10:
- fprintf_filtered (stream, TYPE_UNSIGNED (type) ? "%llu" : "%lld", val);
+ print_longest (stream, TYPE_UNSIGNED (type) ? "u" : "d", 0, val);
return;
case 8:
- if (TYPE_LENGTH (type) <= sizeof lv)
- fprintf_filtered (stream, "%#o", lv);
- else
- fprintf_filtered (stream, "%#llo", val);
+ print_longest (stream, "o", 0, val);
return;
case 16:
- if (TYPE_LENGTH (type) <= sizeof lv)
- fprintf_filtered (stream, "%#x", lv);
- else
- fprintf_filtered (stream, "%#llx", val);
+ print_longest (stream, "x", 0, val);
return;
}
}
diff --git a/gdb/defs.h b/gdb/defs.h
index 999af2e..20a401a 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -501,7 +501,8 @@ enum val_prettyprint
#endif /* STDC */
#endif /* volatile */
-/* Defaults for system-wide constants (if not defined by xm.h, we fake it). */
+/* Defaults for system-wide constants (if not defined by xm.h, we fake it).
+ FIXME: Assumes 2's complement arithmetic */
#if !defined (UINT_MAX)
#define UINT_MAX ((unsigned int)(~0)) /* 0xFFFFFFFF for 32-bits */
@@ -512,7 +513,7 @@ enum val_prettyprint
#endif
#if !defined (INT_MIN)
-#define INT_MIN (-INT_MAX - 1) /* 0x80000000 for 32-bits */
+#define INT_MIN ((int)((int) ~0 ^ INT_MAX)) /* 0x80000000 for 32-bits */
#endif
#if !defined (ULONG_MAX)
@@ -531,27 +532,8 @@ enum val_prettyprint
#else /* No BFD64 */
-/* If all compilers for this host support "long long" and we want to
- use it for LONGEST (the performance hit is about 10% on a testsuite
- run based on one DECstation test), then the xm.h file can define
- CC_HAS_LONG_LONG.
-
- Using GCC 1.39 on BSDI with long long causes about 700 new
- testsuite failures. Using long long for LONGEST on the DECstation
- causes 3 new FAILs in the testsuite and many heuristic fencepost
- warnings. These are not investigated, but a first guess would be
- that the BSDI problems are GCC bugs in long long support and the
- latter are GDB bugs. */
-
-#ifndef CC_HAS_LONG_LONG
-# if defined (__GNUC__) && defined (FORCE_LONG_LONG)
-# define CC_HAS_LONG_LONG 1
-# endif
-#endif
-
/* LONGEST should not be a typedef, because "unsigned LONGEST" needs to work.
- CC_HAS_LONG_LONG is defined if the host compiler supports "long long"
- variables and we wish to make use of that support. */
+ CC_HAS_LONG_LONG is defined if the host compiler supports "long long" */
#ifndef LONGEST
# ifdef CC_HAS_LONG_LONG
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 036c89a..c13bdef 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -49,6 +49,11 @@ Mon Jun 17 10:43:41 1996 Fred Fish <fnf@cygnus.com>
(gdb-internals): Delete unused target.
(Makefile): Depends upon config.status also.
+Sat Mar 30 15:46:58 1996 Fred Fish <fnf@cygnus.com>
+
+ * gdbint.texinfo (CC_HAS_LONG_LONG): Clarify when/how this is
+ set.
+
Sat Mar 16 15:10:20 1996 Fred Fish <fnf@cygnus.com>
From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 976211e..a72b103 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -78,9 +78,9 @@ static SAVED_FUNCTION *allocate_saved_function_node PARAMS ((void));
static SAVED_BF_PTR allocate_saved_bf_node PARAMS ((void));
static COMMON_ENTRY_PTR allocate_common_entry_node PARAMS ((void));
static SAVED_F77_COMMON_PTR allocate_saved_f77_common_node PARAMS ((void));
+static void patch_common_entries PARAMS ((SAVED_F77_COMMON_PTR, CORE_ADDR, int));
#endif
-static void patch_common_entries PARAMS ((SAVED_F77_COMMON_PTR, CORE_ADDR, int));
static struct type *f_create_fundamental_type PARAMS ((struct objfile *, int));
static void f_printstr PARAMS ((FILE *, char *, unsigned int, int));
static void f_printchar PARAMS ((int, FILE *));
@@ -774,13 +774,12 @@ SAVED_F77_COMMON_PTR find_common_for_function(name, funcname)
}
-
+#if 0
/* The following function is called to patch up the offsets
for the statics contained in the COMMON block named
"name." */
-
static void
patch_common_entries (blk, offset, secnum)
SAVED_F77_COMMON_PTR blk;
@@ -803,14 +802,12 @@ patch_common_entries (blk, offset, secnum)
blk->secnum = secnum;
}
-
/* Patch all commons named "name" that need patching.Since COMMON
blocks occur with relative infrequency, we simply do a linear scan on
the name. Eventually, the best way to do this will be a
hashed-lookup. Secnum is the section number for the .bss section
(which is where common data lives). */
-#if 0
static void
patch_all_commons_by_name (name, offset, secnum)
char *name;
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index efc8081..63183a4 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -55,6 +55,37 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "symfile.h"
#include "objfiles.h"
+static int extract_5_load PARAMS ((unsigned int));
+
+static unsigned extract_5R_store PARAMS ((unsigned int));
+
+static unsigned extract_5r_store PARAMS ((unsigned int));
+
+static void find_dummy_frame_regs PARAMS ((struct frame_info *,
+ struct frame_saved_regs *));
+
+static int find_proc_framesize PARAMS ((CORE_ADDR));
+
+static int find_return_regnum PARAMS ((CORE_ADDR));
+
+struct unwind_table_entry *find_unwind_entry PARAMS ((CORE_ADDR));
+
+static int extract_17 PARAMS ((unsigned int));
+
+static unsigned deposit_21 PARAMS ((unsigned int, unsigned int));
+
+static int extract_21 PARAMS ((unsigned));
+
+static unsigned deposit_14 PARAMS ((int, unsigned int));
+
+static int extract_14 PARAMS ((unsigned));
+
+static void unwind_command PARAMS ((char *, int));
+
+static int low_sign_extend PARAMS ((unsigned int, unsigned int));
+
+static int sign_extend PARAMS ((unsigned int, unsigned int));
+
static int restore_pc_queue PARAMS ((struct frame_saved_regs *));
static int hppa_alignof PARAMS ((struct type *));
@@ -91,23 +122,26 @@ static void pa_print_fp_reg PARAMS ((int));
/* This assumes that no garbage lies outside of the lower bits of
value. */
-int
+static int
sign_extend (val, bits)
unsigned val, bits;
{
- return (int)(val >> bits - 1 ? (-1 << bits) | val : val);
+ return (int)(val >> (bits - 1) ? (-1 << bits) | val : val);
}
/* For many immediate values the sign bit is the low bit! */
-int
+static int
low_sign_extend (val, bits)
unsigned val, bits;
{
return (int)((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
}
+
/* extract the immediate field from a ld{bhw}s instruction */
+#if 0
+
unsigned
get_field (val, from, to)
unsigned val, from, to;
@@ -126,18 +160,24 @@ set_field (val, from, to, new_val)
/* extract a 3-bit space register number from a be, ble, mtsp or mfsp */
+int
extract_3 (word)
unsigned word;
{
return GET_FIELD (word, 18, 18) << 2 | GET_FIELD (word, 16, 17);
}
-
+
+#endif
+
+static int
extract_5_load (word)
unsigned word;
{
return low_sign_extend (word >> 16 & MASK_5, 5);
}
+#if 0
+
/* extract the immediate field from a st{bhw}s instruction */
int
@@ -147,9 +187,11 @@ extract_5_store (word)
return low_sign_extend (word & MASK_5, 5);
}
+#endif /* 0 */
+
/* extract the immediate field from a break instruction */
-unsigned
+static unsigned
extract_5r_store (word)
unsigned word;
{
@@ -158,7 +200,7 @@ extract_5r_store (word)
/* extract the immediate field from a {sr}sm instruction */
-unsigned
+static unsigned
extract_5R_store (word)
unsigned word;
{
@@ -167,6 +209,8 @@ extract_5R_store (word)
/* extract an 11 bit immediate field */
+#if 0
+
int
extract_11 (word)
unsigned word;
@@ -174,9 +218,11 @@ extract_11 (word)
return low_sign_extend (word & MASK_11, 11);
}
+#endif
+
/* extract a 14 bit immediate field */
-int
+static int
extract_14 (word)
unsigned word;
{
@@ -185,7 +231,7 @@ extract_14 (word)
/* deposit a 14 bit constant in a word */
-unsigned
+static unsigned
deposit_14 (opnd, word)
int opnd;
unsigned word;
@@ -197,7 +243,7 @@ deposit_14 (opnd, word)
/* extract a 21 bit constant */
-int
+static int
extract_21 (word)
unsigned word;
{
@@ -221,7 +267,7 @@ extract_21 (word)
usually the top 21 bits of a 32 bit constant, we assume that only
the low 21 bits of opnd are relevant */
-unsigned
+static unsigned
deposit_21 (opnd, word)
unsigned opnd, word;
{
@@ -241,6 +287,8 @@ deposit_21 (opnd, word)
/* extract a 12 bit constant from branch instructions */
+#if 0
+
int
extract_12 (word)
unsigned word;
@@ -264,10 +312,12 @@ deposit_17 (opnd, word)
return word;
}
+#endif
+
/* extract a 17 bit constant from branch instructions, returning the
19 bit signed value. */
-int
+static int
extract_17 (word)
unsigned word;
{
@@ -667,7 +717,7 @@ find_return_regnum(pc)
}
/* Return size of frame, or -1 if we should use a frame pointer. */
-int
+static int
find_proc_framesize (pc)
CORE_ADDR pc;
{
@@ -1267,7 +1317,7 @@ push_dummy_frame (inf_status)
write_register (SP_REGNUM, sp);
}
-void
+static void
find_dummy_frame_regs (frame, frame_saved_regs)
struct frame_info *frame;
struct frame_saved_regs *frame_saved_regs;
@@ -1275,7 +1325,7 @@ find_dummy_frame_regs (frame, frame_saved_regs)
CORE_ADDR fp = frame->frame;
int i;
- frame_saved_regs->regs[RP_REGNUM] = fp - 20 & ~0x3;
+ frame_saved_regs->regs[RP_REGNUM] = (fp - 20) & ~0x3;
frame_saved_regs->regs[FP_REGNUM] = fp;
frame_saved_regs->regs[1] = fp + 8;
@@ -2520,8 +2570,7 @@ restart:
but never were, mask them out and restart.
This should only happen in optimized code, and should be very rare. */
- if (save_gr || save_fr
- && ! (restart_fr || restart_gr))
+ if (save_gr || (save_fr && ! (restart_fr || restart_gr)))
{
pc = orig_pc;
restart_gr = save_gr;
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 17a675d..19e0205 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -27,10 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "inferior.h"
#include "target.h"
#include <sys/ptrace.h>
+#include "gdbcore.h"
extern CORE_ADDR text_end;
-static void fetch_register ();
+static void fetch_register PARAMS ((int));
void
fetch_inferior_registers (regno)
@@ -110,7 +111,6 @@ fetch_register (regno)
{
register unsigned int regaddr;
char buf[MAX_REGISTER_RAW_SIZE];
- char mess[128]; /* For messages */
register int i;
/* Offset of registers within the u area. */
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 981b9e6..56d7b92 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -136,6 +136,9 @@ extern struct complaint lbrac_mismatch_complaint;
void hpread_symfile_init PARAMS ((struct objfile *));
+static struct type *
+hpread_read_array_type PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
+
static struct type *hpread_alloc_type
PARAMS ((dnttpointer, struct objfile *));
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 75f957a..eddd89a 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -54,7 +54,9 @@ static void all_registers_info PARAMS ((char *, int));
static void registers_info PARAMS ((char *, int));
+#if !defined (DO_REGISTERS_INFO)
static void do_registers_info PARAMS ((int, int));
+#endif
static void unset_environment_command PARAMS ((char *, int));
@@ -82,7 +84,9 @@ static void step_command PARAMS ((char *, int));
static void run_command PARAMS ((char *, int));
+#ifdef CALL_DUMMY_BREAKPOINT_OFFSET
static void breakpoint_auto_delete_contents PARAMS ((PTR));
+#endif
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error ("The program is not being run.");
@@ -503,6 +507,8 @@ signal_command (signum_exp, from_tty)
/* Call breakpoint_auto_delete on the current contents of the bpstat
pointed to by arg (which is really a bpstat *). */
+#ifdef CALL_DUMMY_BREAKPOINT_OFFSET
+
static void
breakpoint_auto_delete_contents (arg)
PTR arg;
@@ -510,6 +516,8 @@ breakpoint_auto_delete_contents (arg)
breakpoint_auto_delete (*(bpstat *)arg);
}
+#endif /* CALL_DUMMY_BREAKPOINT_OFFSET */
+
/* Execute a "stack dummy", a piece of code stored in the stack
by the debugger to be executed in the inferior.
diff --git a/gdb/remote-pa.c b/gdb/remote-pa.c
index 1121e15..bbc8313 100644
--- a/gdb/remote-pa.c
+++ b/gdb/remote-pa.c
@@ -160,6 +160,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Prototypes for local functions */
static int
+remote_remove_breakpoint PARAMS ((CORE_ADDR, char *));
+
+static int
+remote_insert_breakpoint PARAMS ((CORE_ADDR, char *));
+
+static void
+remote_mourn PARAMS ((void));
+
+static void
+remote_kill PARAMS ((void));
+
+static int
+read_frame PARAMS ((char *));
+
+static void
+boot_board PARAMS ((void));
+
+static int
remote_write_bytes PARAMS ((CORE_ADDR memaddr, char *myaddr, int len));
static int
@@ -295,6 +313,8 @@ remote_close (quitting)
/* Query the remote side for the text, data and bss offsets. */
+#if 0
+
static void
get_offsets ()
{
@@ -350,6 +370,8 @@ get_offsets ()
objfile_relocate (symfile_objfile, offs);
}
+#endif /* unused */
+
#define INBUFSIZE 10
void
@@ -390,8 +412,6 @@ static int
remote_start_remote (dummy)
char *dummy;
{
- int timeout;
-
immediate_quit = 1; /* Allow user to interrupt it */
/* Ack any packet which the remote side has already sent. */
@@ -1342,7 +1362,6 @@ getpkt (buf, forever)
char *buf;
int forever;
{
- char *bp;
int c;
int tries;
int timeout;
diff --git a/gdb/somread.c b/gdb/somread.c
index 4223d71..fd3d56a 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -55,6 +55,17 @@ som_symtab_read PARAMS ((bfd *, struct objfile *,
static struct section_offsets *
som_symfile_offsets PARAMS ((struct objfile *, CORE_ADDR));
+/* FIXME: These should really be in a common header somewhere */
+
+extern void
+hpread_build_psymtabs PARAMS ((struct objfile *, struct section_offsets *, int));
+
+extern void
+hpread_symfile_finish PARAMS ((struct objfile *));
+
+extern void
+hpread_symfile_init PARAMS ((struct objfile *));
+
/*
LOCAL FUNCTION
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 1a1042d..912dc1d 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -35,6 +35,7 @@ and by Cygnus Support. */
#include "inferior.h"
#include "gdb-stabs.h"
#include "gdbcmd.h"
+#include "language.h"
/* TODO:
@@ -96,6 +97,8 @@ static struct so_list *so_list_head;
static void som_sharedlibrary_info_command PARAMS ((char *, int));
+static void som_solib_sharedlibrary_command PARAMS ((char *, int));
+
/* Add symbols from shared libraries into the symtab list. */
void
@@ -497,7 +500,7 @@ som_solib_create_inferior_hook()
struct minimal_symbol *msymbol;
unsigned int dld_flags, status, have_endo;
asection *shlib_info;
- char shadow_contents[BREAKPOINT_MAX], buf[4];
+ char buf[4];
struct objfile *objfile;
CORE_ADDR anaddr;
@@ -575,7 +578,6 @@ som_solib_create_inferior_hook()
export stub. */
ALL_OBJFILES (objfile)
{
- struct unwind_table_entry *u;
extern struct unwind_table_entry *find_unwind_entry PARAMS ((CORE_ADDR pc));
/* What a crock. */
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index b4ff17f..a9ac480 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -605,9 +605,6 @@ read_cfront_baseclasses(fip, pp, type, objfile)
char ** pp;
struct type * type;
{
- static struct complaint msg_noterm = {"\
- Base classes not terminated while reading stabs string %s.\n",
- 0, 0};
static struct complaint msg_unknown = {"\
Unsupported token in stabs string %s.\n",
0, 0};
@@ -622,7 +619,7 @@ read_cfront_baseclasses(fip, pp, type, objfile)
if (**pp==';') /* no base classes; return */
{
++(*pp);
- return;
+ return 1;
}
/* first count base classes so we can allocate space before parsing */
@@ -690,7 +687,7 @@ read_cfront_baseclasses(fip, pp, type, objfile)
if (**pp!='@')
{
complain (&msg_unknown, *pp);
- return;
+ return 1;
}
++(*pp);
@@ -718,7 +715,7 @@ read_cfront_baseclasses(fip, pp, type, objfile)
if (!bname || !*bname)
{
complain (&msg_unknown, *pp);
- return;
+ return 1;
}
/* FIXME! attach base info to type */
bsym = lookup_symbol (bname, 0, STRUCT_NAMESPACE, 0, 0); /*demangled_name*/
@@ -730,7 +727,7 @@ read_cfront_baseclasses(fip, pp, type, objfile)
else
{
complain (&msg_notfound, *pp);
- return;
+ return 1;
}
}
@@ -881,7 +878,8 @@ read_cfront_member_functions(fip, pp, type, objfile)
for public, set new_sublist->fn_field.is_protected = 1) */
/* Unable to distinguish const/volatile from stabs definition!
- Assuming normal for now. FIXME!
+ Assuming normal for now. FIXME! */
+
new_sublist -> fn_field.is_const = 0;
new_sublist -> fn_field.is_volatile = 0; /* volatile not implemented in cfront */
@@ -962,7 +960,6 @@ resolve_cfront_continuation(objfile, sym, p)
char * sname;
/* snarfed from read_struct_type */
struct field_info fi;
- struct field_info * fip = &fi;
struct type *type;
struct cleanup *back_to;
@@ -1868,7 +1865,6 @@ read_type (pp, objfile)
register struct type *type = 0;
struct type *type1;
int typenums[2];
- int xtypenums[2];
char type_descriptor;
/* Size in bits of type if specified by a type attribute, or -1 if
@@ -3350,8 +3346,6 @@ read_cfront_static_fields(fip, pp, type, objfile)
struct type *type;
struct objfile *objfile;
{
- int nfields = TYPE_NFIELDS(type);
- int i;
struct nextfield * new;
struct type *stype;
char * sname;
@@ -3360,7 +3354,7 @@ read_cfront_static_fields(fip, pp, type, objfile)
if (**pp==';') /* no static data; return */
{
++(*pp);
- return;
+ return 1;
}
/* Process each field in the list until we find the terminating ";" */
diff --git a/gdb/top.c b/gdb/top.c
index 89c0e16..49a5c97 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1463,7 +1463,7 @@ filename_completer (text, word)
char *word;
{
/* From readline. */
- extern char *filename_completion_function ();
+ extern char *filename_completion_function PARAMS ((char *, int));
int subsequent_name;
char **return_val;
int return_val_used;
diff --git a/gdb/valops.c b/gdb/valops.c
index efcd9b3..273aa0e 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -47,7 +47,9 @@ static int typecmp PARAMS ((int staticp, struct type *t1[], value_ptr t2[]));
static CORE_ADDR find_function_addr PARAMS ((value_ptr, struct type **));
+#ifndef PUSH_ARGUMENTS
static CORE_ADDR value_push PARAMS ((CORE_ADDR, value_ptr));
+#endif
static value_ptr search_struct_field PARAMS ((char *, value_ptr, int,
struct type *, int));
@@ -851,6 +853,8 @@ push_bytes (sp, buffer, len)
/* Push onto the stack the specified value VALUE. */
+#ifndef PUSH_ARGUMENTS
+
static CORE_ADDR
value_push (sp, arg)
register CORE_ADDR sp;
@@ -869,6 +873,8 @@ value_push (sp, arg)
return sp;
}
+#endif /* !PUSH_ARGUMENTS */
+
/* Perform the standard coercions that are specified
for arguments to be passed to C functions.