This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFC] Protoize ch-exp.c, core-regset.c
Let's try this (yet) again...
The previous versions of this patch at
http://sources.redhat.com/ml/gdb-patches/2000-08/msg00073.html
and
http://sources.redhat.com/ml/gdb-patches/2000-08/msg00113.html
are withdrawn.
Thanks to Mark Kettenis and Eli Zaretskii for pointing out problems
with the previous patch.
* ch-exp.c (parse_opt_name_string): Protoize. [Thanks to Eli
Zaretskii for the prefatory comment.]
* core-regset.c (fetch_core_registers): Protoize; revise
comment.
Index: ch-exp.c
===================================================================
RCS file: /cvs/src/src/gdb/ch-exp.c,v
retrieving revision 1.4
diff -u -r1.4 ch-exp.c
--- ch-exp.c 2000/07/30 01:48:24 1.4
+++ ch-exp.c 2000/08/05 17:56:35
@@ -301,9 +301,10 @@
}
#if 0
+/* Parse a name string. If ALLOW_ALL is 1, ALL is allowed as a postfix. */
+
static tree
-parse_opt_name_string (allow_all)
- int allow_all; /* 1 if ALL is allowed as a postfix */
+parse_opt_name_string (int allow_all)
{
int token = PEEK_TOKEN ();
tree name;
Index: core-regset.c
===================================================================
RCS file: /cvs/src/src/gdb/core-regset.c,v
retrieving revision 1.5
diff -u -r1.5 core-regset.c
--- core-regset.c 2000/07/30 01:48:25 1.5
+++ core-regset.c 2000/08/05 17:56:37
@@ -72,20 +72,16 @@
Read the values of either the general register set (WHICH equals 0)
or the floating point register set (WHICH equals 2) from the core
file data (pointed to by CORE_REG_SECT), and update gdb's idea of
- their current values. The CORE_REG_SIZE parameter is ignored.
+ their current values. The CORE_REG_SIZE parameter is compared to
+ the size of the gregset or fpgregset structures (as appropriate) to
+ validate the size of the structure from the core file. The
+ REG_ADDR parameter is ignored.
- NOTES
-
- Use the indicated sizes to validate the gregset and fpregset
- structures.
*/
static void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
- char *core_reg_sect;
- unsigned core_reg_size;
- int which;
- CORE_ADDR reg_addr; /* Unused in this version */
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
+ CORE_ADDR reg_addr)
{
#if defined (HAVE_GREGSET_T) && defined (HAVE_FPREGSET_T)
gregset_t gregset;