GDB (xrefs)
Classes | Macros | Typedefs | Functions
poison.h File Reference
#include "traits.h"

Go to the source code of this file.

Classes

struct  IsMemsettable< T >
 

Macros

#define XNEW(T)   xnew<T>()
 
#define XCNEW(T)   xcnew<T>()
 
#define XDELETE(P)   xdelete (P)
 
#define XNEWVEC(T, N)   xnewvec<T> (N)
 
#define XCNEWVEC(T, N)   xcnewvec<T> (N)
 
#define XRESIZEVEC(T, P, N)   xresizevec<T> (P, N)
 
#define XDELETEVEC(P)   xdeletevec (P)
 
#define XNEWVAR(T, S)   xnewvar<T> (S)
 
#define XCNEWVAR(T, S)   xcnewvar<T> (S)
 
#define XRESIZEVAR(T, P, S)   xresizevar<T> (P, S)
 

Typedefs

template<typename T >
using IsMallocable = std::is_pod< T >
 
template<typename T >
using IsFreeable = gdb::Or< std::is_trivially_destructible< T >, std::is_void< T > >
 

Functions

template<typename T , typename = gdb::Requires<gdb::Not<IsMemsettable<T>>>>
void * memset (T *s, int c, size_t n)=delete
 
template<typename T , typename = gdb::Requires<gdb::Not<IsFreeable<T>>>>
void free (T *ptr)=delete
 
template<typename T >
static T * xnew ()
 
template<typename T >
static T * xcnew ()
 
template<typename T >
static void xdelete (T *p)
 
template<typename T >
static T * xnewvec (size_t n)
 
template<typename T >
static T * xcnewvec (size_t n)
 
template<typename T >
static T * xresizevec (T *p, size_t n)
 
template<typename T >
static void xdeletevec (T *p)
 
template<typename T >
static T * xnewvar (size_t s)
 
template<typename T >
static T * xcnewvar (size_t s)
 
template<typename T >
static T * xresizevar (T *p, size_t s)
 

Macro Definition Documentation

◆ XCNEW

#define XCNEW (   T)    xcnew<T>()

Definition at line 121 of file poison.h.

Referenced by aarch64_add_process(), aarch64_gdbarch_init(), ada_get_symbol_cache(), add_displaced_stepping_state(), add_fork(), add_program_space(), add_thread_db_info(), alloc_type_instance(), allocate_lval_closure(), allocate_value_lazy(), alpha_gdbarch_init(), append_ocl_sos(), arc_gdbarch_init(), arm_gdbarch_init(), arm_linux_add_process(), arm_linux_new_thread(), avr_gdbarch_init(), bcache_xmalloc(), bfin_gdbarch_init(), bsd_uthread_target(), btrace_set_call_history(), btrace_set_insn_history(), cache_new_ref1(), coff_symfile_init(), copy_event_location(), core_open(), cris_gdbarch_init(), darwin_current_sos(), dbx_symfile_init(), debug_reg_change_callback(), default_symfile_segments(), dsbt_current_sos(), dummy_frame_push(), dwarf2_add_type_defn(), elf_read_minimal_symbols(), elf_symfile_segments(), exceptions_state_mc_init(), frv_current_sos(), ft32_gdbarch_init(), gdb_bfd_iovec_fileio_open(), gdbpy_clone_xmethod_worker_data(), get_ada_inferior_data(), get_ada_pspace_data(), get_ada_tasks_inferior_data(), get_ada_tasks_pspace_data(), get_auto_load_pspace_data(), get_auxv_inferior_data(), get_darwin_info(), get_dsbt_info(), get_inflow_inferior_data(), get_interp_info(), get_jit_objfile_data(), get_jit_program_space_data(), get_linux_inferior_data(), get_main_info(), get_objfile_pspace_data(), get_sim_inferior_data(), get_solib_aix_inferior_data(), get_svr4_info(), get_tdesc_info(), get_uploaded_tp(), get_uploaded_tsv(), hppa_gdbarch_init(), i386_gdbarch_init(), ia64_gdbarch_init(), inf_child_target(), install_symfile_debug_logging(), jit_block_open_impl(), jit_frame_sniffer(), jit_object_open_impl(), jit_symtab_open_impl(), library_list_start_library(), lm32_gdbarch_init(), load_section_callback(), lwp_set_debug_registers_changed(), lzma_open(), m32c_gdbarch_init(), m32r_gdbarch_init(), m68hc11_gdbarch_init(), m68k_gdbarch_init(), make_pipe_state(), make_symbol_cache(), mep_gdbarch_init(), microblaze_gdbarch_init(), mips_gdbarch_init(), mn10300_gdbarch_init(), moxie_gdbarch_init(), msp430_gdbarch_init(), mt_gdbarch_init(), nds32_gdbarch_init(), net_windows_open(), new_address_location(), new_address_space(), new_block(), new_call_thread_fsm(), new_compile_instance(), new_finish_command_fsm(), new_linespec_location(), new_probe_location(), new_python_xmethod_worker(), new_remote_state(), new_serial(), new_step_command_fsm(), new_until_break_fsm(), new_until_next_fsm(), new_variant(), new_xmethod_worker(), nios2_gdbarch_init(), nto_new_inferior_data(), or1k_gdbarch_init(), psymbol_bcache_init(), push_parse_stack(), read_baseclasses(), read_member_functions(), read_struct_fields(), minimal_symbol_reader::record_full(), record_full_end_alloc(), record_full_mem_alloc(), record_full_reg_alloc(), record_latest_value(), register_solib_event_probe(), remote_btrace_maybe_reopen(), remote_enable_btrace(), remote_notif_state_allocate(), rl78_gdbarch_init(), rs6000_gdbarch_init(), rx_gdbarch_init(), s390_add_process(), s390_gdbarch_init(), s390_mark_per_info_changed(), save_infcall_suspend_state(), ser_console_wait_handle(), ser_windows_open(), set_active_ext_lang(), sh64_gdbarch_init(), sh_gdbarch_init(), solib_aix_current_sos(), solib_target_current_sos(), sparc32_gdbarch_init(), spu_current_sos(), spu_gdbarch_init(), stabsect_build_psymtabs(), start_ext_lang_type_printers(), svr4_default_sos(), svr4_keep_data_in_core(), svr4_read_so_list(), target_bfd_reopen(), tic6x_gdbarch_init(), update_registers_callback(), v850_gdbarch_init(), VEC(), windows_add_thread(), windows_make_so(), x86_add_process(), and xcnew().

◆ XCNEWVAR

#define XCNEWVAR (   T,
  S 
)    xcnewvar<T> (S)

Definition at line 205 of file poison.h.

Referenced by xcnewvar().

◆ XCNEWVEC

#define XCNEWVEC (   T,
 
)    xcnewvec<T> (N)

◆ XDELETE

#define XDELETE (   P)    xdelete (P)

Definition at line 133 of file poison.h.

Referenced by xdelete().

◆ XDELETEVEC

#define XDELETEVEC (   P)    xdeletevec (P)

Definition at line 181 of file poison.h.

Referenced by do_rmdir(), nto_sniff_abi_note_section(), and xdeletevec().

◆ XNEW

#define XNEW (   T)    xnew<T>()

Definition at line 109 of file poison.h.

Referenced by _initialize_reggroup(), aarch64_linux_new_thread(), abbrev_table_read_table(), add_dis_line_entry(), add_dump_command(), add_initial_lwp(), add_internal_problem_command(), add_substitute_path_rule(), add_symbol_to_list(), add_thread_object(), add_to_pid_list(), all_tracepoint_actions_and_cleanup(), allocate_info(), attach_command(), ATTRIBUTE_PRINTF(), bfd_open_from_target_memory(), build_command_line(), coff_locate_sections(), compile_object_load(), compute_vtable_size(), copy_command_lines(), copy_type_recursive(), CPYCHECKER_STEALS_REFERENCE_TO_ARG(), create_async_event_handler(), create_async_signal_handler(), create_file_handler(), create_internal_function(), create_internalvar(), create_procinfo(), create_typedef_hash(), ctf_trace_file_writer_new(), d_grab(), dcache_init(), dict_create_hashed_expandable(), dict_create_linear_expandable(), do_add_cmd(), dos_copy_tty_state(), dos_get_tty_state(), dwarf2_add_field(), dwarf2_add_member_fn(), enable_thread_stack_temporaries(), gdb_readline_wrapper(), gdb_xml_parse_attr_ulongest(), gdbarch_alloc(), gdbarch_data_register(), gdbarch_find_by_info(), gdbarch_register(), gdbarch_register_osabi(), gdbarch_register_osabi_sniffer(), gdbpy_post_event(), get_complaints(), get_type_stack(), hardwire_copy_tty_state(), hardwire_get_tty_state(), hwdebug_find_thread_points_by_tid(), init_cutu_and_read_dies(), init_tu_and_read_dwo_dies(), insert_symbol_error(), insert_type(), install_variable(), make_cleanup_close(), make_cleanup_restore_current_traceframe(), make_cleanup_ui_out_end(), make_continuation(), make_inf(), make_my_cleanup2(), make_proc(), maybe_add_address(), mips_linux_insert_watchpoint(), munmap_list_add(), new_macro_table(), notice_new_inferior(), pipe_open(), process_linenos(), process_next_line(), push_stack_item(), push_subfile(), queue_comp_unit(), rank_function(), record_btrace_start_replaying(), record_full_core_xfer_partial(), record_full_insert_breakpoint(), reggroup_new(), register_data_with_cleanup(), register_dummy_frame_dtor(), remote_notif_stop_alloc_reply(), sal_macro_scope(), save_infcall_control_state(), save_stop_context(), ser_base_copy_tty_state(), ser_base_get_tty_state(), ser_console_get_tty_state(), serial_event_open(), specify_exec_file_hook(), spu_bfd_fopen(), spu_bfd_open(), start_buildsym_compunit(), start_msglist(), start_subfile(), pv_area::store(), svr4_copy_library_list(), tfile_trace_file_writer_new(), tui_add_content_elements(), tui_alloc_generic_win_info(), tui_alloc_win_info(), update_dprintf_command_list(), user_macro_scope(), user_reg_add_builtin(), VEC(), xalloc_observer_list_node(), xcoff_symfile_init(), xnew(), xtensa_register_type(), and yyparse().

◆ XNEWVAR

#define XNEWVAR (   T,
  S 
)    xnewvar<T> (S)

Definition at line 193 of file poison.h.

Referenced by xnewvar().

◆ XNEWVEC

#define XNEWVEC (   T,
 
)    xnewvec<T> (N)

◆ XRESIZEVAR

#define XRESIZEVAR (   T,
  P,
  S 
)    xresizevar<T> (P, S)

Definition at line 217 of file poison.h.

Referenced by increase_expout_size(), parser_state::release(), write_exp_elt(), and xresizevar().

◆ XRESIZEVEC

#define XRESIZEVEC (   T,
  P,
 
)    xresizevec<T> (P, N)

Typedef Documentation

◆ IsFreeable

template<typename T >
using IsFreeable = gdb::Or<std::is_trivially_destructible<T>, std::is_void<T> >

Definition at line 94 of file poison.h.

◆ IsMallocable

template<typename T >
using IsMallocable = std::is_pod<T>

Definition at line 91 of file poison.h.

Function Documentation

◆ free()

template<typename T , typename = gdb::Requires<gdb::Not<IsFreeable<T>>>>
void free ( T *  ptr)
delete

◆ memset()

template<typename T , typename = gdb::Requires<gdb::Not<IsMemsettable<T>>>>
void* memset ( T *  s,
int  c,
size_t  n 
)
delete

Referenced by _initialize_mi_cmds(), aarch64_compat_siginfo_from_siginfo(), aarch64_linux_set_debug_regs(), aarch64_process_record(), aarch64_pseudo_write(), aarch64_push_dummy_call(), aarch64_siginfo_from_compat_siginfo(), abbrev_table_alloc_abbrev(), abbrev_table_read_table(), ada_init_symbol_cache(), ada_lookup_simple_minsym(), ada_template_to_fixed_record_type_1(), ada_value_primitive_packed_val(), add_initial_lwp(), add_nonlocal_symbols(), add_psymbol_to_bcache(), add_using_directive(), dwarf2_frame_state_reg_info::alloc_regs(), alloc_section_addr_info(), allocate_include_entry(), allocate_inline_frame_state(), allocate_psymtab(), amd64_collect_native_gregset(), amd64_displaced_step_copy_insn(), amd64_push_arguments(), amd64_relocate_instruction(), amd64_windows_frame_decode_insns(), amd64_windows_store_arg_in_reg(), append_composite_type_field_raw(), arm_process_record(), arm_push_dummy_call(), attach_fields_to_type(), ATTRIBUTE_PRINTF(), ax_reg_mask(), ax_reqs(), bkscm_make_block_syms_progress_smob(), bpscm_make_breakpoint_smob(), bsd_kvm_fetch_registers(), btrace_insn_history(), buffer_init(), cmdscm_make_command_smob(), coff_lookup_type(), coff_symtab_read(), compat_siginfo_from_siginfo(), compat_x32_siginfo_from_siginfo(), regcache::cooked_read(), copy_integer_to_size(), copy_sections(), create_cus_hash_table(), create_dwo_unit_in_dwp_v1(), create_dwo_unit_in_dwp_v2(), create_dwp_hash_table(), create_dwp_v2_section(), create_procinfo(), create_trace_state_variable(), ctf_start(), darwin_load_image_infos(), dbx_lookup_type(), dbx_symfile_init(), default_read_var_value(), dict_create_hashed(), do_initial_windows_stuff(), do_ppc_sysv_return_value(), dump_insns(), dwarf2_add_field(), dwarf2_add_member_fn(), dwarf2_attach_fields_to_type(), dwarf2_locate_dwo_sections(), dwarf_alloc_die(), dwarf_parse_macro_header(), elf_symfile_read(), evaluate_subexp_standard(), examine_prologue(), expand_hash_table(), extract_arm_insn(), fetch_inferior_event(), fetch_register(), fetch_regs_kernel_thread(), fill_gregset(), find_frame_funname(), frame_obstack_zalloc(), frame_register_unwind(), frv_analyze_prologue(), frv_pseudo_register_read(), frv_store_return_value(), ft32_skip_prologue(), gdb_bfd_lookup_symbol_from_symtab(), gdb_bfd_map_section(), gdb_fnprint(), gdb_fnwidth(), gdb_wait_for_event(), gdbarch_alloc(), gdbarch_info_init(), gdbarch_obstack_zalloc(), generic_load(), get_init_files(), get_spe_registers(), handle_command(), hashtab_obstack_allocate(), hex_string_custom(), hppa32_push_dummy_call(), hppa_init_objfile_priv_data(), i386_extract_return_value(), i386_mpx_info_bounds(), i386_process_record(), i387_collect_xsave(), i387_reset_bnd_regs(), ia64_pseudo_register_read(), ia64_push_dummy_call(), inf_validate_procs(), init_content_element(), init_lineno(), init_one_comp_unit(), initialize_explicit_location(), initialize_objfile_symbol(), minimal_symbol_reader::install(), ioscm_input_waiting(), iq2000_push_dummy_call(), iq2000_store_return_value(), linespec_parser_new(), linespec_state_constructor(), linux_fill_prpsinfo(), linux_find_memory_regions_full(), linux_nat_get_siginfo(), list_args_or_locals(), load_section_callback(), dwarf2_per_objfile::locate_sections(), lookup_dwo_cutu(), lookup_dwo_file_slot(), lookup_dwo_unit_in_dwp(), lookup_global_symbol(), lookup_minimal_symbol_and_objfile(), lookup_minimal_symbol_by_pc(), lookup_minimal_symbol_by_pc_section(), lookup_symbol_aux(), lzma_pread(), lzma_stat(), m32c_analyze_prologue(), m32c_part_read(), m32r_push_dummy_call(), m68hc11_pseudo_register_read(), macho_symfile_offsets(), macro_define_command(), main(), make_regs(), mem_bfd_iovec_stat(), mep_analyze_prologue(), microblaze_store_return_value(), mips64_fill_gregset(), mips_fill_gregset(), mips_get_mips16_fn_stub_pc(), mn10300_analyze_prologue(), mnsh_recv_message(), mnsh_send_message(), moxie_skip_prologue(), msp430_analyze_prologue(), mt_push_dummy_call(), mt_return_value(), new_explicit_location(), new_macro_definition(), new_macro_key(), new_macro_table(), new_psymtab(), new_source_file(), nto_read_auxv_from_initial_stack(), opencl_logical_not(), parmpy_init(), parse_partial_symbols(), parse_symbol(), pascm_make_param_smob(), pass_in_v(), pdc_read_regs(), per_cu_header_read_in(), ppc64_sysv_abi_return_value(), ppc_collect_reg(), ppc_linux_collect_gregset(), ppc_sysv_abi_push_dummy_call(), prepare_for_detach(), print_frame_args(), printf_wide_c_string(), process_g_packet(), process_initial_stop_replies(), process_linenos(), process_structure_scope(), procfs_create_inferior(), procfs_meminfo(), psymtab_to_symtab_1(), regcache::raw_read(), regcache::raw_supply(), regcache::raw_supply_zeroed(), read_alphacoff_dynamic_symtab(), read_call_site_scope(), read_common_block(), read_comp_units_from_section(), read_enum_type(), read_frame(), symbol_needs_eval_context::read_mem(), read_member_functions(), read_partial_die(), read_type(), read_unwind_info(), record_full_core_xfer_partial(), ref_add(), registry_clear_data(), relative_addr_info_to_section_offsets(), remote_btrace_maybe_reopen(), remote_btrace_reset(), remote_fileio_func_fstat(), remote_fileio_to_host_stat(), remote_hostio_fstat(), remote_query_supported(), reset_ecs(), rl78_analyze_prologue(), rs6000_lynx178_push_dummy_call(), rs6000_push_dummy_call(), rx_analyze_prologue(), s390_prepare_to_resume(), s390_prologue_frame_unwind_cache(), s390_stopped_by_watchpoint(), regcache::save(), scan_file_globals(), score7_malloc_and_get_memblock(), search_minsyms_for_name(), ser_windows_read_prim(), ser_windows_write_prim(), sh64_push_dummy_call(), sh64_store_return_value(), sh_init_flt_argreg(), sh_justify_value_in_reg(), siginfo_from_compat_siginfo(), siginfo_from_compat_x32_siginfo(), skip_prologue(), smash_type(), sparc32_store_arguments(), sparc64_store_arguments(), sparc64_store_floating_fields(), sparc64_store_return_value(), sparc64_supply_gregset(), sparc_supply_rwindow(), spu_bfd_iovec_stat(), spu_pseudo_register_read_spu(), spu_push_dummy_call(), spu_xfer_partial(), stabsread_new_init(), start_buildsym_compunit(), start_subfile(), startup_inferior(), store_register(), store_registers_using_G(), store_spe_register(), supply_nwfpe_register(), svr4_exec_displacement(), svr4_parse_libraries(), symbol_set_language(), syms_from_objfile_1(), target_float_convert(), target_stop_and_wait(), tdesc_parse_xml(), terminate_minimal_symbol_table(), thread_info::thread_info(), tilegx_push_dummy_call(), host_float_ops< T >::to_target(), mpfr_float_ops::to_target(), tui_find_disassembly_address(), tui_initialize_win(), tui_set_disassem_content(), tui_set_exec_info_content(), update_current_target(), update_thread_private_data(), v850_analyze_prologue(), value_contents_bits_eq(), value_fn_field(), VEC(), vector_relop(), wait_for_inferior(), windows_create_inferior(), wrap_indent_at_field(), write_ambiguous_var(), write_exp_elt_block(), write_exp_elt_intern(), write_exp_elt_longcst(), write_exp_elt_msym(), write_exp_elt_objfile(), write_exp_elt_opcode(), write_exp_elt_sym(), write_exp_elt_type(), xstormy16_push_dummy_call(), xstormy16_skip_prologue(), xstormy16_store_return_value(), and yylex().

◆ xcnew()

template<typename T >
static T* xcnew ( )
static

Definition at line 113 of file poison.h.

References XCNEW.

◆ xcnewvar()

template<typename T >
static T* xcnewvar ( size_t  s)
static

Definition at line 197 of file poison.h.

References XCNEWVAR.

◆ xcnewvec()

template<typename T >
static T* xcnewvec ( size_t  n)
static

Definition at line 149 of file poison.h.

References XCNEWVEC.

◆ xdelete()

template<typename T >
static void xdelete ( T *  p)
static

Definition at line 125 of file poison.h.

References XDELETE.

◆ xdeletevec()

template<typename T >
static void xdeletevec ( T *  p)
static

Definition at line 173 of file poison.h.

References XDELETEVEC.

◆ xnew()

template<typename T >
static T* xnew ( )
static

Definition at line 101 of file poison.h.

References XNEW.

◆ xnewvar()

template<typename T >
static T* xnewvar ( size_t  s)
static

Definition at line 185 of file poison.h.

References XNEWVAR.

◆ xnewvec()

template<typename T >
static T* xnewvec ( size_t  n)
static

Definition at line 137 of file poison.h.

References XNEWVEC.

◆ xresizevar()

template<typename T >
static T* xresizevar ( T *  p,
size_t  s 
)
static

Definition at line 209 of file poison.h.

References XRESIZEVAR.

◆ xresizevec()

template<typename T >
static T* xresizevec ( T *  p,
size_t  n 
)
static

Definition at line 161 of file poison.h.

References XRESIZEVEC.