diff options
author | Tom Tromey <tom@tromey.com> | 2017-10-12 18:20:09 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-10-16 16:10:21 -0600 |
commit | 87028b873938aa3cc756c99e33a328640dbc30bc (patch) | |
tree | dfcd9d27e1c072452798930bc3b6f1b658f75e2c /gdb/target.h | |
parent | b7b030adc405017f01e996a90f85e40730ef8397 (diff) | |
download | binutils-87028b873938aa3cc756c99e33a328640dbc30bc.zip binutils-87028b873938aa3cc756c99e33a328640dbc30bc.tar.gz binutils-87028b873938aa3cc756c99e33a328640dbc30bc.tar.bz2 |
Return unique_xmalloc_ptr from target_fileio_read_stralloc
Change target_fileio_read_stralloc to return unique_xmalloc_ptr and
fix up the callers. This removes a number of cleanups.
ChangeLog
2017-10-16 Tom Tromey <tom@tromey.com>
* linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
(linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
* target.c (target_fileio_read_stralloc): Update.
* sparc64-tdep.c (adi_is_addr_mapped): Update.
* target.h (target_fileio_read_stralloc): Return
unique_xmalloc_ptr.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/target.h b/gdb/target.h index 8cac818..3f455f3 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -2131,8 +2131,8 @@ extern LONGEST target_fileio_read_alloc (struct inferior *inf, or the transfer is unsupported, NULL is returned. Empty objects are returned as allocated but empty strings. A warning is issued if the result contains any embedded NUL bytes. */ -extern char *target_fileio_read_stralloc (struct inferior *inf, - const char *filename); +extern gdb::unique_xmalloc_ptr<char> target_fileio_read_stralloc + (struct inferior *inf, const char *filename); /* Tracepoint-related operations. */ |