528e15722b
This patch replaces some simple uses of xstrprintf with with string_printf, removing the need to do manual memory freeing. The change in ada-lang.c fixes an apparent memory leak. Regtested on the buildbot. gdb/ChangeLog: * common/filestuff.h (gdb_fopen_cloexec): New overload. (gdb_open_cloexec): Likewise. * nat/linux-osdata.c (command_from_pid): Use string_printf. (commandline_from_pid): Likewise. (linux_xfer_osdata_threads): Likewise. (linux_xfer_osdata_fds): Likewise. * ada-lang.c (is_package_name): Likewise. * auxv.c (procfs_xfer_auxv): Likewise. * breakpoint.c (print_one_breakpoint_location): Use uiout::field_fmt. (print_one_catch_solib): Use string_printf. * coff-pe-read.c (add_pe_exported_sym): Likewise. (add_pe_forwarded_sym): Likewise. * dwarf2read.c (create_type_unit_group): Likewise. (build_error_marker_type): Likewise. * infcall.c (get_function_name): Likewise. * valprint.c (print_converted_chars_to_obstack): Likewise. * xtensa-tdep.c (xtensa_register_type): Likewise. |
||
---|---|---|
.. | ||
aarch64-linux-hw-point.c | ||
aarch64-linux-hw-point.h | ||
aarch64-linux.c | ||
aarch64-linux.h | ||
aarch64-sve-linux-ptrace.c | ||
aarch64-sve-linux-ptrace.h | ||
aarch64-sve-linux-sigcontext.h | ||
amd64-linux-siginfo.c | ||
amd64-linux-siginfo.h | ||
fork-inferior.c | ||
fork-inferior.h | ||
gdb_ptrace.h | ||
gdb_thread_db.h | ||
glibc_thread_db.h | ||
linux-btrace.c | ||
linux-btrace.h | ||
linux-namespaces.c | ||
linux-namespaces.h | ||
linux-nat.h | ||
linux-osdata.c | ||
linux-osdata.h | ||
linux-personality.c | ||
linux-personality.h | ||
linux-procfs.c | ||
linux-procfs.h | ||
linux-ptrace.c | ||
linux-ptrace.h | ||
linux-waitpid.c | ||
linux-waitpid.h | ||
mips-linux-watch.c | ||
mips-linux-watch.h | ||
ppc-linux.c | ||
ppc-linux.h | ||
x86-cpuid.h | ||
x86-dregs.c | ||
x86-dregs.h | ||
x86-gcc-cpuid.h | ||
x86-linux-dregs.c | ||
x86-linux-dregs.h | ||
x86-linux.c | ||
x86-linux.h |