From 3f0184acb02f2a390e7d7a4c34594a55d5d99963 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Thu, 7 Oct 1993 23:21:02 +0000 Subject: [PATCH] * h8300-tdep.c (sim_load, sim_kill, sim_open, sim_set_args): New functions. * infrun.c (normal_stop): Don't try and set the pc in the current frame coredump if there isn't one. * remote-sim.c (gdbsim_store_register): Don't SWAP_TARGET_AND_HOST, sim_store_register takes bytes in raw order. (gdbsim_wait): Set status with WSETSTOP. * config/h8300/tm-h8300.h (sr_get_debug): Define --- gdb/ChangeLog | 11 +++++++++++ gdb/h8300-tdep.c | 27 +++++++++++++++++++++++++++ gdb/infrun.c | 2 +- gdb/remote-sim.c | 8 +------- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5f43f7c6065..bfed447c38b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +Thu Oct 7 16:14:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + * h8300-tdep.c (sim_load, sim_kill, sim_open, sim_set_args): + New functions. + * infrun.c (normal_stop): Don't try and set the pc in the current + frame coredump if there isn't one. + * remote-sim.c (gdbsim_store_register): Don't + SWAP_TARGET_AND_HOST, sim_store_register takes bytes in raw order. + (gdbsim_wait): Set status with WSETSTOP. + * config/h8300/tm-h8300.h (sr_get_debug): Define + Thu Oct 7 12:56:57 1993 Jim Kingdon (kingdon@lioth.cygnus.com) New Mach stuff: diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index a50e4bd3786..ba5a9b9efa8 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -482,3 +482,30 @@ print_register_hook (regno) } } + +/* Callbacks for remote-sim */ + +int +sim_load (abfd, prog) +bfd *abfd; +char *prog; +{ + return sim_load_standard (abfd); +} + +void +sim_kill() +{ +} + +sim_open () +{ + return 0; +} + +sim_set_args(argv, env) +char **argv; +char **env; +{ + return 0; +} diff --git a/gdb/infrun.c b/gdb/infrun.c index 84ccf931ce4..e32d70574a3 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1308,7 +1308,7 @@ normal_stop () /* Make sure that the current_frame's pc is correct. This is a correction for setting up the frame info before doing DECR_PC_AFTER_BREAK */ - if (target_has_execution) + if (target_has_execution && get_current_frame()) (get_current_frame ())->pc = read_pc (); if (breakpoints_failed) diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 1da0172a865..fb1e57e6f27 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -107,9 +107,7 @@ int regno; { /* FIXME: Until read_register() returns LONGEST, we have this. */ char value[MAX_REGISTER_RAW_SIZE]; - read_register_gen (regno, value); - SWAP_TARGET_AND_HOST (value, REGISTER_RAW_SIZE (regno)); sim_store_register (regno, value); if (sr_get_debug ()) { @@ -351,14 +349,10 @@ gdbsim_wait (status) { if (sr_get_debug ()) printf_filtered ("gdbsim_wait: "); -#if 1 - *status = sim_stop_signal (); -#else WSETSTOP (*status, sim_stop_signal ()); -#endif if (sr_get_debug ()) printf_filtered ("status %d\n", *status); - return 0; + return inferior_pid; } /* Get ready to modify the registers array. On machines which store -- 2.30.2