Changeset 31198c12 in mainline for kernel/generic/include/panic.h


Ignore:
Timestamp:
2010-05-21T19:04:58Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5f0e39e8
Parents:
7de7cde
Message:

get rid of get_ip() and HERE (the functionality is replaced more elegantly by program_counter_get())
don't print the "caller=%p" part on assertions, rely on the stack trace
print the stack trace also in the non-debug builds (this should be helpful when dealing with external bugreports)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/panic.h

    r7de7cde r31198c12  
    4141
    4242#ifdef CONFIG_DEBUG
    43 #       define panic(format, ...) \
    44                 do { \
    45                         silent = false; \
    46                         printf("Kernel panic in %s() at %s:%u.\n", \
    47                             __func__, __FILE__, __LINE__); \
    48                         stack_trace(); \
    49                         panic_printf("Panic message: " format "\n", \
    50                             ##__VA_ARGS__);\
    51                 } while (0)
    52 #else
    53 #       define panic(format, ...) \
    54                 do { \
    55                         silent = false; \
    56                         panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \
    57                 } while (0)
    58 #endif
     43
     44#define panic(format, ...) \
     45        do { \
     46                silent = false; \
     47                printf("Kernel panic in %s() at %s:%u\n", \
     48                    __func__, __FILE__, __LINE__); \
     49                stack_trace(); \
     50                panic_printf("Panic message: " format "\n", \
     51                    ##__VA_ARGS__);\
     52        } while (0)
     53
     54#else /* CONFIG_DEBUG */
     55
     56#define panic(format, ...) \
     57        do { \
     58                silent = false; \
     59                panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \
     60                stack_trace(); \
     61        } while (0)
     62
     63#endif /* CONFIG_DEBUG */
    5964
    6065extern bool silent;
Note: See TracChangeset for help on using the changeset viewer.