Changeset 7f043c0 in mainline for kernel/arch/amd64/src/debugger.c


Ignore:
Timestamp:
2007-05-31T21:39:13Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7bb0c32
Parents:
d8431986
Message:

fix ICC compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/debugger.c

    rd8431986 r7f043c0  
    103103
    104104/** Print table of active breakpoints */
    105 int cmd_print_breakpoints(cmd_arg_t *argv)
     105int cmd_print_breakpoints(cmd_arg_t *argv __attribute__((unused)))
    106106{
    107107        int i;
     
    112112                if (breakpoints[i].address) {
    113113                        symbol = get_symtab_entry(breakpoints[i].address);
    114                         printf("%d. %p in %s\n",i,
     114                        printf("%d. %lx in %s\n", i,
    115115                               breakpoints[i].address, symbol);
    116116                        printf("     Count(%d) ", breakpoints[i].counter);
     
    174174/** Enable hardware breakpoint
    175175 *
    176  *
    177176 * @param where Address of HW breakpoint
    178177 * @param flags Type of breakpoint (EXECUTE, WRITE)
    179178 * @return Debug slot on success, -1 - no available HW breakpoint
    180179 */
    181 int breakpoint_add(void * where, int flags, int curidx)
     180int breakpoint_add(const void *where, const int flags, int curidx)
    182181{
    183182        ipl_t ipl;
     
    185184        bpinfo_t *cur;
    186185
    187         ASSERT( flags & (BKPOINT_INSTR | BKPOINT_WRITE | BKPOINT_READ_WRITE));
     186        ASSERT(flags & (BKPOINT_INSTR | BKPOINT_WRITE | BKPOINT_READ_WRITE));
    188187
    189188        ipl = interrupts_disable();
     
    192191        if (curidx == -1) {
    193192                /* Find free space in slots */
    194                 for (i=0; i<BKPOINTS_MAX; i++)
     193                for (i = 0; i < BKPOINTS_MAX; i++)
    195194                        if (!breakpoints[i].address) {
    196195                                curidx = i;
     
    224223
    225224#ifdef amd64
    226 # define getip(x)  ((x)->rip)
     225#       define getip(x) ((x)->rip)
    227226#else
    228 # define getip(x)  ((x)->eip)
     227#       define getip(x) ((x)->eip)
    229228#endif
    230229
     
    238237                        if (*((unative_t *) breakpoints[slot].address) != 0)
    239238                                return;
    240                         printf("**** Found ZERO on address %p ****\n",
    241                                slot, breakpoints[slot].address);
     239                        printf("**** Found ZERO on address %lx (slot %d) ****\n",
     240                                breakpoints[slot].address, slot);
    242241                } else {
    243                         printf("Data watchpoint - new data: %p\n",
     242                        printf("Data watchpoint - new data: %lx\n",
    244243                               *((unative_t *) breakpoints[slot].address));
    245244                }
    246245        }
    247         printf("Reached breakpoint %d:%p(%s)\n", slot, getip(istate),
     246        printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate),
    248247               get_symtab_entry(getip(istate)));
    249248        printf("***Type 'exit' to exit kconsole.\n");
     
    314313#endif
    315314
    316 static void debug_exception(int n, istate_t *istate)
     315static void debug_exception(int n __attribute__((unused)), istate_t *istate)
    317316{
    318317        unative_t dr6;
     
    338337
    339338#ifdef CONFIG_SMP
    340 static void debug_ipi(int n, istate_t *istate)
     339static void debug_ipi(int n __attribute__((unused)), istate_t *istate __attribute__((unused)))
    341340{
    342341        int i;
    343342
    344343        spinlock_lock(&bkpoint_lock);
    345         for (i=0; i < BKPOINTS_MAX; i++)
     344        for (i = 0; i < BKPOINTS_MAX; i++)
    346345                setup_dr(i);
    347346        spinlock_unlock(&bkpoint_lock);
Note: See TracChangeset for help on using the changeset viewer.