/* Almost all of this file can be skipped if we're not supporting LDB. */
#if defined(LISP_FEATURE_SB_LDB)
/* Almost all of this file can be skipped if we're not supporting LDB. */
#if defined(LISP_FEATURE_SB_LDB)
*
* (We could set up output to go to a special ldb_out stream for the
* same reason, but there's been no pressure for that so far.)
*
* (We could set up output to go to a special ldb_out stream for the
* same reason, but there's been no pressure for that so far.)
printf("0x%08lX: ", (unsigned long) addr);
#else
printf("0x%08X: ", (u32) addr);
#endif
if (is_valid_lisp_addr((os_vm_address_t)addr)) {
printf("0x%08lX: ", (unsigned long) addr);
#else
printf("0x%08X: ", (u32) addr);
#endif
if (is_valid_lisp_addr((os_vm_address_t)addr)) {
{
printf("CSP\t=\t0x%08lX\n", (unsigned long)current_control_stack_pointer);
printf("FP\t=\t0x%08lX\n", (unsigned long)current_control_frame_pointer);
{
printf("CSP\t=\t0x%08lX\n", (unsigned long)current_control_stack_pointer);
printf("FP\t=\t0x%08lX\n", (unsigned long)current_control_frame_pointer);
printf("TRIGGER\t=\t0x%08lx\n", (unsigned long)current_auto_gc_trigger);
#endif
printf("STATIC\t=\t0x%08lx\n",
printf("TRIGGER\t=\t0x%08lx\n", (unsigned long)current_auto_gc_trigger);
#endif
printf("STATIC\t=\t0x%08lx\n",
if (widetag_of(obj) == SIMPLE_FUN_HEADER_WIDETAG) {
print((long)addr | FUN_POINTER_LOWTAG);
} else if (lowtag_of(obj) == OTHER_IMMEDIATE_0_LOWTAG ||
if (widetag_of(obj) == SIMPLE_FUN_HEADER_WIDETAG) {
print((long)addr | FUN_POINTER_LOWTAG);
} else if (lowtag_of(obj) == OTHER_IMMEDIATE_0_LOWTAG ||
printf("DSISR:\t\t 0x%08lx\n", (unsigned long)(*os_context_register_addr(context, 42)));
#endif
printf("PC:\t\t 0x%08lx\n",
printf("DSISR:\t\t 0x%08lx\n", (unsigned long)(*os_context_register_addr(context, 42)));
#endif
printf("PC:\t\t 0x%08lx\n",
struct thread *thread=arch_os_get_current_thread();
free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread)>>2;
struct thread *thread=arch_os_get_current_thread();
free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread)>>2;
- int index;
-
- index = parse_number(ptr);
-
- if ((index >= 0) && (index < free)) {
- printf("There are %d interrupt contexts.\n", free);
- printf("printing context %d\n", index);
- print_context(thread->interrupt_contexts[index]);
- } else {
- printf("There aren't that many/few contexts.\n");
- printf("There are %d interrupt contexts.\n", free);
- }
+ int index;
+
+ index = parse_number(ptr);
+
+ if ((index >= 0) && (index < free)) {
+ printf("There are %d interrupt contexts.\n", free);
+ printf("printing context %d\n", index);
+ print_context(thread->interrupt_contexts[index]);
+ } else {
+ printf("There aren't that many/few contexts.\n");
+ printf("There are %d interrupt contexts.\n", free);
+ }
- if (free == 0)
- printf("There are no interrupt contexts!\n");
- else {
- printf("There are %d interrupt contexts.\n", free);
- printf("printing context %d\n", free - 1);
- print_context(thread->interrupt_contexts[free - 1]);
- }
+ if (free == 0)
+ printf("There are no interrupt contexts!\n");
+ else {
+ printf("There are %d interrupt contexts.\n", free);
+ printf("printing context %d\n", free - 1);
+ print_context(thread->interrupt_contexts[free - 1]);
+ }
- (unsigned long)catch, (unsigned long)(catch->current_uwp),
- (unsigned long)(catch->current_cont),
- catch->current_code,
- catch->entry_pc);
+ (unsigned long)catch, (unsigned long)(catch->current_uwp),
+ (unsigned long)(catch->current_cont),
+ catch->current_code,
+ catch->entry_pc);
- (unsigned long)catch, (unsigned long)(catch->current_uwp),
- (unsigned long)(catch->current_cont),
- (unsigned long)component_ptr_from_pc((void*)catch->entry_pc) +
- OTHER_POINTER_LOWTAG,
- (unsigned long)catch->entry_pc);
+ (unsigned long)catch, (unsigned long)(catch->current_uwp),
+ (unsigned long)(catch->current_cont),
+ (unsigned long)component_ptr_from_pc((void*)catch->entry_pc) +
+ OTHER_POINTER_LOWTAG,
+ (unsigned long)catch->entry_pc);
- ldb_in = fopen("/dev/tty","r+");
- ldb_in_fd = fileno(ldb_in);
+ ldb_in = fopen("/dev/tty","r+");
+ ldb_in_fd = fileno(ldb_in);
- if (isatty(ldb_in_fd)) {
- putchar('\n');
- continue;
- }
- else {
- fprintf(stderr, "\nEOF on something other than a tty.\n");
- exit(0);
- }
- }
+ if (isatty(ldb_in_fd)) {
+ putchar('\n');
+ continue;
+ }
+ else {
+ fprintf(stderr, "\nEOF on something other than a tty.\n");
+ exit(0);
+ }
+ }