This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH RFC] Protoize core-sol2.c, corefile.c
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH RFC] Protoize core-sol2.c, corefile.c
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Mon, 7 Aug 2000 18:16:01 -0700
More protoization...
I added a prefatory comment to fetch_core_registers() in core-sol2.c.
The (prepatch) version of generic_search() in corefile.c contains a
syntax error in the parameter list. (Note that this will never be
caught by any build since the whole thing is disabled by a #if 0.)
This syntax error causes check-decls + `gcc -Wall' to fail. Once the
syntax error is corrected in the output from check-decls, `gcc -Wall'
succeeds. (BTW, the missing comma is the reason that fix-decls didn't
touch it in the first place.)
I plan to commit these sometime after midnight GMT of Thursday, August
10.
* core-sol2.c (fetch_core_registers): Protoize; add prefatory
comment.
* corefile.c (specify_exec_file_hook, generic_search): Protoize.
Index: core-sol2.c
===================================================================
RCS file: /cvs/src/src/gdb/core-sol2.c,v
retrieving revision 1.4
diff -u -r1.4 core-sol2.c
--- core-sol2.c 2000/07/30 01:48:25 1.4
+++ core-sol2.c 2000/08/08 00:56:50
@@ -45,12 +45,15 @@
static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
+/* Fetch registers from core file data pointed to by CORE_REG_SECT. When
+ WHICH is 0, the the general register set is fetched; when WHICH is
+ 2, the floating point registers are fetched. CORE_REG_SIZE is used
+ to validate the size of the data pointed to by CORE_REG_SECT. REG_ADDR
+ is unused. */
+
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)
{
prgregset_t prgregset;
prfpregset_t prfpregset;
Index: corefile.c
===================================================================
RCS file: /cvs/src/src/gdb/corefile.c,v
retrieving revision 1.6
diff -u -r1.6 corefile.c
--- corefile.c 2000/07/30 01:48:25 1.6
+++ corefile.c 2000/08/08 00:56:51
@@ -120,8 +120,7 @@
This is called from the x-window display code. */
void
-specify_exec_file_hook (hook)
- void (*hook) (char *);
+specify_exec_file_hook (void (*hook) (char *))
{
hook_type *new_array;
@@ -349,17 +348,9 @@
if the protocol has a less general search function, they can call this
in the cases it can't handle. */
void
-generic_search (len, data, mask, startaddr, increment, lorange, hirange
- addr_found, data_found)
- int len;
- char *data;
- char *mask;
- CORE_ADDR startaddr;
- int increment;
- CORE_ADDR lorange;
- CORE_ADDR hirange;
- CORE_ADDR *addr_found;
- char *data_found;
+generic_search (int len, char *data, char *mask, CORE_ADDR startaddr,
+ int increment, CORE_ADDR lorange, CORE_ADDR hirange,
+ CORE_ADDR *addr_found, char *data_found)
{
int i;
CORE_ADDR curaddr = startaddr;