dwarves_fprintf: Fix printf types on 64bit linux
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
222f0067a9
commit
1e461ec7e0
|
@ -12,6 +12,7 @@
|
|||
#include "ctf.h"
|
||||
#include "hash.h"
|
||||
#include "elf_symtab.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
static int tag__check_id_drift(const struct tag *tag,
|
||||
uint16_t core_id, uint16_t ctf_id)
|
||||
|
@ -290,7 +291,7 @@ int cu__encode_ctf(struct cu *cu, int verbose)
|
|||
if (function == NULL) {
|
||||
if (verbose)
|
||||
fprintf(stderr,
|
||||
"function %4d: %-20s %#Lx %5u NOT FOUND!\n",
|
||||
"function %4d: %-20s %#" PRIx64 " %5u NOT FOUND!\n",
|
||||
id, sym_name, addr,
|
||||
elf_sym__size(&sym));
|
||||
err = ctf__add_function(ctf, 0, 0, 0, &position);
|
||||
|
@ -333,7 +334,7 @@ int cu__encode_ctf(struct cu *cu, int verbose)
|
|||
if (var == NULL) {
|
||||
if (verbose)
|
||||
fprintf(stderr,
|
||||
"variable %4d: %-20s %#Lx %5u NOT FOUND!\n",
|
||||
"variable %4d: %-20s %#" PRIx64 " %5u NOT FOUND!\n",
|
||||
id, sym_name, addr,
|
||||
elf_sym__size(&sym));
|
||||
err = ctf__add_object(ctf, 0);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "dwarves.h"
|
||||
|
@ -725,7 +726,7 @@ static size_t struct_member__fprintf(struct class_member *member,
|
|||
|
||||
if (member->is_static) {
|
||||
if (member->const_value != 0)
|
||||
printed += fprintf(fp, " = %lld;", member->const_value);
|
||||
printed += fprintf(fp, " = %" PRIu64 ";", member->const_value);
|
||||
} else if (member->bitfield_size != 0) {
|
||||
printed += fprintf(fp, ":%u;", member->bitfield_size);
|
||||
} else {
|
||||
|
@ -1466,7 +1467,7 @@ size_t class__fprintf(struct class *class, const struct cu *cu,
|
|||
if (!cconf.emit_stats)
|
||||
goto out;
|
||||
|
||||
printed += fprintf(fp, "\n%.*s/* size: %zd, cachelines: %zd, members: %u",
|
||||
printed += fprintf(fp, "\n%.*s/* size: %d, cachelines: %zd, members: %u",
|
||||
cconf.indent, tabs,
|
||||
class__size(class),
|
||||
tag__nr_cachelines(class__tag(class), cu),
|
||||
|
|
Loading…
Reference in New Issue