From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/win32] Change the DLL base address type to LPVOID
Date: Wed, 07 Jan 2009 11:46:00 -0000 [thread overview]
Message-ID: <20090107114620.GE1751@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
This patch changes the type used to manipulate the DLL base address from
DWORD to LPVOID. The Windows headers declare this address as an LPVOID,
and using DWORD causes problems on x86_64-windows because the types do
not have the same size.
2009-01-07 Joel Brobecker <brobecker@adacore.com>
* win32-nat.c (get_module_name): Change the type of parameter
"base_address" to LPVOID. Remove unnecessary cast.
(struct lm_info): Change type of load_addr to LPVOID.
(win32_make_so): Change the type of parameter "load_addr"
to LPVOID. Remove some unnecessary casts.
(handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
(win32_xfer_shared_libraries): Add missing cast.
Tested on x86-windows.
OK to apply?
Thanks,
--
Joel
[-- Attachment #2: farproc.diff --]
[-- Type: text/plain, Size: 1677 bytes --]
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 1b15dfb..5300731 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1600,11 +1600,11 @@ has_detach_ability (void)
if (kernel32)
{
if (!kernel32_DebugSetProcessKillOnExit)
- kernel32_DebugSetProcessKillOnExit = GetProcAddress (kernel32,
- "DebugSetProcessKillOnExit");
+ kernel32_DebugSetProcessKillOnExit =
+ (void *) GetProcAddress (kernel32, "DebugSetProcessKillOnExit");
if (!kernel32_DebugActiveProcessStop)
- kernel32_DebugActiveProcessStop = GetProcAddress (kernel32,
- "DebugActiveProcessStop");
+ kernel32_DebugActiveProcessStop =
+ (void *) GetProcAddress (kernel32, "DebugActiveProcessStop");
if (kernel32_DebugSetProcessKillOnExit
&& kernel32_DebugActiveProcessStop)
return 1;
@@ -1641,13 +1641,14 @@ set_process_privilege (const char *privilege, BOOL enable)
if (!(advapi32 = LoadLibrary ("advapi32.dll")))
goto out;
if (!OpenProcessToken)
- OpenProcessToken = GetProcAddress (advapi32, "OpenProcessToken");
+ OpenProcessToken =
+ (void *) GetProcAddress (advapi32, "OpenProcessToken");
if (!LookupPrivilegeValue)
- LookupPrivilegeValue = GetProcAddress (advapi32,
- "LookupPrivilegeValueA");
+ LookupPrivilegeValue =
+ (void *) GetProcAddress (advapi32, "LookupPrivilegeValueA");
if (!AdjustTokenPrivileges)
- AdjustTokenPrivileges = GetProcAddress (advapi32,
- "AdjustTokenPrivileges");
+ AdjustTokenPrivileges =
+ (void *) GetProcAddress (advapi32, "AdjustTokenPrivileges");
if (!OpenProcessToken || !LookupPrivilegeValue || !AdjustTokenPrivileges)
{
advapi32 = NULL;
next reply other threads:[~2009-01-07 11:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 11:46 Joel Brobecker [this message]
2009-01-07 14:43 ` Jan Kratochvil
2009-01-07 17:04 ` Christopher Faylor
2009-01-09 10:55 ` Joel Brobecker
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=20090107114620.GE1751@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