#include "language.h"
#include "regcache.h"
#include "reggroups.h"
-#include "floatformat.h"
#include "block.h"
#include "observer.h"
#include "infcall.h"
if (fi)
{
- cache->regcache = frame_save_as_regcache (fi);
+ cache->regcache = frame_save_as_regcache (fi).release ();
*this_prologue_cache = cache;
return 1;
}
spu2ppu_dealloc_cache (struct frame_info *self, void *this_cache)
{
struct spu2ppu_cache *cache = (struct spu2ppu_cache *) this_cache;
- regcache_xfree (cache->regcache);
+ delete cache->regcache;
}
static const struct frame_unwind spu2ppu_unwind = {
/* "info spu" commands. */
static void
-info_spu_event_command (char *args, int from_tty)
+info_spu_event_command (const char *args, int from_tty)
{
struct frame_info *frame = get_selected_frame (NULL);
ULONGEST event_status = 0;
ULONGEST event_mask = 0;
- struct cleanup *chain;
gdb_byte buf[100];
char annex[32];
LONGEST len;
buf[len] = '\0';
event_mask = strtoulst ((char *) buf, NULL, 16);
- chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoEvent");
+ ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoEvent");
if (current_uiout->is_mi_like_p ())
{
printf_filtered (_("Event Status 0x%s\n"), phex (event_status, 4));
printf_filtered (_("Event Mask 0x%s\n"), phex (event_mask, 4));
}
-
- do_cleanups (chain);
}
static void
-info_spu_signal_command (char *args, int from_tty)
+info_spu_signal_command (const char *args, int from_tty)
{
struct frame_info *frame = get_selected_frame (NULL);
struct gdbarch *gdbarch = get_frame_arch (frame);
ULONGEST signal2 = 0;
ULONGEST signal2_type = 0;
int signal2_pending = 0;
- struct cleanup *chain;
char annex[32];
gdb_byte buf[100];
LONGEST len;
buf[len] = '\0';
signal2_type = strtoulst ((char *) buf, NULL, 16);
- chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoSignal");
+ ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoSignal");
if (current_uiout->is_mi_like_p ())
{
else
printf_filtered (_("(Type Overwrite)\n"));
}
-
- do_cleanups (chain);
}
static void
}
static void
-info_spu_mailbox_command (char *args, int from_tty)
+info_spu_mailbox_command (const char *args, int from_tty)
{
struct frame_info *frame = get_selected_frame (NULL);
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct cleanup *chain;
char annex[32];
gdb_byte buf[1024];
LONGEST len;
id = get_frame_register_unsigned (frame, SPU_ID_REGNUM);
- chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoMailbox");
+ ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoMailbox");
xsnprintf (annex, sizeof annex, "%d/mbox_info", id);
len = target_read (¤t_target, TARGET_OBJECT_SPU, annex,
info_spu_mailbox_list (buf, len / 4, byte_order,
"wbox", "SPU Inbound Mailbox");
-
- do_cleanups (chain);
}
static ULONGEST
}
static void
-info_spu_dma_command (char *args, int from_tty)
+info_spu_dma_command (const char *args, int from_tty)
{
struct frame_info *frame = get_selected_frame (NULL);
struct gdbarch *gdbarch = get_frame_arch (frame);
ULONGEST dma_info_status;
ULONGEST dma_info_stall_and_notify;
ULONGEST dma_info_atomic_command_status;
- struct cleanup *chain;
char annex[32];
gdb_byte buf[1024];
LONGEST len;
dma_info_atomic_command_status
= extract_unsigned_integer (buf + 32, 8, byte_order);
- chain = make_cleanup_ui_out_tuple_begin_end (current_uiout, "SPUInfoDMA");
+ ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoDMA");
if (current_uiout->is_mi_like_p ())
{
}
info_spu_dma_cmdlist (buf + 40, 16, byte_order);
- do_cleanups (chain);
}
static void
-info_spu_proxydma_command (char *args, int from_tty)
+info_spu_proxydma_command (const char *args, int from_tty)
{
struct frame_info *frame = get_selected_frame (NULL);
struct gdbarch *gdbarch = get_frame_arch (frame);
ULONGEST dma_info_type;
ULONGEST dma_info_mask;
ULONGEST dma_info_status;
- struct cleanup *chain;
char annex[32];
gdb_byte buf[1024];
LONGEST len;
dma_info_mask = extract_unsigned_integer (buf + 8, 8, byte_order);
dma_info_status = extract_unsigned_integer (buf + 16, 8, byte_order);
- chain = make_cleanup_ui_out_tuple_begin_end (current_uiout,
- "SPUInfoProxyDMA");
+ ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoProxyDMA");
if (current_uiout->is_mi_like_p ())
{
}
info_spu_dma_cmdlist (buf + 24, 8, byte_order);
- do_cleanups (chain);
}
static void
-info_spu_command (char *args, int from_tty)
+info_spu_command (const char *args, int from_tty)
{
printf_unfiltered (_("\"info spu\" must be followed by "
"the name of an SPU facility.\n"));
/* Root of all "set spu "/"show spu " commands. */
static void
-show_spu_command (char *args, int from_tty)
+show_spu_command (const char *args, int from_tty)
{
help_list (showspucmdlist, "show spu ", all_commands, gdb_stdout);
}
static void
-set_spu_command (char *args, int from_tty)
+set_spu_command (const char *args, int from_tty)
{
help_list (setspucmdlist, "set spu ", all_commands, gdb_stdout);
}