From: PAUL GILLIAM <pgilliam@us.ibm.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [patch] Can't build ppc32 GDB
Date: Tue, 25 Apr 2006 00:22:00 -0000 [thread overview]
Message-ID: <1145924593.18934.48.camel@dufur.beaverton.ibm.com> (raw)
In-Reply-To: <1145924338.18934.45.camel@dufur.beaverton.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]
Darn! I forgot to 'trim' the patch'.
I have attached the 'trimmed' version.
-=# Paul #=-
On Mon, 2006-04-24 at 17:18 -0700, PAUL GILLIAM wrote:
> I don't know if all ppc systems have this problem. But on a PowerPC-64
> system, I get the following when I try to build a 32-bit gdb:
>
> gcc -c -g -O2 -mminimal-toc -I. -I.././gdb -I.././gdb/config
> -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
> -I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd
> -I.././gdb/../bfd -I.././gdb/../include -I../intl -I.././gdb/../intl
> -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs
> -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral
> -Wunused-label -Wunused-function -Wno-pointer-sign -Wuninitialized
> -Werror ppc-linux-nat.c
> cc1: warnings being treated as errors
> ppc-linux-nat.c: In function âfetch_registerâ:
> ppc-linux-nat.c:396: warning: cast to pointer from integer of different
> size
> ppc-linux-nat.c: In function âstore_registerâ:
> ppc-linux-nat.c:691: warning: cast to pointer from integer of different
> size
> ppc-linux-nat.c: In function âppc_linux_stopped_by_watchpointâ:
> ppc-linux-nat.c:904: warning: cast from pointer to integer of different
> size
> make: *** [ppc-linux-nat.o] Error 1
>
>
> So as a starting point, I have attached a patch that gets rid of the
> warnings.
>
> OK to commit? (not expecting a 'yes', but you never know unless you ask
> 8-)
>
> -=# Paul #=-
>
>
[-- Attachment #2: cast.diff --]
[-- Type: text/x-patch, Size: 1163 bytes --]
Index: ppc-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
retrieving revision 1.60
diff -a -u -r1.60 ppc-linux-nat.c
--- ppc-linux-nat.c 24 Mar 2006 23:08:16 -0000 1.60
+++ ppc-linux-nat.c 25 Apr 2006 00:10:12 -0000
@@ -393,7 +393,7 @@
{
errno = 0;
*(PTRACE_XFER_TYPE *) & buf[bytes_transferred]
- = ptrace (PT_READ_U, tid, (PTRACE_ARG3_TYPE) regaddr, 0);
+ = ptrace (PT_READ_U, tid, (PTRACE_ARG3_TYPE) (long) regaddr, 0);
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
{
@@ -688,7 +688,7 @@
for (i = 0; i < bytes_to_transfer; i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
- ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
+ ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) (long) regaddr,
*(PTRACE_XFER_TYPE *) & buf[i]);
regaddr += sizeof (PTRACE_XFER_TYPE);
@@ -901,7 +901,7 @@
(siginfo.si_code & 0xffff) != 0x0004)
return 0;
- last_stopped_data_address = (CORE_ADDR) siginfo.si_addr;
+ last_stopped_data_address = (CORE_ADDR) (long) siginfo.si_addr;
return 1;
}
next prev parent reply other threads:[~2006-04-25 0:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 0:18 PAUL GILLIAM
2006-04-25 0:22 ` PAUL GILLIAM [this message]
2006-04-25 19:38 ` Mark Kettenis
2006-05-03 23:32 ` PAUL GILLIAM
2006-05-04 7:12 ` Mark Kettenis
2006-05-05 16:30 ` Daniel Jacobowitz
2006-05-05 16:50 ` Mark Kettenis
2006-05-05 18:31 ` PAUL GILLIAM
2006-05-05 19:55 ` Mark Kettenis
2006-05-05 20:18 ` PAUL GILLIAM
2006-05-05 20:21 ` PAUL GILLIAM
2006-05-05 20:29 ` Mark Kettenis
2006-05-05 20:47 ` PAUL GILLIAM
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=1145924593.18934.48.camel@dufur.beaverton.ibm.com \
--to=pgilliam@us.ibm.com \
--cc=gdb-patches@sources.redhat.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