GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
utils.h File Reference
#include "exceptions.h"
#include "gdbsupport/array-view.h"
#include "gdbsupport/scoped_restore.h"
#include <chrono>

Go to the source code of this file.

Classes

struct  set_batch_flag_and_restore_page_info
 

Macros

#define gdb_stdout   (*current_ui_gdb_stdout_ptr ())
 
#define gdb_stdin   (*current_ui_gdb_stdin_ptr ())
 
#define gdb_stderr   (*current_ui_gdb_stderr_ptr ())
 
#define gdb_stdlog   (*current_ui_gdb_stdlog_ptr ())
 

Enumerations

enum class  strncmp_iw_mode { NORMAL , MATCH_PARAMS }
 
enum  resource_limit_kind { LIMIT_CUR , LIMIT_MAX }
 

Functions

int strncmp_iw_with_mode (const char *string1, const char *string2, size_t string2_len, strncmp_iw_mode mode, enum language language, completion_match_for_lcd *match_for_lcd=NULL, bool ignore_template_params=false)
 
int strncmp_iw (const char *string1, const char *string2, size_t string2_len)
 
int strcmp_iw (const char *string1, const char *string2)
 
int strcmp_iw_ordered (const char *, const char *)
 
void reset_prompt_for_continue_wait_time (void)
 
std::chrono::steady_clock::duration get_prompt_for_continue_wait_time ()
 
int parse_pid_to_attach (const char *args)
 
int parse_escape (struct gdbarch *, const char **)
 
void init_page_info (void)
 
int gdb_filename_fnmatch (const char *pattern, const char *string, int flags)
 
void substitute_path_component (char **stringp, const char *from, const char *to)
 
std::string ldirname (const char *filename)
 
int count_path_elements (const char *path)
 
const char * strip_leading_path_elements (const char *path, int n)
 
int query (const char *,...) ATTRIBUTE_PRINTF(1
 
int int nquery (const char *,...) ATTRIBUTE_PRINTF(1
 
int int int yquery (const char *,...) ATTRIBUTE_PRINTF(1
 
int int int void begin_line (void)
 
void wrap_here (int)
 
void reinitialize_more_filter (void)
 
int get_chars_per_line ()
 
struct ui_file ** current_ui_gdb_stdout_ptr (void)
 
struct ui_file ** current_ui_gdb_stdin_ptr (void)
 
struct ui_file ** current_ui_gdb_stderr_ptr (void)
 
struct ui_file ** current_ui_gdb_stdlog_ptr (void)
 
void gdb_flush (struct ui_file *stream)
 
void set_screen_width_and_height (int width, int height)
 
void gdb_puts (const char *, struct ui_file *)
 
void gdb_putc (int c, struct ui_file *)
 
void gdb_putc (int c)
 
void gdb_puts (const char *)
 
void puts_tabular (char *string, int width, int right)
 
void gdb_vprintf (const char *, va_list) ATTRIBUTE_PRINTF(1
 
void void gdb_vprintf (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF(2
 
void void void gdb_printf (struct ui_file *, const char *,...) ATTRIBUTE_PRINTF(2
 
void void void void gdb_printf (const char *,...) ATTRIBUTE_PRINTF(1
 
void void void void void printf_unfiltered (const char *,...) ATTRIBUTE_PRINTF(1
 
void void void void void void print_spaces (int, struct ui_file *)
 
const char * n_spaces (int)
 
int filtered_printing_initialized (void)
 
void fprintf_styled (struct ui_file *stream, const ui_file_style &style, const char *fmt,...) ATTRIBUTE_PRINTF(3
 
void void fputs_styled (const char *linebuffer, const ui_file_style &style, struct ui_file *stream)
 
void fputs_highlighted (const char *str, const compiled_regex &highlight, struct ui_file *stream)
 
const char * paddress (struct gdbarch *gdbarch, CORE_ADDR addr)
 
const char * print_core_address (struct gdbarch *gdbarch, CORE_ADDR address)
 
CORE_ADDR string_to_core_addr (const char *my_string)
 
void fprintf_symbol (struct ui_file *, const char *, enum language, int)
 
void perror_warning_with_name (const char *string)
 
void print_sys_errmsg (const char *, int)
 
void error_stream (const string_file &) ATTRIBUTE_NORETURN
 
void demangler_vwarning (const char *file, int line, const char *, va_list ap) ATTRIBUTE_PRINTF(3
 
void void demangler_warning (const char *file, int line, const char *,...) ATTRIBUTE_PRINTF(3
 
void void int myread (int, char *, int)
 
ULONGEST uinteger_pow (ULONGEST v1, LONGEST v2)
 
int can_dump_core (enum resource_limit_kind limit_kind)
 
void warn_cant_dump_core (const char *reason)
 
void dump_core (void)
 
void copy_bitwise (gdb_byte *dest, ULONGEST dest_offset, const gdb_byte *source, ULONGEST source_offset, ULONGEST nbits, int bits_big_endian)
 
static unsigned int fast_hash (const void *ptr, size_t len, unsigned int start_value=0)
 

Variables

bool sevenbit_strings
 
bool pagination_enabled
 
bool debug_timestamp
 
struct ui_filegdb_stdtarg
 
struct ui_filegdb_stdtargerr
 
struct ui_filegdb_stdtargin
 
void(* deprecated_error_begin_hook )(void)
 
const char * warning_pre_print
 

Macro Definition Documentation

◆ gdb_stderr

#define gdb_stderr   (*current_ui_gdb_stderr_ptr ())

Definition at line 193 of file utils.h.

◆ gdb_stdin

#define gdb_stdin   (*current_ui_gdb_stdin_ptr ())

Definition at line 190 of file utils.h.

◆ gdb_stdlog

#define gdb_stdlog   (*current_ui_gdb_stdlog_ptr ())

Definition at line 196 of file utils.h.

◆ gdb_stdout

#define gdb_stdout   (*current_ui_gdb_stdout_ptr ())

Definition at line 188 of file utils.h.

Enumeration Type Documentation

◆ resource_limit_kind

Enumerator
LIMIT_CUR 
LIMIT_MAX 

Definition at line 321 of file utils.h.

◆ strncmp_iw_mode

enum class strncmp_iw_mode
strong
Enumerator
NORMAL 
MATCH_PARAMS 

Definition at line 42 of file utils.h.

Function Documentation

◆ begin_line()

int int int void begin_line ( void  )

Definition at line 1568 of file utils.c.

References chars_printed, and gdb_puts().

Referenced by ATTRIBUTE_PRINTF(), info_classes_command(), and info_selectors_command().

◆ can_dump_core()

int can_dump_core ( enum resource_limit_kind  limit_kind)

Definition at line 211 of file utils.c.

References LIMIT_CUR, and LIMIT_MAX.

Referenced by can_dump_core_warn().

◆ copy_bitwise()

void copy_bitwise ( gdb_byte *  dest,
ULONGEST  dest_offset,
const gdb_byte *  source,
ULONGEST  source_offset,
ULONGEST  nbits,
int  bits_big_endian 
)

◆ count_path_elements()

int count_path_elements ( const char *  path)

Definition at line 3464 of file utils.c.

Referenced by compare_glob_filenames_for_search().

◆ current_ui_gdb_stderr_ptr()

struct ui_file ** current_ui_gdb_stderr_ptr ( void  )

Definition at line 111 of file top.c.

References current_ui, and ui::m_gdb_stderr.

◆ current_ui_gdb_stdin_ptr()

struct ui_file ** current_ui_gdb_stdin_ptr ( void  )

Definition at line 105 of file top.c.

References current_ui, and ui::m_gdb_stdin.

◆ current_ui_gdb_stdlog_ptr()

struct ui_file ** current_ui_gdb_stdlog_ptr ( void  )

Definition at line 117 of file top.c.

References current_ui, and ui::m_gdb_stdlog.

◆ current_ui_gdb_stdout_ptr()

struct ui_file ** current_ui_gdb_stdout_ptr ( void  )

Definition at line 99 of file top.c.

References current_ui, and ui::m_gdb_stdout.

◆ demangler_vwarning()

void demangler_vwarning ( const char *  file,
int  line,
const char *  ,
va_list  ap 
)

◆ demangler_warning()

void void demangler_warning ( const char *  file,
int  line,
const char *  ,
  ... 
)

◆ dump_core()

void dump_core ( void  )

Definition at line 189 of file utils.c.

Referenced by ATTRIBUTE_PRINTF().

◆ error_stream()

void error_stream ( const string_file stream)

Definition at line 168 of file utils.c.

References string_file::c_str().

Referenced by insert_breakpoint_locations(), and update_inserted_breakpoint_locations().

◆ fast_hash()

static unsigned int fast_hash ( const void *  ptr,
size_t  len,
unsigned int  start_value = 0 
)
inlinestatic

◆ filtered_printing_initialized()

int filtered_printing_initialized ( void  )

Definition at line 1240 of file utils.c.

References filter_initialized.

Referenced by ATTRIBUTE_PRINTF().

◆ fprintf_styled()

void fprintf_styled ( struct ui_file stream,
const ui_file_style style,
const char *  fmt,
  ... 
)

◆ fprintf_symbol()

void fprintf_symbol ( struct ui_file stream,
const char *  name,
enum  language,
int  arg_mode 
)

◆ fputs_highlighted()

void fputs_highlighted ( const char *  str,
const compiled_regex &  highlight,
struct ui_file stream 
)

◆ fputs_styled()

void void fputs_styled ( const char *  linebuffer,
const ui_file_style style,
struct ui_file stream 
)

◆ gdb_filename_fnmatch()

int gdb_filename_fnmatch ( const char *  pattern,
const char *  string,
int  flags 
)

◆ gdb_flush()

void gdb_flush ( struct ui_file stream)

◆ gdb_printf() [1/2]

void void void void gdb_printf ( const char *  ,
  ... 
)

◆ gdb_printf() [2/2]

void void void gdb_printf ( struct ui_file ,
const char *  ,
  ... 
)

◆ gdb_putc() [1/2]

void gdb_putc ( int  c)

◆ gdb_putc() [2/2]

void gdb_putc ( int  c,
struct ui_file stream 
)

Definition at line 1847 of file utils.c.

References ui_file::putc().

◆ gdb_puts() [1/2]

void gdb_puts ( const char *  string)

Definition at line 1918 of file utils.c.

References gdb_stdout.

◆ gdb_puts() [2/2]

void gdb_puts ( const char *  linebuffer,
struct ui_file stream 
)

Definition at line 1788 of file utils.c.

References ui_file::puts().

Referenced by __attribute__(), abort_with_message(), ada_print_floating(), ada_printchar(), ada_val_print_ref(), ada_value_print_num(), ada_value_print_ptr(), c_add_code_footer::add_code_footer(), c_add_code_header::add_code_header(), cplus_add_code_header::add_code_header(), c_add_input::add_input(), cplus_add_input::add_input(), debug_target::always_non_stop_p(), arm_print_float_info(), debug_target::async(), debug_target::async_wait_fd(), debug_target::attach_no_wait(), ATTRIBUTE_PRINTF(), debug_target::augmented_libraries_svr4_read(), debug_target::auxv_parse(), ax_print(), begin_line(), debug_target::btrace_conf(), c_print_type_1(), c_type_print_base_1(), c_type_print_base_struct_union(), c_type_print_template_args(), c_value_print_int(), debug_target::call_history(), debug_target::call_history_from(), debug_target::call_history_range(), debug_target::can_accel_watchpoint_condition(), debug_target::can_async_p(), debug_target::can_do_single_step(), debug_target::can_download_tracepoint(), debug_target::can_execute_reverse(), debug_target::can_run_breakpoint_commands(), debug_target::can_use_agent(), debug_target::can_use_hw_breakpoint(), captured_mi_execute_command(), chain_candidate(), check_thread_db(), debug_target::commit_resumed(), compile_cplus_debug_output_1(), complaint_internal(), fortran_array_printer_impl::continue_walking(), debug_target::core_of_thread(), cp_print_class_member(), cp_print_value(), cp_print_value_fields(), cp_type_print_derivation_info(), cp_type_print_method_args(), default_print_one_register_info(), debug_target::delete_record(), debug_target::detach(), debug_target::disable_btrace(), debug_target::disable_tracepoint(), remote_target::disconnect(), debug_target::disconnect(), display_descriptor(), display_mi_prompt(), display_page_table(), display_ptable_entry(), display_selector(), display_selectors(), do_examine(), mi_ui_out::do_field_fmt(), do_one_display(), do_serial_close(), do_show(), cli_ui_out::do_text(), debug_target::done_generating_core(), debug_target::download_trace_state_variable(), debug_target::download_tracepoint(), dump_die_shallow(), expr::dump_for_expression(), expr::dump_for_expression(), expr::dump_for_expression(), dump_mem(), dump_msymbols(), dump_psymtab(), dump_symtab_1(), debug_target::dumpcore(), m2_language::emitchar(), pascal_language::emitchar(), rust_language::emitchar(), debug_target::enable_btrace(), debug_target::enable_tracepoint(), environment_info(), debug_target::execution_direction(), partial_symtab::expand_dependencies(), debug_target::extra_thread_info(), f_language::f_type_print_base(), f_language::f_type_print_varspec_suffix(), debug_target::fetch_memtags(), debug_target::fetch_registers(), exec_target::files_info(), debug_target::files_info(), debug_target::filesystem_is_local(), debug_target::find_memory_regions(), print_offset_data::finish(), fortran_array_printer_impl::finish_dimension(), debug_target::flash_done(), debug_target::flash_erase(), mi_console_file::flush(), debug_target::follow_exec(), debug_target::follow_fork(), gdb_printing_disassembler::fprintf_styled_func(), fprintf_symbol(), fput_alias_definition_styled(), fput_command_names_styled(), fputs_highlighted(), fputs_styled(), fputsn_filtered(), generate_register_struct(), generic_emit_char(), generic_printstr(), generic_val_print_array(), generic_val_print_enum_1(), generic_val_print_ref(), generic_value_print(), generic_value_print_bool(), generic_value_print_char(), debug_target::get_ada_task_ptid(), debug_target::get_bookmark(), debug_target::get_memory_xfer_limit(), debug_target::get_min_fast_tracepoint_insn_len(), debug_target::get_raw_trace_data(), debug_target::get_section_table(), debug_target::get_tailcall_unwinder(), debug_target::get_thread_control_capabilities(), debug_target::get_thread_local_address(), debug_target::get_tib_address(), debug_target::get_trace_state_variable_value(), debug_target::get_trace_status(), debug_target::get_tracepoint_status(), debug_target::get_unwinder(), gnuv3_print_method_ptr(), go32_pde(), go32_pte(), go32_pte_for_address(), go32_sldt(), debug_target::goto_bookmark(), debug_target::goto_record(), debug_target::goto_record_begin(), debug_target::goto_record_end(), debug_target::has_pending_events(), debug_target::have_steppable_watchpoint(), help_cmd(), help_list(), i387_print_float_info(), info_address_command(), info_checkpoints_command(), info_display_command(), info_frame_command_core(), debug_target::info_record(), debug_target::insert_breakpoint(), debug_target::insert_exec_catchpoint(), debug_target::insert_fork_catchpoint(), debug_target::insert_hw_breakpoint(), debug_target::insert_mask_watchpoint(), debug_target::insert_vfork_catchpoint(), debug_target::insert_watchpoint(), debug_target::insn_history(), debug_target::insn_history_from(), debug_target::insn_history_range(), debug_target::interrupt(), debug_target::is_async_p(), jit_bfd_try_read_symtab(), jump_command(), debug_target::kill(), linux_info_proc(), list_overlays_command(), debug_target::load(), debug_target::log_command(), m2_array(), m2_long_set(), m2_procedure(), m2_record_fields(), m2_type_name(), m2_typedef(), m2_unbounded_array(), macro_expand_command(), macro_expand_once_command(), macro_inform_no_debuginfo(), maint_print_all_sections(), maint_print_xml_tdesc_cmd(), maintenance_check_psymtabs(), maintenance_info_psymtabs(), maintenance_show_test_options_completion_result(), debug_target::make_corefile_notes(), debug_target::masked_watch_num_registers(), print_offset_data::maybe_print_hole(), debug_target::memory_map(), mi_cmd_gdb_exit(), mi_load_progress(), mi_on_normal_stop_1(), mi_on_resume_1(), mi_print_exception(), mips_print_float_info(), mips_print_register(), mips_show_dr(), debug_target::mourn_inferior(), remote_target::open_1(), pascal_object_print_value(), pascal_object_print_value_fields(), debug_target::pass_ctrlc(), debug_target::pass_signals(), path_info(), debug_target::pid_to_exec_file(), debug_target::pid_to_str(), cplus_pop_user_expression::pop_user_expression(), debug_target::post_attach(), ppscm_print_children(), ppscm_print_string_repr(), debug_target::prepare_to_generate_core(), debug_target::prepare_to_store(), print_address_symbolic(), print_bit_vector(), print_callback(), print_children(), print_command_trace(), print_cplus_stuff(), print_decimal_chars(), print_doc_line(), print_doc_of_command(), rust_language::print_enum(), print_exception(), print_field_values(), print_floating(), print_fpu_flags(), print_fpu_flags(), print_frame(), print_frame_arg(), pascal_language::print_func_args(), print_func_type(), print_function_pointer_address(), print_gdb_help(), print_go_string(), print_help_for_command(), print_hex_chars(), print_i387_control_word(), print_i387_ext(), print_i387_status_word(), print_longest(), print_macro_definition(), print_mem(), print_name_maybe_canonical(), print_octal_chars(), pascal_language::print_one_char(), print_one_macro(), cli_packet_command_callbacks::print_packet(), print_partial_symbols(), print_ref_address(), print_spaces(), print_string_repr(), print_symbol(), print_symbol_info(), f_language::print_type(), go_language::print_type(), pascal_language::print_type(), print_type_scalar(), print_unpacked_pointer(), print_unpacked_pointer(), print_unpacked_pointer(), print_variable_at_address(), f_language::printchar(), m2_language::printchar(), pascal_language::printchar(), rust_language::printchar(), printf_floating(), language_defn::printstr(), f_language::printstr(), m2_language::printstr(), pascal_language::printstr(), printstr(), fortran_array_printer_impl::process_dimension(), fortran_array_printer_impl::process_element(), debug_target::program_signals(), c_push_user_expression::push_user_expression(), cplus_push_user_expression::push_user_expression(), puts_tabular(), py_print_single_arg(), debug_target::ranged_break_num_registers(), debug_target::rcmd(), debug_target::read_btrace(), debug_target::read_description(), cli_packet_command_callbacks::received(), debug_target::record_is_replaying(), debug_target::record_method(), debug_target::record_stop_replaying(), debug_target::record_will_replay(), recursive_dump_type(), debug_target::region_ok_for_hw_watchpoint(), remote_target::remote_detach_1(), debug_target::remove_breakpoint(), debug_target::remove_exec_catchpoint(), debug_target::remove_fork_catchpoint(), debug_target::remove_hw_breakpoint(), debug_target::remove_mask_watchpoint(), debug_target::remove_vfork_catchpoint(), debug_target::remove_watchpoint(), restore_one_section(), debug_target::resume(), riscv_print_one_register_info(), rust_internal_print_type(), rust_print_struct_def(), s12z_print_ccw_info(), debug_target::save_record(), debug_target::save_trace_data(), debug_target::search_memory(), cli_packet_command_callbacks::sending(), ser_base_read_error_fd(), serial_log_command(), serial_logchar(), debug_target::set_circular_trace_buffer(), debug_target::set_disconnected_tracing(), debug_target::set_permissions(), debug_target::set_syscall_catchpoint(), debug_target::set_trace_buffer_size(), debug_target::set_trace_notes(), show_directories_1(), show_disable_randomization(), show_disassembler_options_sfunc(), show_memory_packet_size(), show_pp_source_pos(), show_user_1(), tui_layout_window::specification(), tui_layout_split::specification(), fortran_array_printer_impl::start_dimension(), debug_target::static_tracepoint_marker_at(), debug_target::static_tracepoint_markers_by_strid(), debug_target::stop(), debug_target::stop_recording(), debug_target::stopped_by_hw_breakpoint(), debug_target::stopped_by_sw_breakpoint(), debug_target::stopped_by_watchpoint(), debug_target::stopped_data_address(), debug_target::store_memtags(), debug_target::store_registers(), debug_target::supports_delete_record(), debug_target::supports_disable_randomization(), debug_target::supports_dumpcore(), debug_target::supports_enable_disable_tracepoint(), debug_target::supports_evaluation_of_breakpoint_conditions(), debug_target::supports_memory_tagging(), debug_target::supports_multi_process(), debug_target::supports_non_stop(), debug_target::supports_stopped_by_hw_breakpoint(), debug_target::supports_stopped_by_sw_breakpoint(), debug_target::supports_string_tracing(), debug_target::supports_terminal_ours(), target_debug_print_const_gdb_byte_vector_r(), target_debug_print_signals(), target_debug_print_struct_target_waitstatus_p(), target_debug_print_target_wait_flags(), target_xfer_partial(), debug_target::teardown_btrace(), debug_target::terminal_inferior(), debug_target::terminal_info(), debug_target::terminal_init(), debug_target::terminal_ours(), debug_target::terminal_ours_for_output(), debug_target::terminal_save_inferior(), debug_target::thread_address_space(), debug_target::thread_alive(), debug_target::thread_architecture(), debug_target::thread_events(), debug_target::thread_handle_to_thread_info(), debug_target::thread_info_to_thread_handle(), debug_target::thread_name(), debug_target::trace_find(), debug_target::trace_init(), debug_target::trace_set_readonly_regions(), debug_target::trace_start(), debug_target::trace_stop(), debug_target::traceframe_info(), pascal_language::type_print_base(), pascal_language::type_print_derivation_info(), pascal_language::type_print_method_args(), debug_target::update_thread_list(), debug_target::upload_trace_state_variables(), debug_target::upload_tracepoints(), debug_target::use_agent(), val_print_check_max_depth(), rust_language::val_print_struct(), val_print_type_code_flags(), f_language::value_print_inner(), m2_language::value_print_inner(), pascal_language::value_print_inner(), rust_language::value_print_inner(), debug_target::verify_memory(), vwarning(), debug_target::wait(), debug_target::watchpoint_addr_within_range(), and debug_target::xfer_partial().

◆ gdb_vprintf() [1/2]

void gdb_vprintf ( const char *  ,
va_list   
)

◆ gdb_vprintf() [2/2]

void void gdb_vprintf ( struct ui_file ,
const char *  ,
va_list   
)

◆ get_chars_per_line()

int get_chars_per_line ( )

Definition at line 1485 of file utils.c.

References chars_per_line.

Referenced by cli_ui_out::clear_current_line(), and cli_ui_out::do_progress_notify().

◆ get_prompt_for_continue_wait_time()

std::chrono::steady_clock::duration get_prompt_for_continue_wait_time ( )

Definition at line 1442 of file utils.c.

References prompt_for_continue_wait_time.

Referenced by scoped_command_stats::~scoped_command_stats().

◆ init_page_info()

void init_page_info ( void  )

◆ ldirname()

std::string ldirname ( const char *  filename)

◆ myread()

void void int myread ( int  desc,
char *  addr,
int  len 
)

Definition at line 739 of file utils.c.

References read().

Referenced by source_cache::get_plain_source_lines().

◆ n_spaces()

const char * n_spaces ( int  n)

◆ nquery()

int int nquery ( const char *  ,
  ... 
)

◆ paddress()

const char * paddress ( struct gdbarch gdbarch,
CORE_ADDR  addr 
)

Definition at line 3114 of file utils.c.

References gdbarch_addr_bit().

Referenced by aarch64_displaced_step_copy_insn(), aarch64_displaced_step_fixup(), aarch64_dump_tdep(), aarch64_process_record(), aarch64_push_dummy_call(), ada_value_print_num(), collection_list::add_memrange(), add_symbol_file_command(), add_vsyscall_page(), adi_print_versions(), adi_read_versions(), adi_write_versions(), alpha_heuristic_proc_start(), amd64_displaced_step_copy_insn(), amd64_displaced_step_fixup(), amd64_relocate_instruction(), amd64_windows_find_unwind_info(), amd64_windows_frame_decode_insns(), amd64_windows_frame_prev_register(), annotate_frame_begin(), annotate_source(), arc_analyze_prologue(), arc_insn_dump(), arc_linux_is_sigtramp(), arc_linux_software_single_step(), arc_print_frame_cache(), arc_skip_prologue(), arc_write_pc(), arm_analyze_prologue(), arm_displaced_init_closure(), arm_process_record(), arm_push_dummy_call(), arm_record_unsupported_insn(), ax_print(), bookmark_1(), BP_MANIPULATION_ENDIAN(), bpf_push_dummy_call(), bpf_skip_prologue(), bpstat_locno(), call_site_find_chain_1(), call_site_for_pc(), check_fast_tracepoint_sals(), collection_list::collect_symbol(), compare_sections_command(), compile_object_load(), copy_sections(), csky_push_dummy_call(), darwin_debug_regions(), dcache_info_1(), dcache_print_line(), describe_other_breakpoints(), displaced_step_prepare_throw(), display_one_tib(), do_assign(), do_examine(), do_examine(), do_target_wait_1(), dump_msymbols(), dump_psymtab(), dump_symtab_1(), dwarf2_frame_cache(), dwarf2_restore_rule(), dwarf_expr_reg_to_entry_parameter(), dwarf_finish_line(), dwarf_record_line_1(), edit_command(), elf_gnu_ifunc_record_cache(), execute_cfa_program(), filter_overlapping_sections(), fbsd_nat_target::find_memory_regions(), nbsd_nat_target::find_memory_regions(), psymbol_functions::find_pc_sect_compunit_symtab(), dwarf2_base_index_functions::find_pc_sect_compunit_symtab(), displaced_step_buffers::finish(), buildsym_compunit::finish_block_internal(), finish_step_over(), fixup_riprel(), fprint_auxv_entry(), frame_unwind_register_value(), func_addr_to_tail_call_list(), func_verify_no_selftailcall(), gcore_copy_callback(), gcore_create_callback(), gcore_create_memtag_section_callback(), gdbsim_xfer_memory(), gnu_xfer_auxv(), gnu_xfer_memory(), gnuv3_get_typename_from_type_info(), handle_inferior_event(), handle_one(), handle_signal_stop(), heuristic_proc_start(), hppa_frame_cache(), hppa_skip_trampoline_code(), i386_displaced_step_copy_insn(), i386_displaced_step_fixup(), i386_mpx_get_bt_entry(), i386_process_record(), i386_record_lea_modrm(), i386_relocate_instruction(), ia64_dummy_id(), ia64_frame_this_id(), ia64_memory_insert_breakpoint(), ia64_memory_remove_breakpoint(), ia64_sigtramp_frame_this_id(), info_address_command(), info_cb(), info_checkpoints_command(), info_exceptions_command(), info_frame_command_core(), core_target::info_proc_mappings(), info_program_command(), info_scope_command(), info_task(), insert_bp_location(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), call_site_target::iterate_over_addresses(), jit_bfd_try_read_symtab(), jit_breakpoint_re_set_internal(), jit_event_handler(), jit_object_close_impl(), jit_read_descriptor(), jit_register_code(), jump_command(), keep_going_stepped_thread(), linux_core_info_proc_mappings(), linux_info_proc(), list_command(), list_overlays_command(), lm_addr_check(), lm_info_read(), load_progress(), loclist_describe_location(), m32c_m16c_address_to_pointer(), macho_add_oso_symfile(), maintenance_check_psymtabs(), maintenance_info_psymtabs(), tui_locator_window::make_status_line(), mbpy_str(), memory_error_message(), memory_tag_check_command(), merge_uploaded_tracepoints(), microblaze_analyze_prologue(), mips_eabi_push_dummy_call(), mips_n32n64_push_dummy_call(), mips_o32_push_dummy_call(), mips_o64_push_dummy_call(), mips_show_dr(), moxie_process_readu(), moxie_process_record(), nios2_analyze_prologue(), or1k_frame_cache(), or1k_unwind_pc(), or1k_unwind_sp(), ppc_displaced_step_fixup(), ppc_process_prefix_instruction(), ppc_process_record(), ppc_process_record_op19(), ppc_process_record_op31(), ppc_process_record_op4(), ppc_process_record_op59(), ppc_process_record_op60(), ppc_process_record_op61(), ppc_process_record_op63(), displaced_step_buffers::prepare(), print_address(), print_address_demangle(), print_disassembly(), print_function_pointer_address(), print_go_string(), ranged_breakpoint::print_mention(), print_one_vtable(), print_partial_symbols(), print_ref_address(), print_section_info(), print_symbol(), print_unpacked_pointer(), print_unpacked_pointer(), print_unpacked_pointer(), print_variable_at_address(), proceed(), process_event_stop_test(), pyuw_sniffer(), read_call_site_scope(), read_memory_backward(), record_full_arch_list_add_mem(), record_full_exec_insn(), record_full_restore(), record_full_wait_1(), lnp_state_machine::record_line(), record_read_memory(), displaced_step_buffers::restore_in_ptid(), restore_one_section(), resume_1(), resume_stopped_resumed_lwps(), riscv_breakpoint_kind_from_pc(), riscv_push_dummy_code(), s12z_frame_cache(), s390_displaced_step_copy_insn(), s390_displaced_step_fixup(), s390_process_record(), save_bookmark_command(), record_full_base_target::save_record(), say_where(), setup_sections_data::setup_one_section(), should_be_inserted(), show_addr_not_tagged(), skip_function_command(), status_callback(), store_regs(), collection_list::stringify(), stub_gnu_ifunc_resolve_addr(), svr4_create_probe_breakpoints(), svr4_create_solib_event_breakpoints(), svr4_exec_displacement(), svr4_read_so_list(), tailcall_dump(), thumb_analyze_prologue(), thumb_record_misc(), value_fetch_lazy_register(), f_language::value_print_inner(), pascal_language::value_print_inner(), rust_language::value_print_inner(), windows_xfer_shared_library(), and record_full_target::xfer_partial().

◆ parse_escape()

int parse_escape ( struct gdbarch gdbarch,
const char **  string_ptr 
)

Definition at line 1063 of file utils.c.

References host_char_to_target(), and target_charset().

Referenced by do_set_command(), echo_command(), and yylex().

◆ parse_pid_to_attach()

int parse_pid_to_attach ( const char *  args)

◆ perror_warning_with_name()

void perror_warning_with_name ( const char *  string)

Definition at line 652 of file utils.c.

References perror_string().

Referenced by captured_main_1(), detach_one_lwp(), and source_script_with_search().

◆ print_core_address()

const char * print_core_address ( struct gdbarch gdbarch,
CORE_ADDR  address 
)

◆ print_spaces()

void void void void void void print_spaces ( int  n,
struct ui_file stream 
)

◆ print_sys_errmsg()

void print_sys_errmsg ( const char *  string,
int  errcode 
)

◆ printf_unfiltered()

void void void void void printf_unfiltered ( const char *  ,
  ... 
)

◆ puts_tabular()

void puts_tabular ( char *  string,
int  width,
int  right 
)

Definition at line 1525 of file utils.c.

References chars_per_line, chars_printed, gdb_puts(), and UINT_MAX.

Referenced by info_classes_command(), and info_selectors_command().

◆ query()

int query ( const char *  ,
  ... 
)

◆ reinitialize_more_filter()

void reinitialize_more_filter ( void  )

◆ reset_prompt_for_continue_wait_time()

void reset_prompt_for_continue_wait_time ( void  )

Definition at line 1432 of file utils.c.

References prompt_for_continue_wait_time.

Referenced by scoped_command_stats::scoped_command_stats().

◆ set_screen_width_and_height()

void set_screen_width_and_height ( int  width,
int  height 
)

Definition at line 1328 of file utils.c.

References chars_per_line, lines_per_page, set_screen_size(), and set_width().

Referenced by tui_update_gdb_sizes().

◆ strcmp_iw()

int strcmp_iw ( const char *  string1,
const char *  string2 
)

◆ strcmp_iw_ordered()

int strcmp_iw_ordered ( const char *  string1,
const char *  string2 
)

Definition at line 3025 of file utils.c.

References c1, c2, case_sensitive_off, and case_sensitive_on.

Referenced by compare_names_with_case(), and lookup_partial_symbol().

◆ string_to_core_addr()

CORE_ADDR string_to_core_addr ( const char *  my_string)

Definition at line 3153 of file utils.c.

Referenced by mi_cmd_var_create().

◆ strip_leading_path_elements()

const char * strip_leading_path_elements ( const char *  path,
int  n 
)

Definition at line 3500 of file utils.c.

Referenced by compare_glob_filenames_for_search().

◆ strncmp_iw()

int strncmp_iw ( const char *  string1,
const char *  string2,
size_t  string2_len 
)

◆ strncmp_iw_with_mode()

int strncmp_iw_with_mode ( const char *  string1,
const char *  string2,
size_t  string2_len,
strncmp_iw_mode  mode,
enum language  language,
completion_match_for_lcd match_for_lcd = NULL,
bool  ignore_template_params = false 
)

◆ substitute_path_component()

void substitute_path_component ( char **  stringp,
const char *  from,
const char *  to 
)

Definition at line 3302 of file utils.c.

References xrealloc().

Referenced by auto_load_expand_dir_vars(), and selftests::utils::test_substitute_path_component().

◆ uinteger_pow()

ULONGEST uinteger_pow ( ULONGEST  v1,
LONGEST  v2 
)

Definition at line 760 of file utils.c.

Referenced by scalar_binop().

◆ warn_cant_dump_core()

void warn_cant_dump_core ( const char *  reason)

Definition at line 239 of file utils.c.

References gdb_printf(), and gdb_stderr.

Referenced by can_dump_core_warn().

◆ wrap_here()

void wrap_here ( int  )

◆ yquery()

int int int yquery ( const char *  ,
  ... 
)

Variable Documentation

◆ debug_timestamp

bool debug_timestamp
extern

Definition at line 100 of file utils.c.

Referenced by timestamped_file::write().

◆ deprecated_error_begin_hook

void(* deprecated_error_begin_hook) (void) ( void  )
extern

Definition at line 83 of file utils.c.

Referenced by clear_interpreter_hooks(), and print_flush().

◆ gdb_stdtarg

struct ui_file* gdb_stdtarg
extern

◆ gdb_stdtargerr

struct ui_file* gdb_stdtargerr
extern

◆ gdb_stdtargin

struct ui_file* gdb_stdtargin
extern

Definition at line 78 of file main.c.

Referenced by captured_main_1(), and remote_fileio_func_read().

◆ pagination_enabled

bool pagination_enabled
extern

◆ sevenbit_strings

bool sevenbit_strings
extern

◆ warning_pre_print

const char* warning_pre_print
extern

Definition at line 118 of file utils.c.

Referenced by captured_main_1(), check_thread_db(), and vwarning().