generic
[Debugging]


Files

file  debug.h
file  symtab.c
 Kernel symbol resolver.

Defines

#define CALLER   ((__address)__builtin_return_address(0))
#define HERE   ((__address *)0)
#define ASSERT(expr)
#define STRING(arg)   STRING_ARG(arg)
#define STRING_ARG(arg)   #arg

Functions

char * get_symtab_entry (__native addr)
static char * symtab_search_one (const char *name, int *startpos)
__address get_symbol_addr (const char *name)
void symtab_print_search (const char *name)
int symtab_compl (char *input)

Define Documentation

#define ASSERT expr   ) 
 

Debugging ASSERT macro

If CONFIG_DEBUG is set, the ASSERT() macro evaluates expr and if it is false raises kernel panic.

Parameters:
expr Expression which is expected to be true.

Definition at line 60 of file debug.h.

Referenced by _zone_merge(), anon_share(), as_area_destroy(), as_area_resize(), as_destroy(), as_page_fault(), as_switch(), asid_get(), bitmap_clear_range(), bitmap_copy(), bitmap_set_range(), btree_insert(), btree_leaf_node_left_neighbour(), btree_leaf_node_right_neighbour(), btree_print(), buddy_system_alloc(), buddy_system_alloc_block(), buddy_system_create(), buddy_system_free(), copy_from_uspace(), copy_to_uspace(), elf_error(), elf_frame_free(), elf_page_fault(), elf_share(), exc_dispatch(), exc_register(), fb_init(), find_best_thread(), find_mapping_and_check(), frame_alloc_generic(), frame_free(), frame_get_parent(), frame_reference_add(), frame_set_parent(), futex_ht_compare(), hash_table_create(), hash_table_find(), hash_table_insert(), hash_table_remove(), ipc_irq_register(), ipc_irq_send_notif(), ktaskclnp(), make_magcache(), malloc(), node_combine(), node_split(), page_arch_init(), page_mapping_find(), page_mapping_insert(), page_mapping_remove(), page_table_create(), page_table_destroy(), page_table_lock(), page_table_unlock(), parse_argument(), phone_connect(), phone_deallocp(), phys_page_fault(), preemption_enable(), return_config_frames(), scheduler(), scheduler_separated_stack(), sh_info_remove_reference(), slab_obj_destroy(), spinlock_unlock(), sys_ipc_wait_for_call(), sys_sysinfo_valid(), sys_sysinfo_value(), sysinfo_create_path(), task_run_program(), thread_destroy(), thread_detach(), thread_join_timeout(), thread_ready(), tlb_shootdown_ipi_recv(), used_space_insert(), used_space_remove(), zone_buddy_find_buddy(), zone_create(), zone_frame_alloc(), zone_frame_free(), zone_get_frame(), zone_mark_unavailable(), and zone_reduce_region().

#define CALLER   ((__address)__builtin_return_address(0))
 

Definition at line 41 of file debug.h.

#define HERE   ((__address *)0)
 

Current Instruction Pointer address

Definition at line 45 of file debug.h.

#define STRING arg   )     STRING_ARG(arg)
 

Definition at line 63 of file debug.h.

#define STRING_ARG arg   )     #arg
 

Definition at line 64 of file debug.h.


Function Documentation

__address get_symbol_addr const char *  name  ) 
 

Return address that corresponds to the entry

Search symbol table, and if there is one match, return it

Parameters:
name Name of the symbol
Returns:
0 - Not found, -1 - Duplicate symbol, other - address of symbol

Definition at line 111 of file symtab.c.

References __u64_le2host(), NULL, strlen(), symbol_table, and symtab_search_one().

Referenced by cmd_call0(), cmd_call1(), cmd_call2(), cmd_call3(), cmd_set4(), and parse_int_arg().

Here is the call graph for this function:

char* get_symtab_entry __native  addr  ) 
 

Return entry that seems most likely to correspond to argument.

Return entry that seems most likely to correspond to address passed in the argument.

Parameters:
addr Address.
Returns:
Pointer to respective symbol string on success, NULL otherwise.

Definition at line 53 of file symtab.c.

References __u64_le2host(), symtab_entry::address_le, and symbol_table.

Referenced by cmd_call0(), cmd_call1(), cmd_call2(), cmd_call3(), exc_print_cmd(), and pht_refill_fail().

Here is the call graph for this function:

int symtab_compl char *  input  ) 
 

Symtab completion

Parameters:
input - Search string, completes to symbol name
Returns:
- 0 - nothing found, 1 - success, >1 print duplicates

Definition at line 153 of file symtab.c.

References MAX_SYMBOL_NAME, name, printf(), strlen(), strncpy(), symbol_table, and symtab_search_one().

Referenced by clever_readline().

Here is the call graph for this function:

void symtab_print_search const char *  name  ) 
 

Find symbols that match parameter and prints them

Definition at line 132 of file symtab.c.

References __u64_le2host(), printf(), symtab_entry::symbol_name, symbol_table, and symtab_search_one().

Referenced by cmd_call0(), cmd_call1(), cmd_call2(), cmd_call3(), cmd_set4(), cmd_symaddr(), and parse_int_arg().

Here is the call graph for this function:

static char* symtab_search_one const char *  name,
int *  startpos
[static]
 

Find symbols that match the parameter forward and print them.

Parameters:
name - search string
startpos - starting position, changes to found position
Returns:
Pointer to the part of string that should be completed or NULL

Definition at line 72 of file symtab.c.

References strlen().

Referenced by get_symbol_addr(), symtab_compl(), and symtab_print_search().

Here is the call graph for this function:


Generated on Sun Jun 18 17:35:58 2006 for HelenOS Kernel (ppc64) by  doxygen 1.4.6