2002-11-09 03:42:00 +08:00
|
|
|
/* Code dealing with dummy stack frames, for GDB, the GNU debugger.
|
|
|
|
|
2007-01-10 01:59:20 +08:00
|
|
|
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
|
|
|
|
1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
|
|
|
|
Free Software Foundation, Inc.
|
2002-11-09 03:42:00 +08:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2005-12-18 06:34:03 +08:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
2002-11-09 03:42:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
#include "dummy-frame.h"
|
|
|
|
#include "regcache.h"
|
|
|
|
#include "frame.h"
|
|
|
|
#include "inferior.h"
|
|
|
|
#include "gdb_assert.h"
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
2003-01-19 01:25:23 +08:00
|
|
|
#include "frame-unwind.h"
|
2003-05-06 02:33:11 +08:00
|
|
|
#include "command.h"
|
|
|
|
#include "gdbcmd.h"
|
2004-08-03 01:39:53 +08:00
|
|
|
#include "gdb_string.h"
|
2002-11-09 03:42:00 +08:00
|
|
|
|
|
|
|
/* Dummy frame. This saves the processor state just prior to setting
|
|
|
|
up the inferior function call. Older targets save the registers
|
|
|
|
on the target stack (but that really slows down function calls). */
|
|
|
|
|
|
|
|
struct dummy_frame
|
|
|
|
{
|
|
|
|
struct dummy_frame *next;
|
2004-08-03 02:52:03 +08:00
|
|
|
/* This frame's ID. Must match the value returned by
|
|
|
|
gdbarch_unwind_dummy_id. */
|
2002-12-14 00:40:25 +08:00
|
|
|
struct frame_id id;
|
2004-08-03 02:52:03 +08:00
|
|
|
/* The caller's regcache. */
|
2002-11-09 03:42:00 +08:00
|
|
|
struct regcache *regcache;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct dummy_frame *dummy_frame_stack = NULL;
|
|
|
|
|
2004-08-03 02:52:03 +08:00
|
|
|
/* Function: deprecated_pc_in_call_dummy (pc)
|
2002-11-24 23:06:08 +08:00
|
|
|
|
2004-08-03 02:52:03 +08:00
|
|
|
Return non-zero if the PC falls in a dummy frame created by gdb for
|
|
|
|
an inferior call. The code below which allows DECR_PC_AFTER_BREAK
|
|
|
|
is for infrun.c, which may give the function a PC without that
|
|
|
|
subtracted out.
|
2002-11-24 23:06:08 +08:00
|
|
|
|
|
|
|
FIXME: cagney/2002-11-23: This is silly. Surely "infrun.c" can
|
|
|
|
figure out what the real PC (as in the resume address) is BEFORE
|
2004-08-03 02:52:03 +08:00
|
|
|
calling this function.
|
|
|
|
|
|
|
|
NOTE: cagney/2004-08-02: I'm pretty sure that, with the introduction of
|
|
|
|
infrun.c:adjust_pc_after_break (thanks), this function is now
|
|
|
|
always called with a correctly adjusted PC!
|
2002-11-24 23:06:08 +08:00
|
|
|
|
2004-08-03 02:52:03 +08:00
|
|
|
NOTE: cagney/2004-08-02: Code should not need to call this. */
|
|
|
|
|
|
|
|
int
|
|
|
|
deprecated_pc_in_call_dummy (CORE_ADDR pc)
|
2002-11-09 03:42:00 +08:00
|
|
|
{
|
|
|
|
struct dummy_frame *dummyframe;
|
|
|
|
for (dummyframe = dummy_frame_stack;
|
|
|
|
dummyframe != NULL;
|
|
|
|
dummyframe = dummyframe->next)
|
|
|
|
{
|
2004-08-03 02:52:03 +08:00
|
|
|
if ((pc >= dummyframe->id.code_addr)
|
|
|
|
&& (pc <= dummyframe->id.code_addr + DECR_PC_AFTER_BREAK))
|
2002-11-09 03:42:00 +08:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-08-03 01:39:53 +08:00
|
|
|
/* Push the caller's state, along with the dummy frame info, onto a
|
|
|
|
dummy-frame stack. */
|
2002-11-09 03:42:00 +08:00
|
|
|
|
|
|
|
void
|
2004-08-03 01:39:53 +08:00
|
|
|
dummy_frame_push (struct regcache *caller_regcache,
|
|
|
|
const struct frame_id *dummy_id)
|
2002-11-09 03:42:00 +08:00
|
|
|
{
|
|
|
|
struct dummy_frame *dummy_frame;
|
|
|
|
|
2004-08-03 01:39:53 +08:00
|
|
|
/* Check to see if there are stale dummy frames, perhaps left over
|
|
|
|
from when a longjump took us out of a function that was called by
|
|
|
|
the debugger. */
|
2002-11-09 03:42:00 +08:00
|
|
|
dummy_frame = dummy_frame_stack;
|
|
|
|
while (dummy_frame)
|
2004-08-03 01:39:53 +08:00
|
|
|
/* FIXME: cagney/2004-08-02: Should just test IDs. */
|
2004-08-03 02:52:03 +08:00
|
|
|
if (frame_id_inner (dummy_frame->id, (*dummy_id)))
|
2004-08-03 01:39:53 +08:00
|
|
|
/* Stale -- destroy! */
|
2002-11-09 03:42:00 +08:00
|
|
|
{
|
|
|
|
dummy_frame_stack = dummy_frame->next;
|
|
|
|
regcache_xfree (dummy_frame->regcache);
|
|
|
|
xfree (dummy_frame);
|
|
|
|
dummy_frame = dummy_frame_stack;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
dummy_frame = dummy_frame->next;
|
|
|
|
|
2004-08-03 01:39:53 +08:00
|
|
|
dummy_frame = XZALLOC (struct dummy_frame);
|
|
|
|
dummy_frame->regcache = caller_regcache;
|
|
|
|
dummy_frame->id = (*dummy_id);
|
2002-11-09 03:42:00 +08:00
|
|
|
dummy_frame->next = dummy_frame_stack;
|
|
|
|
dummy_frame_stack = dummy_frame;
|
|
|
|
}
|
|
|
|
|
2004-08-03 00:07:31 +08:00
|
|
|
/* Return the dummy frame cache, it contains both the ID, and a
|
|
|
|
pointer to the regcache. */
|
|
|
|
struct dummy_frame_cache
|
|
|
|
{
|
|
|
|
struct frame_id this_id;
|
|
|
|
struct regcache *prev_regcache;
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
dummy_frame_sniffer (const struct frame_unwind *self,
|
|
|
|
struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache)
|
|
|
|
{
|
|
|
|
struct dummy_frame *dummyframe;
|
|
|
|
struct frame_id this_id;
|
|
|
|
|
|
|
|
/* When unwinding a normal frame, the stack structure is determined
|
|
|
|
by analyzing the frame's function's code (be it using brute force
|
|
|
|
prologue analysis, or the dwarf2 CFI). In the case of a dummy
|
|
|
|
frame, that simply isn't possible. The PC is either the program
|
|
|
|
entry point, or some random address on the stack. Trying to use
|
|
|
|
that PC to apply standard frame ID unwind techniques is just
|
|
|
|
asking for trouble. */
|
2005-04-02 08:45:52 +08:00
|
|
|
|
|
|
|
/* Don't bother unles there is at least one dummy frame. */
|
|
|
|
if (dummy_frame_stack != NULL)
|
2004-08-03 00:07:31 +08:00
|
|
|
{
|
2005-04-02 08:45:52 +08:00
|
|
|
/* Use an architecture specific method to extract the prev's
|
|
|
|
dummy ID from the next frame. Note that this method uses
|
|
|
|
frame_register_unwind to obtain the register values needed to
|
|
|
|
determine the dummy frame's ID. */
|
|
|
|
this_id = gdbarch_unwind_dummy_id (get_frame_arch (next_frame),
|
|
|
|
next_frame);
|
|
|
|
|
|
|
|
/* Use that ID to find the corresponding cache entry. */
|
|
|
|
for (dummyframe = dummy_frame_stack;
|
|
|
|
dummyframe != NULL;
|
|
|
|
dummyframe = dummyframe->next)
|
2004-08-03 02:52:03 +08:00
|
|
|
{
|
2005-04-02 08:45:52 +08:00
|
|
|
if (frame_id_eq (dummyframe->id, this_id))
|
|
|
|
{
|
|
|
|
struct dummy_frame_cache *cache;
|
|
|
|
cache = FRAME_OBSTACK_ZALLOC (struct dummy_frame_cache);
|
|
|
|
cache->prev_regcache = dummyframe->regcache;
|
|
|
|
cache->this_id = this_id;
|
|
|
|
(*this_prologue_cache) = cache;
|
|
|
|
return 1;
|
|
|
|
}
|
2004-08-03 02:52:03 +08:00
|
|
|
}
|
2004-08-03 00:07:31 +08:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-11-09 03:42:00 +08:00
|
|
|
/* Given a call-dummy dummy-frame, return the registers. Here the
|
|
|
|
register value is taken from the local copy of the register buffer. */
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
2003-01-19 01:25:23 +08:00
|
|
|
static void
|
2003-03-17 22:23:50 +08:00
|
|
|
dummy_frame_prev_register (struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache,
|
|
|
|
int regnum, int *optimized,
|
|
|
|
enum lval_type *lvalp, CORE_ADDR *addrp,
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 22:53:35 +08:00
|
|
|
int *realnum, gdb_byte *bufferp)
|
2002-11-09 03:42:00 +08:00
|
|
|
{
|
2004-08-03 00:07:31 +08:00
|
|
|
/* The dummy-frame sniffer always fills in the cache. */
|
|
|
|
struct dummy_frame_cache *cache = (*this_prologue_cache);
|
|
|
|
gdb_assert (cache != NULL);
|
2002-11-09 03:42:00 +08:00
|
|
|
|
|
|
|
/* Describe the register's location. Generic dummy frames always
|
|
|
|
have the register value in an ``expression''. */
|
|
|
|
*optimized = 0;
|
|
|
|
*lvalp = not_lval;
|
|
|
|
*addrp = 0;
|
|
|
|
*realnum = -1;
|
|
|
|
|
|
|
|
/* If needed, find and return the value of the register. */
|
|
|
|
if (bufferp != NULL)
|
|
|
|
{
|
|
|
|
/* Return the actual value. */
|
|
|
|
/* Use the regcache_cooked_read() method so that it, on the fly,
|
|
|
|
constructs either a raw or pseudo register from the raw
|
|
|
|
register cache. */
|
2004-08-03 00:07:31 +08:00
|
|
|
regcache_cooked_read (cache->prev_regcache, regnum, bufferp);
|
2002-11-09 03:42:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-17 22:23:50 +08:00
|
|
|
/* Assuming that THIS frame is a dummy (remember, the NEXT and not
|
|
|
|
THIS frame is passed in), return the ID of THIS frame. That ID is
|
|
|
|
determined by examining the NEXT frame's unwound registers using
|
|
|
|
the method unwind_dummy_id(). As a side effect, THIS dummy frame's
|
|
|
|
dummy cache is located and and saved in THIS_PROLOGUE_CACHE. */
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
2003-01-19 01:25:23 +08:00
|
|
|
|
|
|
|
static void
|
2003-03-17 22:23:50 +08:00
|
|
|
dummy_frame_this_id (struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache,
|
|
|
|
struct frame_id *this_id)
|
2002-12-14 00:40:25 +08:00
|
|
|
{
|
2004-08-03 00:07:31 +08:00
|
|
|
/* The dummy-frame sniffer always fills in the cache. */
|
|
|
|
struct dummy_frame_cache *cache = (*this_prologue_cache);
|
|
|
|
gdb_assert (cache != NULL);
|
|
|
|
(*this_id) = cache->this_id;
|
2002-12-14 00:40:25 +08:00
|
|
|
}
|
|
|
|
|
2004-08-03 00:07:31 +08:00
|
|
|
static const struct frame_unwind dummy_frame_unwinder =
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
2003-01-19 01:25:23 +08:00
|
|
|
{
|
2003-04-05 11:56:00 +08:00
|
|
|
DUMMY_FRAME,
|
2003-03-17 22:23:50 +08:00
|
|
|
dummy_frame_this_id,
|
2004-08-03 00:07:31 +08:00
|
|
|
dummy_frame_prev_register,
|
|
|
|
NULL,
|
|
|
|
dummy_frame_sniffer,
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
2003-01-19 01:25:23 +08:00
|
|
|
};
|
|
|
|
|
2004-08-03 00:07:31 +08:00
|
|
|
const struct frame_unwind *const dummy_frame_unwind = {
|
|
|
|
&dummy_frame_unwinder
|
|
|
|
};
|
2003-05-06 02:33:11 +08:00
|
|
|
|
|
|
|
static void
|
|
|
|
fprint_dummy_frames (struct ui_file *file)
|
|
|
|
{
|
|
|
|
struct dummy_frame *s;
|
|
|
|
for (s = dummy_frame_stack; s != NULL; s = s->next)
|
|
|
|
{
|
|
|
|
gdb_print_host_address (s, file);
|
|
|
|
fprintf_unfiltered (file, ":");
|
|
|
|
fprintf_unfiltered (file, " id=");
|
|
|
|
fprint_frame_id (file, s->id);
|
|
|
|
fprintf_unfiltered (file, "\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
maintenance_print_dummy_frames (char *args, int from_tty)
|
|
|
|
{
|
|
|
|
if (args == NULL)
|
|
|
|
fprint_dummy_frames (gdb_stdout);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
struct ui_file *file = gdb_fopen (args, "w");
|
|
|
|
if (file == NULL)
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-12 02:13:55 +08:00
|
|
|
perror_with_name (_("maintenance print dummy-frames"));
|
2003-05-06 02:33:11 +08:00
|
|
|
fprint_dummy_frames (file);
|
|
|
|
ui_file_delete (file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extern void _initialize_dummy_frame (void);
|
|
|
|
|
|
|
|
void
|
|
|
|
_initialize_dummy_frame (void)
|
|
|
|
{
|
|
|
|
add_cmd ("dummy-frames", class_maintenance, maintenance_print_dummy_frames,
|
2005-02-14 Andrew Cagney <cagney@gnu.org>
Mark up add_cmd.
* arch-utils.c, avr-tdep.c, breakpoint.c, corefile.c: Update.
* cp-abi.c, cp-namespace.c, cp-support.c, dummy-frame.c: Update.
* exec.c, gnu-nat.c, go32-nat.c, hppa-tdep.c, infcmd.c: Update.
* infrun.c, interps.c, macrocmd.c, maint.c, memattr.c: Update.
* mips-tdep.c, ocd.c, osabi.c, printcmd.c, regcache.c: Update.
* reggroups.c, remote-fileio.c, remote-rdi.c, remote.c: Update.
* sol-thread.c, source.c, stack.c, symfile-mem.c: Update.
* symfile.c, thread.c, tracepoint.c, valprint.c, value.c: Update.
* win32-nat.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-regs.c: Update.
2005-02-15 02:10:11 +08:00
|
|
|
_("Print the contents of the internal dummy-frame stack."),
|
2003-05-06 02:33:11 +08:00
|
|
|
&maintenanceprintlist);
|
|
|
|
|
|
|
|
}
|