Changeset 9279


Ignore:
Timestamp:
Apr 25, 2008, 9:11:19 AM (11 years ago)
Author:
gb
Message:

Suppress some compiler warnings, maybe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/lisp-kernel/lisp-debug.c

    r8802 r9279  
    413413  fprintf(stderr,"------\n");
    414414  if (tag_of(xpGPR(xp,Inargs)) == tag_fixnum) {
    415     fprintf(stderr,"%%cx (nargs) = %d (maybe)\n", unbox_fixnum(xpGPR(xp,Inargs)&0xffff));
     415    fprintf(stderr,"%%cx (nargs) = %lld (maybe)\n", unbox_fixnum(xpGPR(xp,Inargs)&0xffff));
    416416  }
    417417#endif
     
    513513{
    514514  char *pname = debug_get_string_value("symbol name");
     515  extern void *plsym(ExceptionInformation *,char*);
    515516 
    516517  if (pname != NULL) {
     
    528529    area *vs_area = tcr->vs_area, *cs_area = tcr->cs_area;
    529530
    530     fprintf(stderr, "Current Thread Context Record (tcr) = 0x%lx\n", tcr);
    531     fprintf(stderr, "Control (C) stack area:  low = 0x%lx, high = 0x%lx\n",
     531    fprintf(stderr, "Current Thread Context Record (tcr) = 0x%Ix\n", (natural)tcr);
     532    fprintf(stderr, "Control (C) stack area:  low = 0x%Ix, high = 0x%Ix\n",
    532533            cs_area->low, cs_area->high);
    533     fprintf(stderr, "Value (lisp) stack area: low = 0x%lx, high = 0x%lx\n",
     534    fprintf(stderr, "Value (lisp) stack area: low = 0x%Ix, high = 0x%Ix\n",
    534535            vs_area->low, vs_area->high);
    535     fprintf(stderr, "Exception stack pointer = 0x%lx\n",
     536    fprintf(stderr, "Exception stack pointer = 0x%Ix\n",
    536537#ifdef PPC
    537538            xpGPR(xp,1)
     
    546547     
    547548
    548 #ifdef WINDOWS
    549 debug_command_return
    550 debug_set_gpr(ExceptionInformation *xp, siginfo_t *info, int arg)
    551 {
    552 }
    553 #else
    554549debug_command_return
    555550debug_set_gpr(ExceptionInformation *xp, siginfo_t *info, int arg)
     
    560555  sprintf(buf, "value for GPR %d", arg);
    561556  val = debug_get_natural_value(buf);
    562   set_xpGPR(xp, arg, val);
     557  xpGPR(xp,arg) = val;
    563558  return debug_continue;
    564559}
    565 #endif
    566560
    567561debug_command_return
    568562debug_show_registers(ExceptionInformation *xp, siginfo_t *info, int arg)
    569563{
     564
     565#ifdef PPC
    570566  int a, b, c, d, i;
    571 
    572 #ifdef PPC
    573567#ifdef PPC64
    574568  for (a = 0, b = 16; a < 16; a++, b++) {
     
    602596
    603597#ifdef X8664
    604   fprintf(stderr,"%rax = 0x%016llX      %r8  = 0x%016llX\n", xpGPR(xp,REG_RAX),xpGPR(xp,REG_R8));
    605   fprintf(stderr,"%rcx = 0x%016llX      %r9  = 0x%016llX\n", xpGPR(xp,REG_RCX),xpGPR(xp,REG_R9));
    606   fprintf(stderr,"%rdx = 0x%016llX      %r10 = 0x%016llX\n", xpGPR(xp,REG_RDX),xpGPR(xp,REG_R10));
    607   fprintf(stderr,"%rbx = 0x%016llX      %r11 = 0x%016llX\n", xpGPR(xp,REG_RBX),xpGPR(xp,REG_R11));
    608   fprintf(stderr,"%rsp = 0x%016llX      %r12 = 0x%016llX\n", xpGPR(xp,REG_RSP),xpGPR(xp,REG_R12));
    609   fprintf(stderr,"%rbp = 0x%016llX      %r13 = 0x%016llX\n", xpGPR(xp,REG_RBP),xpGPR(xp,REG_R13));
    610   fprintf(stderr,"%rsi = 0x%016llX      %r14 = 0x%016llX\n", xpGPR(xp,REG_RSI),xpGPR(xp,REG_R14));
    611   fprintf(stderr,"%rdi = 0x%016llX      %r15 = 0x%016llX\n", xpGPR(xp,REG_RDI),xpGPR(xp,REG_R15));
    612   fprintf(stderr,"%rip = 0x%016llX   %rflags = 0x%016lX\n",
     598  fprintf(stderr,"%%rax = 0x%016llX      %%r8  = 0x%016llX\n", xpGPR(xp,REG_RAX),xpGPR(xp,REG_R8));
     599  fprintf(stderr,"%%rcx = 0x%016llX      %%r9  = 0x%016llX\n", xpGPR(xp,REG_RCX),xpGPR(xp,REG_R9));
     600  fprintf(stderr,"%%rdx = 0x%016llX      %%r10 = 0x%016llX\n", xpGPR(xp,REG_RDX),xpGPR(xp,REG_R10));
     601  fprintf(stderr,"%%rbx = 0x%016llX      %%r11 = 0x%016llX\n", xpGPR(xp,REG_RBX),xpGPR(xp,REG_R11));
     602  fprintf(stderr,"%%rsp = 0x%016llX      %%r12 = 0x%016llX\n", xpGPR(xp,REG_RSP),xpGPR(xp,REG_R12));
     603  fprintf(stderr,"%%rbp = 0x%016llX      %%r13 = 0x%016llX\n", xpGPR(xp,REG_RBP),xpGPR(xp,REG_R13));
     604  fprintf(stderr,"%%rsi = 0x%016llX      %%r14 = 0x%016llX\n", xpGPR(xp,REG_RSI),xpGPR(xp,REG_R14));
     605  fprintf(stderr,"%%rdi = 0x%016llX      %%r15 = 0x%016llX\n", xpGPR(xp,REG_RDI),xpGPR(xp,REG_R15));
     606  fprintf(stderr,"%%rip = 0x%016llX   %%rflags = 0x%016lX\n",
    613607          xpGPR(xp, Iip), eflags_register(xp));
    614608#endif
     
    827821    c = toupper(c);
    828822
    829     for (entry = debug_command_entries; f = entry->f; entry++) {
     823    for (entry = debug_command_entries; (f = entry->f) != NULL; entry++) {
    830824      if (toupper(entry->c) == c) {
    831825        /* If we have an XP or don't need one, call the function */
     
    850844}
    851845
     846void
    852847debug_identify_function(ExceptionInformation *xp, siginfo_t *info)
    853848{
     
    911906  while (state == debug_continue) {
    912907#ifdef WINDOWS
    913     fprintf(stderr, "[%d] OpenMCL kernel debugger: ", GetCurrentProcessId());
     908    fprintf(stderr, "[%d] OpenMCL kernel debugger: ", (int)GetCurrentProcessId());
    914909#else
    915910    fprintf(stderr, "[%d] OpenMCL kernel debugger: ", main_thread_pid);
     
    930925  case debug_kill:
    931926    terminate_lisp();
     927  default:
     928    return 0;
    932929  }
    933930}
Note: See TracChangeset for help on using the changeset viewer.