public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/4] btrace: fix build fail with 32-bit BFD
@ 2015-07-08 12:54 Markus Metzger
  2015-07-08 12:54 ` [PATCH 2/4] record: set stop_pc in "record goto" command Markus Metzger
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Markus Metzger @ 2015-07-08 12:54 UTC (permalink / raw)
  To: palves; +Cc: gdb-patches

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, ^

Fix it.

2015-07-08  Markus Metzger <markus.t.metzger@intel.com>

gdb/
	* btrace.c (btrace_pt_readmem_callback): Change type of PC argument.
---
 gdb/btrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/btrace.c b/gdb/btrace.c
index b924e7d..1618e55 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;
     }
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-07-13  9:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 12:54 [PATCH 1/4] btrace: fix build fail with 32-bit BFD Markus Metzger
2015-07-08 12:54 ` [PATCH 2/4] record: set stop_pc in "record goto" command Markus Metzger
2015-07-08 13:42   ` Pedro Alves
2015-07-08 15:08     ` Metzger, Markus T
2015-07-08 15:11       ` Pedro Alves
2015-07-08 12:54 ` [PATCH 4/4] btrace, pt: support new packets Markus Metzger
2015-07-08 13:45   ` Pedro Alves
2015-07-08 12:54 ` [PATCH 3/4] ari, btrace: avoid unsigned long long Markus Metzger
2015-07-08 13:40   ` Pedro Alves
2015-07-08 14:05     ` Metzger, Markus T
2015-07-08 13:42 ` [PATCH 1/4] btrace: fix build fail with 32-bit BFD Pedro Alves
2015-07-13  7:39   ` Metzger, Markus T
2015-07-13  9:39     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).