This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Fix some werror fallout from INIT_FRAME_PC()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 08 Dec 2002 21:43:36 -0500
- Subject: [commit] Fix some werror fallout from INIT_FRAME_PC()
FYI,
This follows up my earlier patch that converts INIT_FRAME_PC() into a
function. It gets around two werror problems. Both will disapear when
someone fixes the corresponding code.
committed,
Andrew
2002-12-08 Andrew Cagney <ac131313@redhat.com>
* config/rs6000/tm-rs6000.h (init_frame_pc_noop): Add declaration.
* dwarf2cfi.c (cfi_init_frame_pc): Cast the PC to a pointer.
Index: dwarf2cfi.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
retrieving revision 1.22
diff -u -r1.22 dwarf2cfi.c
--- dwarf2cfi.c 9 Dec 2002 02:04:16 -0000 1.22
+++ dwarf2cfi.c 9 Dec 2002 02:37:46 -0000
@@ -1754,7 +1754,7 @@
CORE_ADDR pc;
/* FIXME: cagney/2002-12-04: This is straight wrong. It's
assuming that the PC is CORE_ADDR (a host quantity) in size. */
- get_reg (&pc, UNWIND_CONTEXT (get_next_frame (fi)), PC_REGNUM);
+ get_reg ((void *)&pc, UNWIND_CONTEXT (get_next_frame (fi)), PC_REGNUM);
return pc;
}
else
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.20
diff -u -r1.20 tm-rs6000.h
--- config/rs6000/tm-rs6000.h 9 Dec 2002 02:04:16 -0000 1.20
+++ config/rs6000/tm-rs6000.h 9 Dec 2002 02:37:49 -0000
@@ -81,6 +81,11 @@
#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \
(fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \
prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ())
+/* NOTE: cagney/2002-12-08: Add local declaration of
+ init_frame_pc_noop() because it isn't possible to include
+ "arch-utils.h" here. Not too bad as this entire file is going away
+ anyway. */
+extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
#define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
/* Flag for machine-specific stuff in shared files. FIXME */