This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFA: i386nbsd-nat.c, m68knbsd-nat.c: core dump support
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: RFA: i386nbsd-nat.c, m68knbsd-nat.c: core dump support
- From: jtc at redback dot com (J.T. Conklin)
- Date: 26 Mar 2000 11:27:11 -0800
- Reply-To: jtc at redback dot com
I submit the enclosed patch for approval. The change to i386nbsd-nat.c
makes the fetch_core_registers function static, as there is no need for
it to be global. The same is done for m68knbsd-nat.c, but it also adds
the missing glue which enables core dump reading.
--jtc
2000-03-26 J.T. Conklin <jtc@redback.com>
* i386nbsd-nat.c (fetch_core_registers): Make static.
* m68knbsd-nat.c (fetch_core_registers): Make static.
(m68knbsd_core_fns, _initialize_m68knbsd_nat): Added.
Index: i386nbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386nbsd-nat.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 i386nbsd-nat.c
*** i386nbsd-nat.c 2000/03/24 23:06:57 1.2
--- i386nbsd-nat.c 2000/03/26 19:06:54
*************** struct md_core
*** 164,170 ****
struct env387 freg;
};
! void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
char *core_reg_sect;
unsigned core_reg_size;
--- 164,170 ----
struct env387 freg;
};
! static void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
char *core_reg_sect;
unsigned core_reg_size;
Index: m68knbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68knbsd-nat.c,v
retrieving revision 1.1.1.2
diff -c -3 -p -r1.1.1.2 m68knbsd-nat.c
*** m68knbsd-nat.c 1999/07/07 20:07:51 1.1.1.2
--- m68knbsd-nat.c 2000/03/26 19:06:54
*************** struct md_core
*** 70,76 ****
struct fpreg freg;
};
! void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
char *core_reg_sect;
unsigned core_reg_size;
--- 70,76 ----
struct fpreg freg;
};
! static void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
char *core_reg_sect;
unsigned core_reg_size;
*************** fetch_core_registers (core_reg_sect, cor
*** 85,88 ****
--- 85,106 ----
/* Floating point registers */
memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
&core_reg->freg, sizeof (struct fpreg));
+ }
+
+ /* Register that we are able to handle m68knbsd core file formats.
+ FIXME: is this really bfd_target_unknown_flavour? */
+
+ static struct core_fns m68knbsd_core_fns =
+ {
+ bfd_target_unknown_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
+ };
+
+ void
+ _initialize_m68knbsd_nat ()
+ {
+ add_core_fns (&m68knbsd_core_fns);
}
--
J.T. Conklin
RedBack Networks