]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ada-lang.c
Change target_read_string to use unique_xmalloc_ptr
authorTom Tromey <tom@tromey.com>
Tue, 27 Mar 2018 20:31:10 +0000 (14:31 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 30 Mar 2018 19:22:58 +0000 (13:22 -0600)
commite83e4e24021acb4b095b1e8a45a51c2ea088a1ed
tree4740a6532e556fbb49a7de4234c2913796366212
parent263db9a1f4105b76ddf00829d50430ea0a3bcba6
Change target_read_string to use unique_xmalloc_ptr

This changes the out parameter of target_read_string to be a
unique_xmalloc_ptr.  This avoids a cleanup and sets the stage for more
cleanup removals.

This patch also removes a seemingly needless alloca from
print_subexp_standard.

gdb/ChangeLog
2018-03-30  Tom Tromey  <tom@tromey.com>

* windows-nat.c (handle_output_debug_string, handle_exception):
Update.
* target.h (target_read_string): Update.
* target.c (target_read_string): Change "string" to
unique_xmalloc_ptr.
* solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
Update.
* solib-frv.c (frv_current_sos): Update.
* solib-dsbt.c (dsbt_current_sos): Update.
* solib-darwin.c (darwin_current_sos): Update.
* linux-thread-db.c (inferior_has_bug): Update.
* expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
Update.  Remove alloca.
* ada-lang.c (ada_main_name): Update.
gdb/ChangeLog
gdb/ada-lang.c
gdb/expprint.c
gdb/linux-thread-db.c
gdb/solib-darwin.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-svr4.c
gdb/target.c
gdb/target.h
gdb/windows-nat.c