From: Markus Metzger Date: Tue, 7 Jul 2015 11:54:34 +0000 (+0200) Subject: btrace: fix build fail with 32-bit BFD X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80a2b330f7e719cd851242d6f976719586fb9295;p=binutils-gdb.git btrace: fix build fail with 32-bit BFD When compiling GDB with 32-bit BFD, the build fails with: In file included from btrace.h:33:0, from btrace.c:23: /usr/include/intel-pt.h:1643:51: note: expected 'int (*)(uint8_t *, size_t, const struct pt_asid *, uint64_t, void *)' but argument is of type 'int (*)(gdb_byte *, size_t, const struct pt_asid *, CORE_ADDR, void *)' extern pt_export int pt_image_set_callback(struct pt_image *image, ^ gdb/ * btrace.c (btrace_pt_readmem_callback): Change type of PC argument. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8a971e59d42..1fcf223df28 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-07-09 Markus Metzger + + * btrace.c (btrace_pt_readmem_callback): Change type of PC argument. + 2015-07-08 Simon Marchi * progspace.c (delete_program_space): Add missing spaces. diff --git a/gdb/btrace.c b/gdb/btrace.c index b924e7de6a9..1618e55f664 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -824,14 +824,14 @@ ftrace_add_pt (struct pt_insn_decoder *decoder, static int btrace_pt_readmem_callback (gdb_byte *buffer, size_t size, - const struct pt_asid *asid, CORE_ADDR pc, + const struct pt_asid *asid, uint64_t pc, void *context) { int errcode; TRY { - errcode = target_read_code (pc, buffer, size); + errcode = target_read_code ((CORE_ADDR) pc, buffer, size); if (errcode != 0) return -pte_nomap; }