From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: ken@linux.vnet.ibm.com (Ken Werner), gdb-patches@sourceware.org
Subject: Re: [patch, spu] Detect OpenCL program executables
Date: Fri, 25 Jun 2010 22:04:00 -0000 [thread overview]
Message-ID: <201006252204.o5PM40i4019435@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20100625200421.GA25517@host0.dyn.jankratochvil.net> from "Jan Kratochvil" at Jun 25, 2010 10:04:21 PM
Jan Kratochvil wrote:
> On 32bit hosts with --enable-64-bit-bfd --enable-targets=all it causes:
>
> solib-spu.c: In function 'append_ocl_sos':
> solib-spu.c:130: error: format '%lx' expects type 'long unsigned int', but argument 4 has type 'CORE_ADDR'
Oops, sorry for overlooking that.
Fixed by using hex_string just like in spu_current_sos.
Tested on powerpc64-linux, committed to mainline.
Bye,
Ulrich
ChangeLog:
* solib-spu.c (append_ocl_sos): Fix xsnprintf statement for
hosts where CORE_ADDR is long long.
Index: gdb/solib-spu.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-spu.c,v
retrieving revision 1.11
diff -u -p -r1.11 solib-spu.c
--- gdb/solib-spu.c 25 Jun 2010 17:39:56 -0000 1.11
+++ gdb/solib-spu.c 25 Jun 2010 20:40:57 -0000
@@ -126,8 +126,9 @@ append_ocl_sos (struct so_list **link_pt
new = XZALLOC (struct so_list);
/* Encode FD and object ID in path name. */
- xsnprintf (new->so_name, sizeof new->so_name, "@0x%lx <%d>",
- data, SPUADDR_SPU (*ocl_program_addr_base));
+ xsnprintf (new->so_name, sizeof new->so_name, "@%s <%d>",
+ hex_string (data),
+ SPUADDR_SPU (*ocl_program_addr_base));
strcpy (new->so_original_name, new->so_name);
*link_ptr = new;
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
prev parent reply other threads:[~2010-06-25 22:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 13:56 Ken Werner
2010-06-25 17:41 ` Ulrich Weigand
2010-06-25 20:04 ` Jan Kratochvil
2010-06-25 22:04 ` Ulrich Weigand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201006252204.o5PM40i4019435@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=ken@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox