Introduce and use make_unique_xstrdup
[deliverable/binutils-gdb.git] / gdb / target.c
index 2234400211384b09cb6136ff2efee8679fac50fa..1c04095fd63c329a4d92331154280d2adf0b4e7b 100644 (file)
@@ -767,7 +767,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
                       objfile_name (objfile), ex.what ());
              break;
            default:
-             throw_exception (ex);
+             throw;
              break;
            }
        }
@@ -2097,6 +2097,14 @@ target_thread_handle_to_thread_info (const gdb_byte *thread_handle,
                                                     handle_len, inf);
 }
 
+/* See target.h.  */
+
+gdb::byte_vector
+target_thread_info_to_thread_handle (struct thread_info *tip)
+{
+  return current_top_target ()->thread_info_to_thread_handle (tip);
+}
+
 void
 target_resume (ptid_t ptid, int step, enum gdb_signal signal)
 {
@@ -2167,7 +2175,7 @@ target_follow_fork (int follow_child, int detach_fork)
 /* Target wrapper for follow exec hook.  */
 
 void
-target_follow_exec (struct inferior *inf, char *execd_pathname)
+target_follow_exec (struct inferior *inf, const char *execd_pathname)
 {
   current_top_target ()->follow_exec (inf, execd_pathname);
 }
@@ -3098,7 +3106,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename)
     return gdb::unique_xmalloc_ptr<char> (nullptr);
 
   if (transferred == 0)
-    return gdb::unique_xmalloc_ptr<char> (xstrdup (""));
+    return make_unique_xstrdup ("");
 
   bufstr[transferred] = 0;
 
This page took 0.02445 seconds and 4 git commands to generate.