Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch]: Fix windows x64 build
@ 2009-02-11 14:21 Kai Tietz
  2009-02-11 14:35 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Tietz @ 2009-02-11 14:21 UTC (permalink / raw)
  To: gdb-patches

Hello,

I noticed that building of w64 was broken by a warning in gdbarch.c by 
casting a pointer to long type.

ChangeLog

2009-02-11  Kai Tietz  <kai,tietz@onevision.com>

        * gdbarch.c (gdbarch_dump): Cast via size_t to long.

Is this patch ok to apply?

Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

Index: src/gdb/gdbarch.c
===================================================================
--- src.orig/gdb/gdbarch.c      2009-02-11 10:10:10.000000000 +0100
+++ src/gdb/gdbarch.c   2009-02-11 10:10:35.462651800 +0100
@@ -842,7 +842,7 @@
                       gdbarch_get_siginfo_type_p (gdbarch));
   fprintf_unfiltered (file,
                       "gdbarch_dump: get_siginfo_type = <0x%lx>\n",
-                      (long) gdbarch->get_siginfo_type);
+                      (long) (size_t) gdbarch->get_siginfo_type);
   fprintf_unfiltered (file,
                       "gdbarch_dump: has_global_solist = %s\n",
                       plongest (gdbarch->has_global_solist));


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

* Re: [patch]: Fix windows x64 build
  2009-02-11 14:21 [patch]: Fix windows x64 build Kai Tietz
@ 2009-02-11 14:35 ` Pedro Alves
  2009-02-11 14:40   ` Kai Tietz
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2009-02-11 14:35 UTC (permalink / raw)
  To: gdb-patches; +Cc: Kai Tietz

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

On Wednesday 11 February 2009 14:21:40, Kai Tietz wrote:
> Hello,
> 
> I noticed that building of w64 was broken by a warning in gdbarch.c by 
> casting a pointer to long type.
> 
> ChangeLog
> 
> 2009-02-11  Kai Tietz  <kai,tietz@onevision.com>
> 
>         * gdbarch.c (gdbarch_dump): Cast via size_t to long.
>
> Is this patch ok to apply?

Nope, sorry, this is a generated file, see gdbarch.sh.  We need to regenerate
gdbarch.c and gdbarch.h whenever gdbarch.sh is changed, but looks like I forgot
to regenerate it to pick up the changes that make this use
host_address_to_string instead, since long is wrong for Win64.

Sorry about that.  It should be fixed now.  gdbarch.h didn't change.

-- 
Pedro Alves

[-- Attachment #2: regen.diff --]
[-- Type: text/x-diff, Size: 1027 bytes --]

2009-02-11  Pedro Alves  <pedro@codesourcery.com>

	* gdbarch.c: Regenerate.

---
 gdb/gdbarch.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: src/gdb/gdbarch.c
===================================================================
--- src.orig/gdb/gdbarch.c	2009-02-11 14:27:48.000000000 +0000
+++ src/gdb/gdbarch.c	2009-02-11 14:27:23.000000000 +0000
@@ -841,8 +841,8 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                       "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
                       gdbarch_get_siginfo_type_p (gdbarch));
   fprintf_unfiltered (file,
-                      "gdbarch_dump: get_siginfo_type = <0x%lx>\n",
-                      (long) gdbarch->get_siginfo_type);
+                      "gdbarch_dump: get_siginfo_type = <%s>\n",
+                      host_address_to_string (gdbarch->get_siginfo_type));
   fprintf_unfiltered (file,
                       "gdbarch_dump: has_global_solist = %s\n",
                       plongest (gdbarch->has_global_solist));

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

* Re: [patch]: Fix windows x64 build
  2009-02-11 14:35 ` Pedro Alves
@ 2009-02-11 14:40   ` Kai Tietz
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Tietz @ 2009-02-11 14:40 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, Kai Tietz

2009/2/11 Pedro Alves <pedro@codesourcery.com>:
> On Wednesday 11 February 2009 14:21:40, Kai Tietz wrote:
>> Hello,
>>
>> I noticed that building of w64 was broken by a warning in gdbarch.c by
>> casting a pointer to long type.
>>
>> ChangeLog
>>
>> 2009-02-11  Kai Tietz  <kai,tietz@onevision.com>
>>
>>         * gdbarch.c (gdbarch_dump): Cast via size_t to long.
>>
>> Is this patch ok to apply?
>
> Nope, sorry, this is a generated file, see gdbarch.sh.  We need to regenerate
> gdbarch.c and gdbarch.h whenever gdbarch.sh is changed, but looks like I forgot
> to regenerate it to pick up the changes that make this use
> host_address_to_string instead, since long is wrong for Win64.
>
> Sorry about that.  It should be fixed now.  gdbarch.h didn't change.
>
> --
> Pedro Alves
>

Patch works for me.

Thanks,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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

end of thread, other threads:[~2009-02-11 14:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-11 14:21 [patch]: Fix windows x64 build Kai Tietz
2009-02-11 14:35 ` Pedro Alves
2009-02-11 14:40   ` Kai Tietz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox