gdb: remove duplicate declaration of 'find_thread_ptid'
[deliverable/binutils-gdb.git] / gdb / trad-frame.h
index cdc937cfa29db3412007d636673b298d75c9c68f..0351441dd3690b44a2da65d04f6d9fed6543fc3b 100644 (file)
@@ -55,8 +55,8 @@ void trad_frame_set_reg_value (struct trad_frame_cache *this_cache,
 /* Given the cache in THIS_TRAD_CACHE, set the value of REGNUM to the bytes
    contained in BYTES with size SIZE.  */
 void trad_frame_set_reg_value_bytes (struct trad_frame_cache *this_trad_cache,
-                                    int regnum, const gdb_byte *bytes,
-                                    size_t size);
+                                    int regnum,
+                                    gdb::array_view<const gdb_byte> bytes);
 
 struct value *trad_frame_get_register (struct trad_frame_cache *this_trad_cache,
                                       struct frame_info *this_frame,
@@ -114,10 +114,14 @@ struct trad_frame_saved_reg
   /* Encode that the saved register's value is stored as a sequence of bytes.
      This is useful when the value is larger than what primitive types
      can hold.  */
-  void set_value_bytes (const gdb_byte *value_bytes)
+  void set_value_bytes (gdb::array_view<const gdb_byte> bytes)
   {
+    /* Allocate the space and copy the data bytes.  */
+    gdb_byte *data = FRAME_OBSTACK_CALLOC (bytes.size (), gdb_byte);
+    memcpy (data, bytes.data (), bytes.size ());
+
     m_kind = trad_frame_saved_reg_kind::VALUE_BYTES;
-    m_reg.value_bytes = value_bytes;
+    m_reg.value_bytes = data;
   }
 
   /* Getters */
@@ -185,43 +189,7 @@ private:
   } m_reg;
 };
 
-/* Encode REGNUM value in the trad-frame.  */
-void trad_frame_set_value (trad_frame_saved_reg this_saved_regs[],
-                          int regnum, LONGEST val);
-
-/* Encode REGNUM is in REALREG in the trad-frame.  */
-void trad_frame_set_realreg (trad_frame_saved_reg this_saved_regs[],
-                            int regnum, int realreg);
-
-/* Encode REGNUM is at address ADDR in the trad-frame.  */
-void trad_frame_set_addr (trad_frame_saved_reg this_trad_cache[],
-                         int regnum, CORE_ADDR addr);
-
-/* Mark REGNUM as unknown.  */
-void trad_frame_set_unknown (trad_frame_saved_reg this_saved_regs[],
-                            int regnum);
-
-/* Encode REGNUM value in the trad-frame as a sequence of bytes.  This is
-   useful when the value is larger than what primitive types can hold.  */
-void trad_frame_set_value_bytes (trad_frame_saved_reg this_saved_regs[],
-                                int regnum, const gdb_byte *bytes,
-                                size_t size);
-
-/* Convenience functions, return non-zero if the register has been
-   encoded as specified.  */
-int trad_frame_value_p (trad_frame_saved_reg this_saved_regs[],
-                       int regnum);
-int trad_frame_addr_p (trad_frame_saved_reg this_saved_regs[],
-                      int regnum);
-int trad_frame_realreg_p (trad_frame_saved_reg this_saved_regs[],
-                         int regnum);
-
-/* Return TRUE if REGNUM is stored as a sequence of bytes, and FALSE
-   otherwise.  */
-bool trad_frame_value_bytes_p (trad_frame_saved_reg this_saved_regs[],
-                             int regnum);
-
-/* Reset the saved regs cache, setting register values to -1.  */
+/* Reset the saved regs cache, setting register values to REALREG.  */
 void trad_frame_reset_saved_regs (struct gdbarch *gdbarch,
                                  trad_frame_saved_reg *regs);
 
This page took 0.035598 seconds and 4 git commands to generate.