/* Target-machine dependent code for Zilog Z8000, for GDB.
- Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+ 2002 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdbtypes.h"
#include "dis-asm.h"
#include "gdbcore.h"
+#include "regcache.h"
#include "value.h" /* For read_register() */
CORE_ADDR
z8k_frame_chain (struct frame_info *thisframe)
{
- if (thisframe->prev == 0)
- {
- /* This is the top of the stack, let's get the sp for real */
- }
if (!inside_entry_file (thisframe->pc))
{
return read_memory_pointer (thisframe->frame);
void
init_frame_pc (void)
{
- abort ();
+ internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
/* Put here the code to store, into a struct frame_saved_regs,
void
z8k_push_dummy_frame (void)
{
- abort ();
+ internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
int
{
if ((regno & 1) == 0 && regno < 16)
{
- unsigned short l[2];
+ unsigned char l[4];
- read_relative_register_raw_bytes (regno, (char *) (l + 0));
- read_relative_register_raw_bytes (regno + 1, (char *) (l + 1));
+ frame_register_read (selected_frame, regno, l + 0);
+ frame_register_read (selected_frame, regno + 1, l + 2);
printf_unfiltered ("\t");
- printf_unfiltered ("%04x%04x", l[0], l[1]);
+ printf_unfiltered ("0x%02x%02x%02x%02x", l[0], l[1], l[2], l[3]);
}
if ((regno & 3) == 0 && regno < 16)
{
- unsigned short l[4];
+ unsigned char l[8];
- read_relative_register_raw_bytes (regno, (char *) (l + 0));
- read_relative_register_raw_bytes (regno + 1, (char *) (l + 1));
- read_relative_register_raw_bytes (regno + 2, (char *) (l + 2));
- read_relative_register_raw_bytes (regno + 3, (char *) (l + 3));
+ frame_register_read (selected_frame, regno, l + 0);
+ frame_register_read (selected_frame, regno + 1, l + 2);
+ frame_register_read (selected_frame, regno + 2, l + 4);
+ frame_register_read (selected_frame, regno + 3, l + 6);
printf_unfiltered ("\t");
- printf_unfiltered ("%04x%04x%04x%04x", l[0], l[1], l[2], l[3]);
+ printf_unfiltered ("0x%02x%02x%02x%02x%02x%02x%02x%02x",
+ l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7]);
}
if (regno == 15)
{
unsigned short rval;
int i;
- read_relative_register_raw_bytes (regno, (char *) (&rval));
+ frame_register_read (selected_frame, regno, (char *) (&rval));
printf_unfiltered ("\n");
for (i = 0; i < 10; i += 2)