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


Ignore:
Timestamp:
2010-11-30T00:50:25Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b2981aa
Parents:
178673c (diff), 41a7f62 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Local changes: fixed printf related warnings

File:
1 edited

Legend:

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

    r178673c rab3a851  
    126126        /* Disable breakpoint in DR7 */
    127127        unative_t dr7 = read_dr7();
    128         dr7 &= ~(0x2 << (curidx * 2));
     128        dr7 &= ~(0x02U << (curidx * 2));
    129129       
    130130        /* Setup DR register */
     
    147147               
    148148                /* Set type to requested breakpoint & length*/
    149                 dr7 &= ~(0x3 << (16 + 4 * curidx));
    150                 dr7 &= ~(0x3 << (18 + 4 * curidx));
     149                dr7 &= ~(0x03U << (16 + 4 * curidx));
     150                dr7 &= ~(0x03U << (18 + 4 * curidx));
    151151               
    152152                if (!(flags & BKPOINT_INSTR)) {
    153153#ifdef __32_BITS__
    154                         dr7 |= ((unative_t) 0x3) << (18 + 4 * curidx);
     154                        dr7 |= ((unative_t) 0x03U) << (18 + 4 * curidx);
    155155#endif
    156156                       
    157157#ifdef __64_BITS__
    158                         dr7 |= ((unative_t) 0x2) << (18 + 4 * curidx);
     158                        dr7 |= ((unative_t) 0x02U) << (18 + 4 * curidx);
    159159#endif
    160160                       
    161161                        if ((flags & BKPOINT_WRITE))
    162                                 dr7 |= ((unative_t) 0x1) << (16 + 4 * curidx);
     162                                dr7 |= ((unative_t) 0x01U) << (16 + 4 * curidx);
    163163                        else if ((flags & BKPOINT_READ_WRITE))
    164                                 dr7 |= ((unative_t) 0x3) << (16 + 4 * curidx);
     164                                dr7 |= ((unative_t) 0x03U) << (16 + 4 * curidx);
    165165                }
    166166               
    167167                /* Enable global breakpoint */
    168                 dr7 |= 0x2 << (curidx * 2);
     168                dr7 |= 0x02U << (curidx * 2);
    169169               
    170170                write_dr7(dr7);
     
    230230                                return;
    231231                       
    232                         printf("*** Found ZERO on address %" PRIp " (slot %d) ***\n",
    233                             breakpoints[slot].address, slot);
     232                        printf("*** Found ZERO on address %p (slot %d) ***\n",
     233                            (void *) breakpoints[slot].address, slot);
    234234                } else {
    235                         printf("Data watchpoint - new data: %" PRIp "\n",
     235                        printf("Data watchpoint - new data: %#" PRIxn "\n",
    236236                            *((unative_t *) breakpoints[slot].address));
    237237                }
    238238        }
    239239       
    240         printf("Reached breakpoint %d:%" PRIp " (%s)\n", slot, getip(istate),
    241             symtab_fmt_name_lookup(getip(istate)));
     240        printf("Reached breakpoint %d:%p (%s)\n", slot,
     241            (void *) getip(istate), symtab_fmt_name_lookup(getip(istate)));
    242242       
    243243#ifdef CONFIG_KCONSOLE
     
    363363                       
    364364#ifdef __32_BITS__
    365                         printf("%-4u %7" PRIs " %p %s\n", i,
    366                             breakpoints[i].counter, breakpoints[i].address,
     365                        printf("%-4u %7zu %p %s\n", i,
     366                            breakpoints[i].counter, (void *) breakpoints[i].address,
    367367                            symbol);
    368368#endif
    369369                       
    370370#ifdef __64_BITS__
    371                         printf("%-4u %7" PRIs " %p %s\n", i,
    372                             breakpoints[i].counter, breakpoints[i].address,
     371                        printf("%-4u %7zu %p %s\n", i,
     372                            breakpoints[i].counter, (void *) breakpoints[i].address,
    373373                            symbol);
    374374#endif
     
    405405                flags = BKPOINT_WRITE;
    406406       
    407         printf("Adding breakpoint on address: %p\n", argv->intval);
    408        
    409         int id = breakpoint_add((void *)argv->intval, flags, -1);
     407        printf("Adding breakpoint on address: %p\n",
     408            (void *) argv->intval);
     409       
     410        int id = breakpoint_add((void *) argv->intval, flags, -1);
    410411        if (id < 0)
    411412                printf("Add breakpoint failed.\n");
Note: See TracChangeset for help on using the changeset viewer.