GDBserver
|
#include "defs.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
PTR | xmalloc (size_t size) |
PTR | xrealloc (PTR ptr, size_t size) |
PTR | xcalloc (size_t number, size_t size) |
void * | xzalloc (size_t size) |
void | xfree (void *ptr) |
char * | xstrprintf (const char *format,...) |
char * | xstrvprintf (const char *format, va_list ap) |
int | xsnprintf (char *str, size_t size, const char *format,...) |
char * | savestring (const char *ptr, size_t len) |
char* savestring | ( | const char * | ptr, |
size_t | len | ||
) |
Definition at line 156 of file common-utils.c.
References memcpy(), and xmalloc().
Referenced by add_tracepoint_action().
PTR xcalloc | ( | size_t | number, |
size_t | size | ||
) |
Definition at line 79 of file common-utils.c.
References malloc_failure().
Referenced by aarch64_linux_new_process(), aarch64_linux_new_thread(), add_commands_to_breakpoint(), add_condition_to_breakpoint(), add_process(), arm_new_process(), arm_new_thread(), child_add_thread(), init_register_cache(), linux_add_process(), linux_xfer_osdata_processes(), lynx_add_process(), mips_linux_new_process(), mips_linux_new_thread(), set_breakpoint_at(), set_fast_tracepoint_jump(), set_raw_breakpoint_at(), try_thread_db_load_1(), x86_linux_new_process(), x86_linux_new_thread(), and xzalloc().
void xfree | ( | void * | ptr | ) |
Definition at line 105 of file common-utils.c.
Referenced by agent_mem_read_string(), buffer_free(), buffer_xml_printf(), cmd_qtnotes(), command_from_pid(), commandline_from_pid(), free_char_ptr_vec(), free_format_pieces(), gdb_event_xfree(), handle_notif_ack(), linux_common_core_of_thread(), linux_grandchild_function(), linux_qxfer_libraries_svr4(), linux_xfer_osdata_fds(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_threads(), notif_event_xfree(), pull_pid_from_list(), queue_stop_reply_callback(), and remove_tracepoint().
PTR xmalloc | ( | size_t | size | ) |
Definition at line 42 of file common-utils.c.
References malloc_failure().
Referenced by add_lwp(), add_thread(), add_to_pid_list(), add_tracepoint(), add_tracepoint_action(), add_while_stepping_state(), agent_mem_read_string(), append_callback_event(), arm_read_description(), cmd_qtdpsrc(), cmd_qtdv(), cmd_qtnotes(), cmd_qtro(), commandline_from_pid(), compile_bytecodes(), create_file_event(), create_file_handler(), create_trace_state_variable(), decode_M_packet(), decode_X_packet(), dirnames_to_char_ptr_vec_append(), enqueue_one_deferred_signal(), gdb_parse_agent_expr(), gdb_unparse_agent_expr(), handle_open(), handle_pread(), handle_target_event(), handle_v_run(), initialize_low_arch(), initialize_tracepoint(), linux_fork_to_function(), linux_qxfer_libraries_svr4(), linux_resume_one_lwp(), linux_resume_one_thread(), linux_xfer_osdata_processgroups(), loaded_dll(), look_up_one_symbol(), lynx_fetch_registers(), lynx_store_registers(), main(), mips_insert_point(), monitor_output(), new_register_cache(), parse_format_string(), putpkt_binary_1(), queue_stop_reply(), queue_stop_reply_callback(), relocate_instruction(), require_data(), savestring(), set_target_ops(), try_thread_db_load_from_dir(), write_inferior_memory(), and xml_escape_text().
PTR xrealloc | ( | PTR | ptr, |
size_t | size | ||
) |
Definition at line 59 of file common-utils.c.
References malloc_failure().
Referenced by add_tracepoint_action(), buffer_grow(), commandline_from_pid(), handle_query(), init_trace_buffer(), linux_common_core_of_thread(), linux_qxfer_libraries_svr4(), linux_xfer_osdata_processgroups(), and vec_o_reserve().
int xsnprintf | ( | char * | str, |
size_t | size, | ||
const char * | format, | ||
... | |||
) |
Definition at line 142 of file common-utils.c.
References gdb_assert, and vsnprintf().
Referenced by decimal2str(), do_attach(), gdb_connect_sync_socket(), get_phdr_phnum_from_proc_auxv(), linux_proc_pid_has_state(), linux_qxfer_libraries_svr4(), linux_read_auxv(), notif_push(), phex_nz(), target_pid_to_str(), and thread_db_err_str().
char* xstrprintf | ( | const char * | format, |
... | |||
) |
Definition at line 115 of file common-utils.c.
References xstrvprintf().
Referenced by command_from_pid(), commandline_from_pid(), linux_xfer_osdata_fds(), and linux_xfer_osdata_threads().
char* xstrvprintf | ( | const char * | format, |
va_list | ap | ||
) |
Definition at line 127 of file common-utils.c.
References _, internal_error(), and vasprintf().
Referenced by xstrprintf().
void* xzalloc | ( | size_t | size | ) |
Definition at line 99 of file common-utils.c.
References xcalloc().