This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: HP/UX 10.20 and 11.0 broken in 5.1
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: HP/UX 10.20 and 11.0 broken in 5.1
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 16 Oct 2001 13:40:14 -0400
- Cc: gdb at sources dot redhat dot com
- References: <3BCB9DF9.2070809@cygnus.com>
> I intend cutting my losses on this. (And I bet this isn't going to down well in some quarters).
>
> 11.0 trips up on a problem in ltconfig during configure.
>
> 10.20 doesn't build with HP's `cc -Ae' compiler. It builds with GCC but doesn't work.
Just by way of supporting evidence :-)
The attached patch was a quick attempt at addressing the GCC warnings.
The thing to notice is that fixing the warnings involves cleaning up
core-gdb include files.
enjoy,
Andrew
Mon Oct 15 20:50:22 2001 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add "value.h" to gdbarch.c's list of includes.
* gdbarch.c: Regenerate.
* infrun.c (handle_inferior_event): When
infwait_statenullified_state, clear
stepped_after_stopped_by_watchpoint. Add default internal_error
case
* Makefile.in (infrun.o): Update dependencies.
* infrun.c: Include "value.h".
* Makefile.in (language_h): Define.
* language.h: Include "expression.h".
* Makefile.in (breakpoint_h): Update dependencies.
* config/pa/tm-hppa.h (hppa_value_returned_from_stack): Declare.
* breakpoint.h: Do not include "frame.h" or "value.h". Replace
value_ptr with ``struct value''.
(struct value, struct symtab_and_line): Add opaque declaration.
* config/pa/nm-hppah.h: Include "breakpoint.h".
(hppa_insert_hw_watchpoint): Declare.
(hppa_remove_hw_watchpoint, hppa_can_use_hw_watchpoint): Declare.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.119
diff -p -r1.119 Makefile.in
*** Makefile.in 2001/10/02 23:11:20 1.119
--- Makefile.in 2001/10/16 04:52:48
*************** nm_h = @nm_h@
*** 585,591 ****
annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
arch_utils_h = arch-utils.h
ax_h = ax.h $(doublest_h)
! breakpoint_h = breakpoint.h $(frame_h) $(value_h)
call_cmds_h = call-cmds.h
cli_cmds_h = $(srcdir)/cli/cli-cmds.h
cli_decode_h = $(srcdir)/cli/cli-decode.h
--- 585,591 ----
annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
arch_utils_h = arch-utils.h
ax_h = ax.h $(doublest_h)
! breakpoint_h = breakpoint.h $(symtab_h) $(value_h)
call_cmds_h = call-cmds.h
cli_cmds_h = $(srcdir)/cli/cli-cmds.h
cli_decode_h = $(srcdir)/cli/cli-decode.h
*************** gdbthread_h = gdbthread.h $(breakpoint_h
*** 611,616 ****
--- 611,617 ----
gdbtypes_h = gdbtypes.h
inf_loop_h = inf-loop.h
inferior_h = inferior.h $(breakpoint_h)
+ language_h = language.h $(expression_h)
memattr_h = memattr.h
parser_defs_h = parser-defs.h $(doublest_h)
regcache_h = regcache.h
*************** infptrace.o: infptrace.c $(defs_h) $(gdb
*** 1580,1586 ****
infrun.o: infrun.c gdb_wait.h $(defs_h) $(gdbcmd_h) $(cli_script_h) \
$(gdbcore_h) \
$(inferior_h) $(target_h) $(gdbthread_h) $(gdb_string_h) $(event_loop_h) \
! $(event_top_h) $(regcache_h)
inftarg.o: inftarg.c gdb_wait.h $(defs_h) $(gdbcore_h) $(inferior_h) \
$(target_h) terminal.h $(command_h)
--- 1581,1587 ----
infrun.o: infrun.c gdb_wait.h $(defs_h) $(gdbcmd_h) $(cli_script_h) \
$(gdbcore_h) \
$(inferior_h) $(target_h) $(gdbthread_h) $(gdb_string_h) $(event_loop_h) \
! $(event_top_h) $(regcache_h) $(value_h)
inftarg.o: inftarg.c gdb_wait.h $(defs_h) $(gdbcore_h) $(inferior_h) \
$(target_h) terminal.h $(command_h)
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.9
diff -p -r1.9 breakpoint.h
*** breakpoint.h 2001/08/02 11:58:29 1.9
--- breakpoint.h 2001/10/16 04:52:48
***************
*** 22,30 ****
#if !defined (BREAKPOINT_H)
#define BREAKPOINT_H 1
! #include "frame.h"
! #include "value.h"
#include "gdb-events.h"
/* This is the maximum number of bytes a breakpoint instruction can take.
--- 22,30 ----
#if !defined (BREAKPOINT_H)
#define BREAKPOINT_H 1
! struct value;
+ #include "symtab.h" /* For struct symtab_and_line. */
#include "gdb-events.h"
/* This is the maximum number of bytes a breakpoint instruction can take.
*************** struct breakpoint
*** 249,258 ****
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
/* Value of the watchpoint the last time we checked it. */
! value_ptr val;
/* Holds the value chain for a hardware watchpoint expression. */
! value_ptr val_chain;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
--- 249,258 ----
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
/* Value of the watchpoint the last time we checked it. */
! struct value *val;
/* Holds the value chain for a hardware watchpoint expression. */
! struct value *val_chain;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
*************** struct bpstats
*** 479,485 ****
/* Commands left to be done. */
struct command_line *commands;
/* Old value associated with a watchpoint. */
! value_ptr old_val;
/* Nonzero if this breakpoint tells us to print the frame. */
char print;
--- 479,485 ----
/* Commands left to be done. */
struct command_line *commands;
/* Old value associated with a watchpoint. */
! struct value *old_val;
/* Nonzero if this breakpoint tells us to print the frame. */
char print;
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.77
diff -p -r1.77 gdbarch.c
*** gdbarch.c 2001/10/15 18:18:29 1.77
--- gdbarch.c 2001/10/16 04:52:49
***************
*** 35,40 ****
--- 35,41 ----
#include "defs.h"
#include "arch-utils.h"
+ #include "value.h" /* For default_coerce_float_to_double. */
#if GDB_MULTI_ARCH
#include "gdbcmd.h"
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.82
diff -p -r1.82 gdbarch.sh
*** gdbarch.sh 2001/10/15 21:38:44 1.82
--- gdbarch.sh 2001/10/16 04:52:49
*************** cat <<EOF
*** 1107,1112 ****
--- 1107,1113 ----
#include "defs.h"
#include "arch-utils.h"
+ #include "value.h" /* For default_coerce_float_to_double. */
#if GDB_MULTI_ARCH
#include "gdbcmd.h"
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.46
diff -p -r1.46 infrun.c
*** infrun.c 2001/08/15 15:29:56 1.46
--- infrun.c 2001/10/16 04:52:51
***************
*** 38,43 ****
--- 38,44 ----
#include <signal.h>
#include "inf-loop.h"
#include "regcache.h"
+ #include "value.h"
/* Prototypes for local functions */
*************** handle_inferior_event (struct execution_
*** 1450,1455 ****
--- 1451,1457 ----
break;
case infwait_nullified_state:
+ stepped_after_stopped_by_watchpoint = 0;
break;
case infwait_nonstep_watch_state:
*************** handle_inferior_event (struct execution_
*** 1460,1465 ****
--- 1462,1470 ----
in combination correctly? */
stepped_after_stopped_by_watchpoint = 1;
break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
}
ecs->infwait_state = infwait_normal_state;
Index: language.h
===================================================================
RCS file: /cvs/src/src/gdb/language.h,v
retrieving revision 1.8
diff -p -r1.8 language.h
*** language.h 2001/03/06 08:21:09 1.8
--- language.h 2001/10/16 04:52:51
*************** struct objfile;
*** 30,35 ****
--- 30,37 ----
struct expression;
/* enum exp_opcode; ANSI's `wisdom' didn't include forward enum decls. */
+ #include "expression.h" /* For enum noside. */
+
/* This used to be included to configure GDB for one or more specific
languages. Now it is left out to configure for all of them. FIXME. */
/* #include "lang_def.h" */
Index: config/pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.4
diff -p -r1.4 nm-hppah.h
*** nm-hppah.h 2001/05/04 04:15:32 1.4
--- nm-hppah.h 2001/10/16 04:52:51
***************
*** 19,24 ****
--- 19,26 ----
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+ #include "breakpoint.h"
+
#define U_REGS_OFFSET 0
#define KERNEL_U_ADDR 0
*************** extern int hppa_require_detach (int, int
*** 137,142 ****
--- 139,145 ----
/* The PA can watch any number of locations (generic routines already check
that all intermediates are in watchable memory locations). */
+ extern int hppa_can_use_hw_watchpoint (enum bptype type, int cnt, enum bptype ot);
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
hppa_can_use_hw_watchpoint(type, cnt, ot)
*************** extern void hppa_enable_page_protection_
*** 218,226 ****
--- 221,231 ----
extern void hppa_disable_page_protection_events (int);
/* Use these macros for watchpoint insertion/deletion. */
+ extern int hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type);
#define target_insert_watchpoint(addr, len, type) \
hppa_insert_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
+ extern int hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, enum bptype type);
#define target_remove_watchpoint(addr, len, type) \
hppa_remove_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
Index: config/pa/tm-hppa.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.9
diff -p -r1.9 tm-hppa.h
*** tm-hppa.h 2001/05/12 03:18:34 1.9
--- tm-hppa.h 2001/10/16 04:52:52
*************** extern use_struct_convention_fn hppa_use
*** 386,391 ****
--- 386,392 ----
is to have the caller tell us where it told the callee to put it, rather
than have the callee tell us.
*/
+ extern struct value *hppa_value_returned_from_stack (register struct type *valtype, CORE_ADDR addr);
#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)