115 for (index = first_nf_index; index < first_nf_index +
125 "%s next index %d owns enqueue rights to %s\n",
127 index - first_nf_index,
129 fformat (stderr,
" nf index %d nf->frame %p\n",
155 fformat (stderr,
"node runtime index %d name %s\n", index,
168 else if (verbose == 1)
172 fformat (stderr,
"verbose not 0 or 1\n");
176 vlib_cli_show_errors.
function (vm, &input, 0 );
189 else if (verbose == 1)
191 else if (verbose == 2)
195 fformat (stderr,
"verbose not 0 - 2\n");
199 vlib_cli_show_session_command.
function (vm, &input, 0 );
209 return dt < 0 ? -1 : (dt > 0 ? +1 : 0);
230 fmt =
"------------------- Start of thread %d %s -------------------\n";
233 tm = &this_vlib_main->trace_main;
240 vec_add1 (traces, h[0]);
245 s =
format (s,
"No packets in trace buffer\n");
252 for (i = 0; i <
vec_len (traces); i++)
256 fformat (stderr,
"Limiting display to %d packets." 257 " To display more specify max.", max);
261 s =
format (s,
"Packet %d\n%U\n\n", i + 1,
296 vlib_cli_output (vm,
"gdb_validate_buffer(b) check vlib_buffer b sanity");
297 vlib_cli_output (vm,
"debug_hex_bytes (ptr, n_bytes) dumps n_bytes in hex");
299 vlib_cli_output (vm,
"vlib_runtime_index_to_node_name (index) prints NN");
307 .short_help =
"Describe functions which can be called from gdb",
353 fformat (stderr,
"gdb_validate_buffer(): %v", s);
356 fformat (stderr,
"gdb_validate_buffer(): no error found\n");
void vlib_runtime_index_to_node_name(u32 index)
GDB callable function: vlib_runtime_index_to_node_name.
u32 next_frame_index
Start of next frames for this node.
#define CLIB_LOG2_CACHE_LINE_BYTES
u32 vbi(vlib_buffer_t *b)
vlib_buffer_main_t * buffer_main
void vlib_dump_frame_ownership(void)
GDB callable function: vlib_dump_frame_ownership.
vlib_main_t ** vlib_mains
vnet_buffer_opaque_t * vb(void *vb_arg)
void gdb_show_session(int verbose)
vlib_trace_header_t ** trace_buffer_pool
void debug_hex_bytes(u8 *s, u32 n)
GDB callable function: debug_hex_bytes - return formatted hex string.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vlib_node_runtime_t * nodes_by_type[VLIB_N_NODE_TYPE]
vlib_worker_thread_t * vlib_worker_threads
vlib_cli_command_t vlib_cli_show_errors
(constructor) VLIB_CLI_COMMAND (vlib_cli_show_errors)
vlib_cli_command_function_t * function
format_function_t format_vlib_trace
vlib_cli_command_t vlib_cli_show_session_command
(constructor) VLIB_CLI_COMMAND (vlib_cli_show_session_command)
static clib_error_t * show_gdb_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
GDB callable function: show_gdb_command_fn - show gdb.
u32 node_index
Node index.
#define foreach_vlib_main(body)
vec_header_t * pvh(void *p)
GDB callable function: pvh - Return vector header of vector.
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
vnet_buffer_opaque2_t * vb2(void *vb_arg)
#define VLIB_CLI_COMMAND(x,...)
clib_error_t * gdb_func_init(vlib_main_t *vm)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int gdb_validate_buffer(vlib_buffer_t *b)
int pifi(void *p, u32 index)
GDB callable function: pifi - call pool_is_free_index - is passed index free?
uword pe(void *v)
GDB callable function: pe - call pool_elts - number of elements in a pool.
static uword pointer_to_uword(const void *p)
static vlib_main_t * vlib_get_main(void)
u32 vl(void *p)
GDB callable function: vl - Return vector length of vector.
static int trace_cmp(void *a1, void *a2)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_node_main_t node_main
VLIB buffer representation.
vlib_next_frame_t * next_frames
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
u8 * vlib_validate_buffers(vlib_main_t *vm, u32 *buffers, uword next_buffer_stride, uword n_buffers, vlib_buffer_known_state_t known_state, uword follow_buffer_next)
#define vec_foreach(var, vec)
Vector iterator.
void trace_apply_filter(vlib_main_t *vm)
void gdb_show_errors(int verbose)
static uword pool_elts(void *v)
Number of active elements in a pool.