gdb/testsuite: don't use source tree as temporary HOME directory
[binutils-gdb.git] / gdb / frame.h
index fab9dd8aaabdcfa9fd90b89bd657cb5985a29e60..da52522ad2aafe16308c922dc59d288e696ce2f9 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions for dealing with stack frames, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2020 Free Software Foundation, Inc.
+   Copyright (C) 1986-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -169,6 +169,9 @@ struct frame_id
      Caller of inlined function will have it zero, each more inner called frame
      will have it increasingly one, two etc.  Similarly for TAILCALL_FRAME.  */
   int artificial_depth;
+
+  /* Return a string representation of this frame id.  */
+  std::string to_string () const;
 };
 
 /* Save and restore the currently selected frame.  */
@@ -258,11 +261,6 @@ extern bool frame_id_artificial_p (frame_id l);
 /* Returns true when L and R identify the same frame.  */
 extern bool frame_id_eq (frame_id l, frame_id r);
 
-/* Write the internal representation of a frame ID on the specified
-   stream.  */
-extern void fprint_frame_id (struct ui_file *file, struct frame_id id);
-
-
 /* Frame types.  Some are real, some are signal trampolines, and some
    are completely artificial (dummy).  */
 
@@ -653,15 +651,15 @@ extern void put_frame_register (struct frame_info *frame, int regnum,
    contents are optimized out or unavailable, set *OPTIMIZEDP,
    *UNAVAILABLEP accordingly.  */
 extern bool get_frame_register_bytes (frame_info *frame, int regnum,
-                                     CORE_ADDR offset, int len,
-                                     gdb_byte *myaddr,
+                                     CORE_ADDR offset,
+                                     gdb::array_view<gdb_byte> buffer,
                                      int *optimizedp, int *unavailablep);
 
-/* Write LEN bytes to one or multiple registers starting with REGNUM
-   in frame FRAME, starting at OFFSET, into BUF.  */
+/* Write bytes from BUFFER to one or multiple registers starting with REGNUM
+   in frame FRAME, starting at OFFSET.  */
 extern void put_frame_register_bytes (struct frame_info *frame, int regnum,
-                                     CORE_ADDR offset, int len,
-                                     const gdb_byte *myaddr);
+                                     CORE_ADDR offset,
+                                     gdb::array_view<const gdb_byte> buffer);
 
 /* Unwind the PC.  Strictly speaking return the resume address of the
    calling frame.  For GDB, `pc' is the resume address and not a
@@ -687,7 +685,7 @@ extern void frame_pop (struct frame_info *frame);
    adaptor frames this should be ok.  */
 
 extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr,
-                             gdb_byte *buf, int len);
+                             gdb::array_view<gdb_byte> buffer);
 extern LONGEST get_frame_memory_signed (struct frame_info *this_frame,
                                        CORE_ADDR memaddr, int len);
 extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
@@ -696,7 +694,7 @@ extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
 /* Same as above, but return true zero when the entire memory read
    succeeds, false otherwise.  */
 extern bool safe_frame_unwind_memory (frame_info *this_frame, CORE_ADDR addr,
-                                     gdb_byte *buf, int len);
+                                     gdb::array_view<gdb_byte> buffer);
 
 /* Return this frame's architecture.  */
 extern struct gdbarch *get_frame_arch (struct frame_info *this_frame);