/* Cache and manage frames for GDB, the GNU debugger.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
/* Cached copy of the previous frame's resume address. */
struct {
enum cached_copy_status status;
+ /* Did VALUE require unmasking when being read. */
+ bool masked;
CORE_ADDR value;
} prev_pc;
const char *stop_string;
};
+/* See frame.h. */
+
+void
+set_frame_previous_pc_masked (struct frame_info *frame)
+{
+ frame->prev_pc.masked = true;
+}
+
+/* See frame.h. */
+
+bool
+get_frame_pc_masked (const struct frame_info *frame)
+{
+ gdb_assert (frame->next != nullptr);
+ gdb_assert (frame->next->prev_pc.status == CC_VALUE);
+
+ return frame->next->prev_pc.masked;
+}
+
/* A frame stash used to speed up frame lookups. Create a hash table
to stash frames previously accessed from the frame cache for
quicker subsequent retrieval. The hash table is emptied whenever
if (fi->next == NULL || fi->next->prev_pc.status == CC_UNKNOWN)
fprintf_unfiltered (file, "<unknown>");
else if (fi->next->prev_pc.status == CC_VALUE)
- fprintf_unfiltered (file, "%s",
- hex_string (fi->next->prev_pc.value));
+ {
+ fprintf_unfiltered (file, "%s", hex_string (fi->next->prev_pc.value));
+ if (fi->next->prev_pc.masked)
+ fprintf_unfiltered (file, "[PAC]");
+ }
else if (fi->next->prev_pc.status == CC_NOT_SAVED)
val_print_not_saved (file);
else if (fi->next->prev_pc.status == CC_UNAVAILABLE)
if special addresses are different, the frames are different. */
eq = 0;
else if (l.artificial_depth != r.artificial_depth)
- /* If artifical depths are different, the frames must be different. */
+ /* If artificial depths are different, the frames must be different. */
eq = 0;
else
/* Frames are equal. */
this_pc_in_block = get_frame_address_in_block (this_frame);
morestack_msym = lookup_minimal_symbol_by_pc (this_pc_in_block).minsym;
if (morestack_msym)
- morestack_name = MSYMBOL_LINKAGE_NAME (morestack_msym);
+ morestack_name = morestack_msym->linkage_name ();
if (!morestack_name || strcmp (morestack_name, "__morestack") != 0)
{
if (frame_debug)
int notcurrent;
CORE_ADDR pc;
- /* If the next frame represents an inlined function call, this frame's
- sal is the "call site" of that inlined function, which can not
- be inferred from get_frame_pc. */
- next_frame = get_next_frame (frame);
if (frame_inlined_callees (frame) > 0)
{
struct symbol *sym;
+ /* If the current frame has some inlined callees, and we have a next
+ frame, then that frame must be an inlined frame. In this case
+ this frame's sal is the "call site" of the next frame's inlined
+ function, which can not be inferred from get_frame_pc. */
+ next_frame = get_next_frame (frame);
if (next_frame)
sym = get_frame_function (next_frame);
else
},
};
+void _initialize_frame ();
void
-_initialize_frame (void)
+_initialize_frame ()
{
obstack_init (&frame_cache_obstack);