Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 33f86a3 in mainline


Ignore:
Timestamp:
2017-10-10T18:21:17Z (4 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master
Children:
a4fb8d60
Parents:
c46bfbc
Message:

Add PRI*PTR macros and correct a few printfs.

Files:
13 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/interrupt.c

    rc46bfbc r33f86a3  
    8585       
    8686        printf("esi=%0#10" PRIx32 "\tedi=%0#10" PRIx32 "\t"
    87             "ebp=%0#10" PRIx32 "\tesp=%0#10" PRIx32 "\n",
     87            "ebp=%0#10" PRIx32 "\tesp=%0#10" PRIxn "\n",
    8888            istate->esi, istate->edi, istate->ebp,
    8989            istate_from_uspace(istate) ? istate->esp :
  • uspace/lib/c/arch/abs32le/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_abs32le_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId32  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu32  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx32  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId32  /**< Format for native_t. */
    3741#define PRIun  PRIu32  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/amd64/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_amd64_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId64  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu64  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx64  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId64  /**< Format for native_t. */
    3741#define PRIun  PRIu64  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/arm32/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_arm32_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId32  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu32  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx32  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId32  /**< Format for native_t. */
    3741#define PRIun  PRIu32  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/ia32/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_ia32_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId32  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu32  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx32  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId32  /**< Format for native_t. */
    3741#define PRIun  PRIu32  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    rc46bfbc r33f86a3  
    3737#include <stdio.h>
    3838#include <stdlib.h>
     39#include <inttypes.h>
    3940
    4041#include <libarch/rtld/elf_dyn.h>
     
    7980        str_tab = m->dyn.str_tab;
    8081
    81         DPRINTF("address: 0x%x, entries: %d\n", (uintptr_t)rt, rt_entries);
     82        DPRINTF("address: 0x%" PRIxPTR ", entries: %zd\n", (uintptr_t)rt, rt_entries);
    8283       
    8384        for (i = 0; i < rt_entries; ++i) {
  • uspace/lib/c/arch/ia64/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_ia64_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId64  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu64  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx64  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId64  /**< Format for native_t. */
    3741#define PRIun  PRIu64  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/mips32/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_mips32_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId32  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu32  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx32  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId32  /**< Format for native_t. */
    3741#define PRIun  PRIu32  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/ppc32/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_ppc32_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId32  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu32  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx32  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId32  /**< Format for native_t. */
    3741#define PRIun  PRIu32  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/riscv64/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_riscv64_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId64  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu64  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx64  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId64  /**< Format for native_t. */
    3741#define PRIun  PRIu64  /**< Format for sysarg_t. */
  • uspace/lib/c/arch/sparc64/include/libarch/inttypes.h

    rc46bfbc r33f86a3  
    3434#define LIBC_sparc64_INTTYPES_H_
    3535
     36#define PRIdPTR  PRId64  /**< Format for intptr_t. */
     37#define PRIuPTR  PRIu64  /**< Format for uintptr_t. */
     38#define PRIxPTR  PRIx64  /**< Format for hexadecimal uintptr_t. */
     39
    3640#define PRIdn  PRId64  /**< Format for native_t. */
    3741#define PRIun  PRIu64  /**< Format for sysarg_t. */
  • uspace/lib/c/generic/rtld/dynamic.c

    rc46bfbc r33f86a3  
    3636
    3737#include <stdio.h>
     38#include <inttypes.h>
    3839
    3940#include <rtld/elf_dyn.h>
     
    105106        info->dynamic = dyn_ptr;
    106107
    107         DPRINTF("str_tab=0x%x, soname_idx=0x%x, soname=0x%x\n",
     108        DPRINTF("str_tab=0x%" PRIxPTR ", soname_idx=0x%x, soname=0x%" PRIxPTR "\n",
    108109                (uintptr_t)info->soname, soname_idx, (uintptr_t)info->soname);
    109110        DPRINTF("soname='%s'\n", info->soname);
    110111        DPRINTF("rpath='%s'\n", info->rpath);
    111         DPRINTF("hash=0x%x\n", (uintptr_t)info->hash);
    112         DPRINTF("dt_rela=0x%x\n", (uintptr_t)info->rela);
    113         DPRINTF("dt_rela_sz=0x%x\n", (uintptr_t)info->rela_sz);
    114         DPRINTF("dt_rel=0x%x\n", (uintptr_t)info->rel);
    115         DPRINTF("dt_rel_sz=0x%x\n", (uintptr_t)info->rel_sz);
     112        DPRINTF("hash=0x%" PRIxPTR "\n", (uintptr_t)info->hash);
     113        DPRINTF("dt_rela=0x%" PRIxPTR "\n", (uintptr_t)info->rela);
     114        DPRINTF("dt_rela_sz=0x%" PRIxPTR "\n", (uintptr_t)info->rela_sz);
     115        DPRINTF("dt_rel=0x%" PRIxPTR "\n", (uintptr_t)info->rel);
     116        DPRINTF("dt_rel_sz=0x%" PRIxPTR "\n", (uintptr_t)info->rel_sz);
    116117
    117118        /*
  • uspace/lib/c/generic/rtld/module.c

    rc46bfbc r33f86a3  
    192192
    193193        DPRINTF("filename:'%s'\n", name_buf);
    194         DPRINTF("load '%s' at 0x%x\n", name_buf, m->bias);
     194        DPRINTF("load '%s' at 0x%zx\n", name_buf, m->bias);
    195195
    196196        rc = elf_load_file_name(name_buf, m->bias, ELDF_RW, &info);
Note: See TracChangeset for help on using the changeset viewer.