pintos/src/lib/debug.h File Reference

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 Documentation

#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 NO_INLINE   __attribute__ ((noinline))

Definition at line 10 of file debug.h.

#define NO_RETURN   __attribute__ ((noreturn))

Definition at line 9 of file debug.h.

 
#define NOT_REACHED (  )     PANIC ("executed an unreachable statement");

#define PANIC ( ...   )     debug_panic (__FILE__, __LINE__, __func__, __VA_ARGS__)

#define PRINTF_FORMAT ( FMT,
FIRST   )     __attribute__ ((format (printf, FMT, FIRST)))

Definition at line 11 of file debug.h.

#define UNUSED   __attribute__ ((unused))

Definition at line 8 of file debug.h.


Function Documentation

void debug_backtrace ( void   ) 

Definition at line 14 of file debug.c.

References NULL, and printf().

Referenced by debug_panic().

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,
  ... 
)


Variable Documentation

void NO_RETURN

Definition at line 18 of file debug.h.


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6