/* Remote debugging interface for Renesas E7000 ICE, for GDB
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
Contributed by Cygnus Support.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* The E7000 is an in-circuit emulator for the Renesas H8/300-H and
Renesas-SH processor. It has serial port and a lan port.
target_terminal_inferior ();
/* insert_step_breakpoint (); FIXME, do we need this? */
- proceed ((CORE_ADDR) entry_pt, -1, 0); /* Let 'er rip... */
+ write_pc ((CORE_ADDR) entry_pt);
}
/* Open a connection to a remote debugger. NAME is the filename used
that the target is about to print out a status message of some sort. That
doesn't happen here. */
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = read_pc ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
{
int regno;
char *wanted = NULL;
+ int realregs = 0;
puts_e7000debug ("R\r");
if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
{
wanted = want_sh;
+ realregs = 59;
switch (TARGET_ARCHITECTURE->mach)
{
case bfd_mach_sh3:
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
wanted = want_h8300h;
+ realregs = 10;
switch (TARGET_ARCHITECTURE->mach)
{
case bfd_mach_h8300s:
case bfd_mach_h8300sx:
case bfd_mach_h8300sxn:
wanted = want_h8300s;
+ realregs = 11;
}
}
fetch_regs_from_dump (gch, wanted);
/* And supply the extra ones the simulator uses */
- for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
+ for (regno = realregs; regno < NUM_REGS; regno++)
{
int buf = 0;
e7000_store_registers (void)
{
int regno;
+ int realregs = 0;
- for (regno = 0; regno < NUM_REALREGS; regno++)
+ if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
+ realregs = 59;
+ if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300) {
+ realregs = ((TARGET_ARCHITECTURE->mach == bfd_mach_h8300s ||
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sn ||
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sx ||
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sxn) ? 11 : 10);
+ }
+
+ for (regno = 0; regno < realregs; regno++)
e7000_store_register (regno);
registers_changed ();
Returns the number of bytes transferred. */
static int
-e7000_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
+e7000_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
{0};
static int
-e7000_insert_breakpoint (CORE_ADDR addr, char *shadow)
+e7000_insert_breakpoint (struct bp_target_info *bp_tgt)
{
+ CORE_ADDR addr = bp_tgt->placed_address;
int i;
char buf[200];
#if 0
}
#else
#if 0
- e7000_read_inferior_memory (addr, shadow, 2);
+ bp_tgt->shadow_len = 2;
+ e7000_read_inferior_memory (addr, bp_tgt->shadow_contents, 2);
e7000_write_inferior_memory (addr, nop, 2);
#endif
}
static int
-e7000_remove_breakpoint (CORE_ADDR addr, char *shadow)
+e7000_remove_breakpoint (struct bp_target_info *bp_tgt)
{
+ CORE_ADDR addr = bp_tgt->placed_address;
int i;
char buf[200];
#if 0
/* Replace the insn under the break */
- e7000_write_inferior_memory (addr, shadow, 2);
+ e7000_write_inferior_memory (addr, bp_tgt->shadow_contents,
+ bp_tgt->shadow_len);
#endif
#endif
int had_sleep = 0;
int loop = 1;
char *wanted_nopc = NULL;
+ int realregs = 0;
/* Then echo chars until PC= string seen */
gch (); /* Drop cr */
if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
{
wanted_nopc = want_nopc_sh;
+ realregs = 59;
switch (TARGET_ARCHITECTURE->mach)
{
case bfd_mach_sh3:
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
wanted_nopc = want_nopc_h8300h;
+ realregs = 10;
switch (TARGET_ARCHITECTURE->mach)
{
case bfd_mach_h8300s:
case bfd_mach_h8300sx:
case bfd_mach_h8300sxn:
wanted_nopc = want_nopc_h8300s;
+ realregs = 11;
}
}
fetch_regs_from_dump (gch, wanted_nopc);
/* And supply the extra ones the simulator uses */
- for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
+ for (regno = realregs; regno < NUM_REGS; regno++)
{
int buf = 0;
regcache_raw_supply (current_regcache, regno, (char *) &buf);
add_target (&e7000_ops);
add_com ("e7000", class_obscure, e7000_command,
- "Send a command to the e7000 monitor.");
+ _("Send a command to the e7000 monitor."));
add_com ("ftplogin", class_obscure, e7000_login_command,
- "Login to machine and change to directory.");
+ _("Login to machine and change to directory."));
add_com ("ftpload", class_obscure, e7000_ftp_command,
- "Fetch and load a file from previously described place.");
+ _("Fetch and load a file from previously described place."));
add_com ("drain", class_obscure, e7000_drain_command,
- "Drain pending e7000 text buffers.");
-
- deprecated_add_show_from_set
- (add_set_cmd ("usehardbreakpoints", no_class,
- var_integer, (char *) &use_hard_breakpoints, "\
-Set use of hardware breakpoints for all breakpoints.\n", &setlist),
- &showlist);
+ _("Drain pending e7000 text buffers."));
+
+ add_setshow_integer_cmd ("usehardbreakpoints", no_class,
+ &use_hard_breakpoints, _("\
+Set use of hardware breakpoints for all breakpoints."), _("\
+Show use of hardware breakpoints for all breakpoints."), NULL,
+ NULL,
+ NULL, /* FIXME: i18n: */
+ &setlist, &showlist);
}