Module Name: src
Committed By: christos
Date: Fri Jul 12 22:43:15 UTC 2019
Modified Files:
src/external/gpl3/gdb/dist/gdb: mips-nbsd-nat.c
Log Message:
put back the kvm stuff lost in previous merge.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c:1.8 Wed May 29 21:19:36 2019
+++ src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c Fri Jul 12 18:43:15 2019
@@ -28,16 +28,6 @@
#include <sys/ptrace.h>
#include <machine/reg.h>
-#ifndef HAVE_GREGSET_T
-typedef struct reg gregset_t;
-#endif
-
-#ifndef HAVE_FPREGSET_T
-typedef struct fpreg fpregset_t;
-#endif
-
-#include "gregset.h"
-
#include "mips-tdep.h"
#include "nbsd-nat.h"
#include "mips-nbsd-tdep.h"
@@ -133,8 +123,44 @@ mips_nbsd_nat_target::store_registers (s
}
}
+static int
+mipsnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+ struct label_t sf;
+
+ sf = pcb->pcb_context;
+
+ /* really should test for n{32,64} abi for this register
+ unless this is purely the "n" ABI */
+
+ regcache->raw_supply (MIPS_S0_REGNUM, &sf.val[_L_S0]);
+ regcache->raw_supply (MIPS_S1_REGNUM, &sf.val[_L_S1]);
+ regcache->raw_supply (MIPS_S2_REGNUM, &sf.val[_L_S2]);
+ regcache->raw_supply (MIPS_S3_REGNUM, &sf.val[_L_S3]);
+ regcache->raw_supply (MIPS_S4_REGNUM, &sf.val[_L_S4]);
+ regcache->raw_supply (MIPS_S5_REGNUM, &sf.val[_L_S5]);
+ regcache->raw_supply (MIPS_S6_REGNUM, &sf.val[_L_S6]);
+ regcache->raw_supply (MIPS_S7_REGNUM, &sf.val[_L_S7]);
+
+ regcache->raw_supply (MIPS_S8_REGNUM, &sf.val[_L_S8]);
+
+ regcache->raw_supply (MIPS_T8_REGNUM, &sf.val[_L_T8]);
+
+ regcache->raw_supply (MIPS_GP_REGNUM, &sf.val[_L_GP]);
+
+ regcache->raw_supply (MIPS_SP_REGNUM, &sf.val[_L_SP]);
+ regcache->raw_supply (MIPS_RA_REGNUM, &sf.val[_L_RA]);
+ regcache->raw_supply (MIPS_PS_REGNUM, &sf.val[_L_SR]);
+
+ /* provide the return address of the savectx as the current pc */
+ regcache->raw_supply (MIPS_EMBED_PC_REGNUM, &sf.val[_L_RA]);
+
+ return 0;
+}
+
void
_initialize_mipsnbsd_nat (void)
{
add_inf_child_target (&the_mips_nbsd_nat_target);
+ bsd_kvm_add_target (mipsnbsd_supply_pcb);
}