Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/windows] cast of address to DWORD warning (handle_unload_dll)
Date: Wed, 14 Jan 2009 03:42:00 -0000	[thread overview]
Message-ID: <20090114034202.GF31296@adacore.com> (raw)

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

Hi Chris,

This is one last case of a conversion of an address to an integer
type whose size doesn't match on Windows64. I missed this one previously
because the sources used by AdaCore don't produce this error message[1].

Other than that, I verified that a clean checkout of the sources
allow us to build GDB on Vista64 with no warning. What's left to do
is to add the last necessary bits to allow this port to be built
as a target only, and then announce the port in the NEWS file...

2009-11-14  Joel Brobecker  <brobecker@adacore.com>

        * windows-nat.c (handle_unload_dll): Use host_address to string
        in order to print the base address of the DLL that was unloaded.

This one is hard to test, because it's supposed to never happen.
So I tested it by, ahem, visual inspection (I learnt that expression
at my first job, where we were producing safety critical software).

Thanks,
-- 
Joel

[-- Attachment #2: handle_unload.diff --]
[-- Type: text/plain, Size: 395 bytes --]

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 724c18f..43b3d3d 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -761,7 +761,8 @@ handle_unload_dll (void *dummy)
 	return 1;
       }
 
-  error (_("Error: dll starting at 0x%lx not found."), (DWORD) lpBaseOfDll);
+  error (_("Error: dll starting at %s not found."),
+	 host_address_to_string (lpBaseOfDll));
 
   return 0;
 }

             reply	other threads:[~2009-01-14  3:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14  3:42 Joel Brobecker [this message]
2009-01-14  4:24 ` Christopher Faylor
2009-01-14  4:47   ` Joel Brobecker
2009-01-14  4:52     ` Christopher Faylor
2009-01-14  5:24       ` Joel Brobecker
2009-01-14 15:05         ` Christopher Faylor

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=20090114034202.GF31296@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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