GDBserver
|
Go to the source code of this file.
Macros | |
#define | HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT) |
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) |
static int | is_digit_in_base (unsigned char digit, int base) |
static int | digit_to_int (unsigned char c) |
ULONGEST | strtoulst (const char *num, const char **trailer, int base) |
char * | skip_spaces (char *chp) |
const char * | skip_spaces_const (const char *chp) |
const char * | skip_to_space_const (const char *chp) |
#define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT) |
Definition at line 160 of file common-utils.c.
Referenced by strtoulst().
|
static |
Definition at line 177 of file common-utils.c.
Referenced by strtoulst().
|
static |
Definition at line 166 of file common-utils.c.
Referenced by strtoulst().
char* savestring | ( | const char * | ptr, |
size_t | len | ||
) |
Definition at line 148 of file common-utils.c.
References xmalloc().
Referenced by add_tracepoint_action().
char* skip_spaces | ( | char * | chp | ) |
Definition at line 259 of file common-utils.c.
const char* skip_spaces_const | ( | const char * | chp | ) |
Definition at line 271 of file common-utils.c.
const char* skip_to_space_const | ( | const char * | chp | ) |
Definition at line 283 of file common-utils.c.
ULONGEST strtoulst | ( | const char * | num, |
const char ** | trailer, | ||
int | base | ||
) |
Definition at line 188 of file common-utils.c.
References digit_to_int(), errno, HIGH_BYTE_POSN, and is_digit_in_base().
PTR xcalloc | ( | size_t | number, |
size_t | size | ||
) |
Definition at line 71 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_lwp(), add_process(), arm_new_process(), arm_new_thread(), child_add_thread(), clone_agent_expr(), clone_one_breakpoint(), init_register_cache(), linux_add_process(), linux_xfer_osdata_processes(), lynx_add_process(), mips_linux_new_process(), mips_linux_new_thread(), set_breakpoint(), set_fast_tracepoint_jump(), set_raw_breakpoint_at(), try_thread_db_load_1(), and xzalloc().
void xfree | ( | void * | ptr | ) |
Definition at line 97 of file common-utils.c.
Referenced by agent_mem_read_string(), ATTRIBUTE_PRINTF(), btrace_data_append(), btrace_data_fini(), buffer_free(), buffer_xml_printf(), catcher_pop(), cmd_qtnotes(), command_from_pid(), commandline_from_pid(), discard_my_cleanups(), do_my_cleanups(), free_char_ptr_vec(), free_format_pieces(), gdb_event_xfree(), handle_monitor_command(), handle_notif_ack(), linux_common_core_of_thread(), linux_grandchild_function(), linux_ptrace_attach_fail_reason_string(), linux_qxfer_libraries_svr4(), linux_wait_1(), linux_xfer_osdata_fds(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_threads(), make_cleanup_close(), notif_event_xfree(), pull_pid_from_list(), queue_stop_reply_callback(), and remove_tracepoint().
PTR xmalloc | ( | size_t | size | ) |
Definition at line 34 of file common-utils.c.
References malloc_failure().
Referenced by 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(), btrace_data_append(), captured_main(), 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(), delim_string_to_char_ptr_vec_append(), enqueue_one_deferred_signal(), enqueue_pending_signal(), gdb_parse_agent_expr(), gdb_unparse_agent_expr(), handle_extended_wait(), 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_throw(), linux_resume_one_thread(), linux_xfer_osdata_processgroups(), loaded_dll(), look_up_one_symbol(), lynx_fetch_registers(), lynx_store_registers(), make_cleanup_close(), make_my_cleanup2(), mips_add_watchpoint(), 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 51 of file common-utils.c.
References malloc_failure().
Referenced by add_tracepoint_action(), ATTRIBUTE_PRINTF(), 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 134 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(), hex_string(), host_address_to_string(), linux_ns_filename(), linux_proc_attach_tgid_threads(), linux_proc_pid_get_state(), linux_proc_pid_to_exec_file(), linux_proc_task_list_dir_exists(), linux_qxfer_libraries_svr4(), linux_read_auxv(), notif_push(), octal2str(), phex(), phex_nz(), safe_strerror(), target_pid_to_str(), and thread_db_err_str().
char* xstrprintf | ( | const char * | format, |
... | |||
) |
Definition at line 107 of file common-utils.c.
References xstrvprintf().
Referenced by command_from_pid(), commandline_from_pid(), linux_ptrace_attach_fail_reason_string(), linux_xfer_osdata_fds(), linux_xfer_osdata_threads(), and parse_debug_format_options().
char* xstrvprintf | ( | const char * | format, |
va_list | ap | ||
) |
Definition at line 119 of file common-utils.c.
References _, internal_error(), and vasprintf().
Referenced by ATTRIBUTE_PRINTF(), and xstrprintf().
void* xzalloc | ( | size_t | size | ) |
Definition at line 91 of file common-utils.c.
References xcalloc().