GDB (xrefs)
Macros | Functions
vec.h File Reference
#include "diagnostics.h"

Go to the source code of this file.

Macros

#define DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION
 
#define VEC_length(T, V)   (VEC_OP(T,length)(V))
 
#define VEC_empty(T, V)   (VEC_length (T,V) == 0)
 
#define VEC_last(T, V)   (VEC_OP(T,last)(V VEC_ASSERT_INFO))
 
#define VEC_index(T, V, I)   (VEC_OP(T,index)(V,I VEC_ASSERT_INFO))
 
#define VEC_iterate(T, V, I, P)   (VEC_OP(T,iterate)(V,I,&(P)))
 
#define VEC_alloc(T, N)   (VEC_OP(T,alloc)(N))
 
#define VEC_free(T, V)   (VEC_OP(T,free)(&V))
 
#define VEC_cleanup(T)   (VEC_OP(T,cleanup))
 
#define VEC_embedded_size(T, N)   (VEC_OP(T,embedded_size)(N))
 
#define VEC_embedded_init(T, O, N)   (VEC_OP(T,embedded_init)(VEC_BASE(O),N))
 
#define VEC_copy(T, V)   (VEC_OP(T,copy)(V))
 
#define VEC_merge(T, V1, V2)   (VEC_OP(T,merge)(V1, V2))
 
#define VEC_space(T, V, R)   (VEC_OP(T,space)(V,R VEC_ASSERT_INFO))
 
#define VEC_reserve(T, V, R)   (VEC_OP(T,reserve)(&(V),R VEC_ASSERT_INFO))
 
#define VEC_quick_push(T, V, O)   (VEC_OP(T,quick_push)(V,O VEC_ASSERT_INFO))
 
#define VEC_safe_push(T, V, O)   (VEC_OP(T,safe_push)(&(V),O VEC_ASSERT_INFO))
 
#define VEC_pop(T, V)   (VEC_OP(T,pop)(V VEC_ASSERT_INFO))
 
#define VEC_truncate(T, V, I)   (VEC_OP(T,truncate)(V,I VEC_ASSERT_INFO))
 
#define VEC_safe_grow(T, V, I)   (VEC_OP(T,safe_grow)(&(V),I VEC_ASSERT_INFO))
 
#define VEC_replace(T, V, I, O)   (VEC_OP(T,replace)(V,I,O VEC_ASSERT_INFO))
 
#define VEC_quick_insert(T, V, I, O)   (VEC_OP(T,quick_insert)(V,I,O VEC_ASSERT_INFO))
 
#define VEC_safe_insert(T, V, I, O)   (VEC_OP(T,safe_insert)(&(V),I,O VEC_ASSERT_INFO))
 
#define VEC_ordered_remove(T, V, I)   (VEC_OP(T,ordered_remove)(V,I VEC_ASSERT_INFO))
 
#define VEC_unordered_remove(T, V, I)   (VEC_OP(T,unordered_remove)(V,I VEC_ASSERT_INFO))
 
#define VEC_block_remove(T, V, I, L)   (VEC_OP(T,block_remove)(V,I,L VEC_ASSERT_INFO))
 
#define VEC_address(T, V)   (VEC_OP(T,address)(V))
 
#define VEC_lower_bound(T, V, O, LT)   (VEC_OP(T,lower_bound)(V,O,LT VEC_ASSERT_INFO))
 
#define vec_free_(V)   xfree (V)
 
#define VEC_ASSERT_INFO   ,__FILE__,__LINE__
 
#define VEC_ASSERT_DECL   ,const char *file_,unsigned line_
 
#define VEC_ASSERT_PASS   ,file_,line_
 
#define vec_assert(expr, op)
 
#define VEC(T)   VEC_##T
 
#define VEC_OP(T, OP)   VEC_##T##_##OP
 
#define VEC_T(T)
 
#define DEF_VEC_I(T)
 
#define DEF_VEC_P(T)
 
#define DEF_VEC_O(T)
 
#define vec_offset(T, VPTR)   ((size_t) ((char *) &(VPTR)->vec - (char *) VPTR))
 
#define DEF_VEC_ALLOC_FUNC_I(T)
 
#define DEF_VEC_FUNC_P(T)
 
#define DEF_VEC_ALLOC_FUNC_P(T)
 
#define DEF_VEC_FUNC_O(T)
 
#define DEF_VEC_ALLOC_FUNC_O(T)
 

Functions

void * vec_p_reserve (void *, int)
 
void * vec_o_reserve (void *, int, size_t, size_t)
 

Macro Definition Documentation

◆ DEF_VEC_ALLOC_FUNC_I

#define DEF_VEC_ALLOC_FUNC_I (   T)

Definition at line 473 of file vec.h.

◆ DEF_VEC_ALLOC_FUNC_O

#define DEF_VEC_ALLOC_FUNC_O (   T)

Definition at line 1040 of file vec.h.

◆ DEF_VEC_ALLOC_FUNC_P

#define DEF_VEC_ALLOC_FUNC_P (   T)

Definition at line 768 of file vec.h.

◆ DEF_VEC_FUNC_O

#define DEF_VEC_FUNC_O (   T)

Definition at line 868 of file vec.h.

◆ DEF_VEC_FUNC_P

#define DEF_VEC_FUNC_P (   T)

Definition at line 583 of file vec.h.

◆ DEF_VEC_I

#define DEF_VEC_I (   T)
Value:
DIAGNOSTIC_PUSH \
DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION \
static inline void VEC_OP (T,must_be_integral_type) (void) \
{ \
(void)~(T)0; \
} \
VEC_T(T); \
DEF_VEC_FUNC_P(T) \
DEF_VEC_ALLOC_FUNC_I(T) \
DIAGNOSTIC_POP \
struct vec_swallow_trailing_semi
#define VEC_OP(T, OP)
Definition: vec.h:415
#define VEC_T(T)
Definition: vec.h:417

Definition at line 426 of file vec.h.

◆ DEF_VEC_O

#define DEF_VEC_O (   T)
Value:
VEC_T(T); \
DEF_VEC_FUNC_O(T) \
DEF_VEC_ALLOC_FUNC_O(T) \
DIAGNOSTIC_POP \
struct vec_swallow_trailing_semi
#define VEC_T(T)
Definition: vec.h:417

Definition at line 456 of file vec.h.

◆ DEF_VEC_P

#define DEF_VEC_P (   T)
Value:
DIAGNOSTIC_PUSH \
DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION \
static inline void VEC_OP (T,must_be_pointer_type) (void) \
{ \
(void)((T)1 == (void *)1); \
} \
VEC_T(T); \
DEF_VEC_FUNC_P(T) \
DEF_VEC_ALLOC_FUNC_P(T) \
DIAGNOSTIC_POP \
struct vec_swallow_trailing_semi
#define VEC_OP(T, OP)
Definition: vec.h:415
#define VEC_T(T)
Definition: vec.h:417

Definition at line 441 of file vec.h.

◆ DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION

#define DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION

Definition at line 36 of file vec.h.

◆ VEC

#define VEC (   T)    VEC_##T

◆ VEC_address

#define VEC_address (   T,
 
)    (VEC_OP(T,address)(V))

◆ VEC_alloc

#define VEC_alloc (   T,
 
)    (VEC_OP(T,alloc)(N))

Definition at line 189 of file vec.h.

Referenced by pyuw_create_unwind_info().

◆ vec_assert

#define vec_assert (   expr,
  op 
)
Value:
((void)((expr) ? 0 : (gdb_assert_fail (op, file_, line_, \
FUNCTION_NAME), 0)))
#define gdb_assert_fail(assertion, file, line, function)
Definition: gdb_assert.h:43

Definition at line 410 of file vec.h.

◆ VEC_ASSERT_DECL

#define VEC_ASSERT_DECL   ,const char *file_,unsigned line_

Definition at line 408 of file vec.h.

◆ VEC_ASSERT_INFO

#define VEC_ASSERT_INFO   ,__FILE__,__LINE__

Definition at line 407 of file vec.h.

◆ VEC_ASSERT_PASS

#define VEC_ASSERT_PASS   ,file_,line_

Definition at line 409 of file vec.h.

◆ VEC_block_remove

#define VEC_block_remove (   T,
  V,
  I,
  L 
)    (VEC_OP(T,block_remove)(V,I,L VEC_ASSERT_INFO))

Definition at line 376 of file vec.h.

Referenced by insert_into_bit_range_vector(), and yylex().

◆ VEC_cleanup

#define VEC_cleanup (   T)    (VEC_OP(T,cleanup))

◆ VEC_copy

#define VEC_copy (   T,
 
)    (VEC_OP(T,copy)(V))

Definition at line 222 of file vec.h.

Referenced by s390_linux_new_fork(), target_write_memory_blocks(), and value_copy().

◆ VEC_embedded_init

#define VEC_embedded_init (   T,
  O,
 
)    (VEC_OP(T,embedded_init)(VEC_BASE(O),N))

Definition at line 214 of file vec.h.

◆ VEC_embedded_size

#define VEC_embedded_size (   T,
 
)    (VEC_OP(T,embedded_size)(N))

Definition at line 213 of file vec.h.

◆ VEC_empty

#define VEC_empty (   T,
 
)    (VEC_length (T,V) == 0)

◆ VEC_free

#define VEC_free (   T,
 
)    (VEC_OP(T,free)(&V))

◆ vec_free_

#define vec_free_ (   V)    xfree (V)

Definition at line 405 of file vec.h.

◆ VEC_index

#define VEC_index (   T,
  V,
  I 
)    (VEC_OP(T,index)(V,I VEC_ASSERT_INFO))

◆ VEC_iterate

#define VEC_iterate (   T,
  V,
  I,
 
)    (VEC_OP(T,iterate)(V,I,&(P)))

Definition at line 181 of file vec.h.

Referenced by add_all_symbol_names_from_pspace(), add_matching_symbols_to_info(), add_path(), auto_load_objfile_script_1(), bpstat_stop_status(), breakpoint_init_inferior(), breakpoint_retire_moribund(), build_id_to_debug_bfd(), build_type_psymtab_dependencies(), check_parameter_typelist(), check_status_catch_solib(), claim_memory(), cleanup_request_data(), clear_inline_frame_state(), clear_memory_write_data(), complete_label(), compute_compunit_symtab_includes(), compute_delayed_physnames(), convert_linespec_to_sals(), create_debug_types_hash_table(), ctf_write_uploaded_tp(), decode_digits_list_mode(), decode_digits_ordinary(), delete_trace_state_variable(), filename_is_in_auto_load_safe_path_vec(), filter_results(), find_default_run_target(), find_first_range_overlap(), find_matching_tracepoint_location(), find_method(), find_separate_debug_file(), find_superclass_methods(), find_trace_state_variable(), find_trace_state_variable_by_number(), free_char_ptr_vec(), free_xmethod_worker_vec(), gdb_xml_values_cleanup(), gdbscm_parse_function_args(), hwdebug_find_thread_points_by_tid(), info_static_tracepoint_markers_command(), insert_into_bit_range_vector(), macho_symfile_read_all_oso(), merge_uploaded_trace_state_variables(), merge_uploaded_tracepoints(), moribund_breakpoint_here_p(), openp(), ppc_linux_thread_exit(), print_one_static_tracepoint_marker(), print_solib_event(), process_cu_includes(), process_psymtab_comp_unit_reader(), process_stop_reply(), process_tracepoint_on_disconnect(), pyuw_sniffer(), ranges_copy_adjusted(), read_uploaded_action(), record_btrace_wait(), record_full_insert_breakpoint(), record_full_remove_breakpoint(), recursively_compute_inclusions(), register_remote_g_packet_guess(), remote_read_description(), s390_prepare_to_resume(), s390_remove_hw_breakpoint(), s390_remove_watchpoint(), save_trace_state_variables(), search_minsyms_for_name(), serial_interface_lookup(), solib_aix_current_sos(), solib_aix_free_library_list(), solib_target_current_sos(), solib_target_free_library_list(), start_tracing(), stop_reply_dtr(), stop_tracing(), target_write_memory_blocks(), tfile_write_uploaded_tp(), thread_db_load_search(), tstatus_command(), tvariables_info_1(), uniquify_strings(), unwind_infopy_add_saved_register(), unwind_infopy_dealloc(), unwind_infopy_str(), value_in_thread_stack_temporaries(), VEC(), xml_find_attribute(), and yyparse().

◆ VEC_last

#define VEC_last (   T,
 
)    (VEC_OP(T,last)(V VEC_ASSERT_INFO))

◆ VEC_length

#define VEC_length (   T,
 
)    (VEC_OP(T,length)(V))

◆ VEC_lower_bound

#define VEC_lower_bound (   T,
  V,
  O,
  LT 
)    (VEC_OP(T,lower_bound)(V,O,LT VEC_ASSERT_INFO))

◆ VEC_merge

#define VEC_merge (   T,
  V1,
  V2 
)    (VEC_OP(T,merge)(V1, V2))

Definition at line 229 of file vec.h.

Referenced by find_method_list(), and VEC().

◆ vec_offset

#define vec_offset (   T,
  VPTR 
)    ((size_t) ((char *) &(VPTR)->vec - (char *) VPTR))

Definition at line 471 of file vec.h.

Referenced by vec_o_reserve().

◆ VEC_OP

#define VEC_OP (   T,
  OP 
)    VEC_##T##_##OP

Definition at line 415 of file vec.h.

◆ VEC_ordered_remove

#define VEC_ordered_remove (   T,
  V,
  I 
)    (VEC_OP(T,ordered_remove)(V,I VEC_ASSERT_INFO))

Definition at line 355 of file vec.h.

Referenced by record_btrace_wait(), and yylex().

◆ VEC_pop

#define VEC_pop (   T,
 
)    (VEC_OP(T,pop)(V VEC_ASSERT_INFO))

◆ VEC_quick_insert

#define VEC_quick_insert (   T,
  V,
  I,
 
)    (VEC_OP(T,quick_insert)(V,I,O VEC_ASSERT_INFO))

Definition at line 330 of file vec.h.

◆ VEC_quick_push

#define VEC_quick_push (   T,
  V,
 
)    (VEC_OP(T,quick_push)(V,O VEC_ASSERT_INFO))

Definition at line 265 of file vec.h.

◆ VEC_replace

#define VEC_replace (   T,
  V,
  I,
 
)    (VEC_OP(T,replace)(V,I,O VEC_ASSERT_INFO))

Definition at line 318 of file vec.h.

Referenced by auto_load_safe_path_vec_update(), uniquify_strings(), and yylex().

◆ VEC_reserve

#define VEC_reserve (   T,
  V,
  R 
)    (VEC_OP(T,reserve)(&(V),R VEC_ASSERT_INFO))

Definition at line 253 of file vec.h.

◆ VEC_safe_grow

#define VEC_safe_grow (   T,
  V,
  I 
)    (VEC_OP(T,safe_grow)(&(V),I VEC_ASSERT_INFO))

Definition at line 304 of file vec.h.

◆ VEC_safe_insert

#define VEC_safe_insert (   T,
  V,
  I,
 
)    (VEC_OP(T,safe_insert)(&(V),I,O VEC_ASSERT_INFO))

Definition at line 343 of file vec.h.

Referenced by arm_record_special_symbol(), and insert_into_bit_range_vector().

◆ VEC_safe_push

#define VEC_safe_push (   T,
  V,
 
)    (VEC_OP(T,safe_push)(&(V),O VEC_ASSERT_INFO))

Definition at line 276 of file vec.h.

Referenced by _initialize_charset(), add_ada_task(), add_minsym(), add_path(), collect_info::add_symbol(), add_target_with_completer(), add_to_method_list(), allocate_inline_frame_state(), arm_exidx_new_objfile(), arm_record_special_symbol(), auto_load_safe_path_vec_update(), btrace_add_pc(), btrace_data_append(), build_type_psymtabs_reader(), check_types_equal(), claim_memory(), clear_inline_frame_state(), convert_explicit_location_to_linespec(), count_next_character(), create_trace_state_variable(), decode_line_2(), decode_line_full(), decode_objc(), delim_string_to_char_ptr_vec_append(), dwarf2_locate_dwo_sections(), find_imps(), find_label_symbols_in_block(), find_methods(), follow_die_sig_1(), gdbpy_get_matching_xmethod_workers(), gdbscm_parse_function_args(), hwdebug_find_thread_points_by_tid(), library_list_start_library(), load_section_callback(), dwarf2_per_objfile::locate_sections(), macho_register_oso(), merge_uploaded_tracepoints(), parse_linespec(), parse_tracepoint_definition(), parse_xml_btrace_block(), pass_on_stack(), process_full_comp_unit(), process_imported_unit_die(), push_thread_stack_temporary(), queue_and_load_dwo_tu(), record_btrace_wait(), record_full_insert_breakpoint(), recursively_compute_inclusions(), register_remote_g_packet_guess(), remote_parse_stop_reply(), s390_insert_hw_breakpoint(), s390_insert_watchpoint(), scan_partial_symbols(), search_minsyms_for_name(), serial_add_interface(), gdb_xml_parser::start_element(), target_write_memory_blocks(), types_deeply_equal(), unwind_infopy_add_saved_register(), update_global_location_list(), update_solib_list(), VEC(), yylex(), and yyparse().

◆ VEC_space

#define VEC_space (   T,
  V,
  R 
)    (VEC_OP(T,space)(V,R VEC_ASSERT_INFO))

Definition at line 241 of file vec.h.

◆ VEC_T

#define VEC_T (   T)
Value:
typedef struct VEC(T) \
{ \
unsigned num; \
unsigned alloc; \
T vec[1]; \
} VEC(T)
#define VEC(T)
Definition: vec.h:414

Definition at line 417 of file vec.h.

◆ VEC_truncate

#define VEC_truncate (   T,
  V,
  I 
)    (VEC_OP(T,truncate)(V,I VEC_ASSERT_INFO))

Definition at line 294 of file vec.h.

Referenced by find_method(), read_known_tasks(), and uniquify_strings().

◆ VEC_unordered_remove

#define VEC_unordered_remove (   T,
  V,
  I 
)    (VEC_OP(T,unordered_remove)(V,I VEC_ASSERT_INFO))

Function Documentation

◆ vec_o_reserve()

void* vec_o_reserve ( void *  ,
int  ,
size_t  ,
size_t   
)

Definition at line 91 of file vec.c.

References vec_prefix::alloc, calculate_allocation(), vec_prefix::vec, vec_offset, and xrealloc().

Referenced by vec_p_reserve().

◆ vec_p_reserve()

void* vec_p_reserve ( void *  ,
int   
)

Definition at line 80 of file vec.c.

References vec_o_reserve().