Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1557)

Unified Diff: gdb/frame.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/frame.h ('k') | gdb/frame-unwind.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/frame.c
diff --git a/gdb/frame.c b/gdb/frame.c
index 2bb843e1cae75f1356c149950e5c8dabc0293235..b7698733c2aea38d1a2b0c1329325980c5008521 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -309,7 +309,8 @@ fprint_frame (struct ui_file *file, struct frame_info *fi)
static struct frame_info *
skip_inlined_frames (struct frame_info *frame)
{
- while (get_frame_type (frame) == INLINE_FRAME)
+ while (get_frame_type (frame) == INLINE_FRAME
+ || get_frame_type (frame) == TAILCALL_FRAME)
frame = get_prev_frame (frame);
return frame;
@@ -814,6 +815,11 @@ frame_pop (struct frame_info *this_frame)
if (!prev_frame)
error (_("Cannot pop the initial frame."));
+ /* Ignore TAILCALL_FRAME type frames, they were executed already before
+ entering THISFRAME. */
+ while (get_frame_type (prev_frame) == TAILCALL_FRAME)
+ prev_frame = get_prev_frame (prev_frame);
+
/* Make a copy of all the register values unwound from this frame.
Save them in a scratch buffer so that there isn't a race between
trying to extract the old values from the current regcache while
@@ -1031,6 +1037,26 @@ get_frame_register_unsigned (struct frame_info *frame, int regnum)
return frame_unwind_register_unsigned (frame->next, regnum);
}
+int
+read_frame_register_unsigned (struct frame_info *frame, int regnum,
+ ULONGEST *val)
+{
+ struct value *regval = get_frame_register_value (frame, regnum);
+
+ if (!value_optimized_out (regval)
+ && value_entirely_available (regval))
+ {
+ struct gdbarch *gdbarch = get_frame_arch (frame);
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+ int size = register_size (gdbarch, VALUE_REGNUM (regval));
+
+ *val = extract_unsigned_integer (value_contents (regval), size, byte_order);
+ return 1;
+ }
+
+ return 0;
+}
+
void
put_frame_register (struct frame_info *frame, int regnum,
const gdb_byte *buf)
@@ -2096,6 +2122,8 @@ find_frame_sal (struct frame_info *frame, struct symtab_and_line *sal)
we can't do much better. */
sal->pc = get_frame_pc (frame);
+ sal->pspace = get_frame_program_space (frame);
+
return;
}
« no previous file with comments | « gdb/frame.h ('k') | gdb/frame-unwind.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698