Go to the source code of this file.
Defines | |
#define | UNUSED __attribute__ ((unused)) |
#define | NO_RETURN __attribute__ ((noreturn)) |
#define | NO_INLINE __attribute__ ((noinline)) |
#define | PRINTF_FORMAT(FMT, FIRST) __attribute__ ((format (printf, FMT, FIRST))) |
#define | PANIC(...) debug_panic (__FILE__, __LINE__, __func__, __VA_ARGS__) |
#define | ASSERT(CONDITION) |
#define | NOT_REACHED() PANIC ("executed an unreachable statement"); |
Functions | |
void | debug_panic (const char *file, int line, const char *function, const char *message,...) PRINTF_FORMAT(4 |
void | debug_backtrace (void) |
void | debug_backtrace_all (void) |
Variables | |
void | NO_RETURN |
#define ASSERT | ( | CONDITION | ) |
Value:
if (CONDITION) { } else { \ PANIC ("assertion `%s' failed.", #CONDITION); \ }
Definition at line 32 of file debug.h.
Referenced by alloc_frame(), arena_to_block(), atoi(), basic_tests(), bitmap_contains(), bitmap_count(), bitmap_create_in_buf(), bitmap_scan(), bitmap_set(), bitmap_set_all(), bitmap_set_multiple(), bitmap_test(), block_get_role(), block_set_role(), block_to_arena(), block_type_name(), block_write(), byte_to_sector(), check_and_free(), cond_broadcast(), cond_init(), cond_signal(), cond_wait(), dir_add(), dir_lookup(), dir_remove(), file_allow_write(), file_deny_write(), file_length(), file_seek(), file_tell(), find_end_of_run(), free(), free_map_release(), hash_apply(), hash_bytes(), hash_first(), hash_next(), hash_string(), identify_ata_device(), init_poll(), init_thread(), inode_allow_write(), inode_create(), inode_deny_write(), inode_remove(), inplace_merge(), input_full(), input_putc(), intq_empty(), intq_full(), intq_getc(), intq_putc(), intr_enable(), intr_handler(), intr_register_ext(), intr_register_int(), intr_yield_on_return(), is_thread(), issue_pio_command(), kernel_thread(), list_back(), list_begin(), list_end(), list_front(), list_head(), list_init(), list_insert(), list_insert_ordered(), list_next(), list_prev(), list_rbegin(), list_remove(), list_rend(), list_sort(), list_splice(), list_tail(), list_unique(), load_segment(), lock_acquire(), lock_held_by_current_thread(), lock_init(), lock_release(), lock_try_acquire(), lookup(), lookup_page(), main(), make_gate(), make_seg_desc(), malloc_init(), memchr(), memcmp(), memcpy(), memmove(), memset(), msc_attached(), msc_get_geometry(), msc_io(), pagedir_clear_page(), pagedir_destroy(), pagedir_get_page(), pagedir_set_page(), palloc_free_multiple(), partition(), pci_io_size(), pci_reg_read16(), pci_reg_read32(), pci_reg_read8(), pci_reg_write16(), pci_reg_write32(), pci_reg_write8(), pci_register_irq(), pci_unregister_irq(), pde_create_kernel(), pde_create_user(), pde_get_pt(), pic_end_of_interrupt(), pick_pivot(), pit_configure_channel(), pte_create_kernel(), pte_create_user(), ptov(), putc_poll(), putchar_have_lock(), qh_alloc(), qh_free(), read_partition_table(), real_time_delay(), real_time_sleep(), register_handler(), rehash(), schedule(), schedule_tail(), select_sector(), sema_down(), sema_init(), sema_try_down(), sema_up(), serial_init_queue(), serial_notify(), set_serial(), signal(), sort(), strchr(), strcmp(), strlcat(), strlcpy(), strlen(), strtok_r(), td_from_pool(), test(), test_alarm_priority(), test_mlfqs_block(), test_mlfqs_fair(), test_mlfqs_load_1(), test_mlfqs_load_60(), test_mlfqs_load_avg(), test_mlfqs_recent_1(), test_priority_change(), test_priority_condvar(), test_priority_donate_chain(), test_priority_donate_lower(), test_priority_donate_multiple(), test_priority_donate_multiple2(), test_priority_donate_nest(), test_priority_donate_one(), test_priority_donate_sema(), test_priority_fifo(), test_priority_preempt(), test_priority_sema(), test_sleep(), thread_block(), thread_create(), thread_current(), thread_exit(), thread_foreach(), thread_unblock(), thread_yield(), timer_calibrate(), timer_sleep(), tss_get(), tss_update(), uhci_acquire_td(), uhci_add_td_to_qh(), uhci_create_chan(), uhci_release_td(), uhci_remove_error_td(), uhci_remove_qh(), uhci_run(), uhci_stop(), uhci_tx_pkt(), usb_dev_bulk(), usb_dev_setup(), usb_setup_dev_addr(), ustar_make_header(), ustar_parse_header(), verify_bsearch(), verify_list_bkwd(), verify_list_fwd(), verify_order(), vtop(), wait(), and write_ier().
#define NOT_REACHED | ( | ) | PANIC ("executed an unreachable statement"); |
Definition at line 36 of file debug.h.
Referenced by __vprintf(), consume_some_resources_and_die(), exit(), halt(), ide_init(), interrupt_handler(), main(), palloc_free_multiple(), start_process(), and thread_exit().
#define PANIC | ( | ... | ) | debug_panic (__FILE__, __LINE__, __func__, __VA_ARGS__) |
Definition at line 15 of file debug.h.
Referenced by block_register(), check_sector(), do_format(), fail(), filesys_init(), found_partition(), free_map_create(), free_map_init(), free_map_open(), fsutil_append(), fsutil_cat(), fsutil_extract(), fsutil_ls(), fsutil_rm(), ide_read(), ide_write(), init_pool(), intr_handler(), kill(), msc_detached(), msc_get_geometry(), msc_io(), palloc_get_multiple(), parse_options(), pci_read_config(), pci_read_in(), pci_reg_read16(), pci_reg_read32(), pci_reg_read8(), pci_reg_write16(), pci_reg_write32(), pci_reg_write8(), pci_write_out(), qh_alloc(), read_command_line(), read_partition_table(), run_actions(), run_test(), test_sleep(), token_to_pid(), uhci_irq(), uhci_stop_unlocked(), usb_config_dev(), usb_load_config(), and usb_setup_dev_addr().
#define PRINTF_FORMAT | ( | FMT, | |||
FIRST | ) | __attribute__ ((format (printf, FMT, FIRST))) |
void debug_backtrace | ( | void | ) |
void debug_backtrace_all | ( | void | ) |
Definition at line 117 of file debug.c.
References intr_disable(), intr_set_level(), print_stacktrace(), and thread_foreach().
Referenced by keyboard_interrupt().
void debug_panic | ( | const char * | file, | |
int | line, | |||
const char * | function, | |||
const char * | message, | |||
... | ||||
) |