/* Code dealing with dummy stack frames, for GDB, the GNU debugger.
- Copyright (C) 1986-2017 Free Software Foundation, Inc.
+ Copyright (C) 1986-2018 Free Software Foundation, Inc.
This file is part of GDB.
#include "frame-unwind.h"
#include "command.h"
#include "gdbcmd.h"
-#include "observer.h"
+#include "observable.h"
#include "gdbthread.h"
#include "infcall.h"
struct dummy_frame_cache
{
struct frame_id this_id;
- struct regcache *prev_regcache;
+ readonly_detached_regcache *prev_regcache;
};
static int
/* Use the regcache_cooked_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
- regcache_cooked_read (cache->prev_regcache, regnum,
- value_contents_writeable (reg_val));
+ cache->prev_regcache->cooked_read (regnum,
+ value_contents_writeable (reg_val));
return reg_val;
}
}
static void
-maintenance_print_dummy_frames (char *args, int from_tty)
+maintenance_print_dummy_frames (const char *args, int from_tty)
{
if (args == NULL)
fprint_dummy_frames (gdb_stdout);
_("Print the contents of the internal dummy-frame stack."),
&maintenanceprintlist);
- observer_attach_inferior_created (cleanup_dummy_frames);
+ gdb::observers::inferior_created.attach (cleanup_dummy_frames);
}