* [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
@ 2009-01-10 9:09 Joel Brobecker
2009-01-10 16:51 ` Christopher Faylor
0 siblings, 1 reply; 14+ messages in thread
From: Joel Brobecker @ 2009-01-10 9:09 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Hello,
This patch moves the win32_xfer_shared_library function to a file
that is not specific to the target CPU. I introduced win32-tdep,
to follow the naming scheme used by win32-nat, even though these
file can also work on 64bit windows.
2009-01-10 Joel Brobecker <brobecker@adacore.com>
* win32-tdep.h, win32-tdep.c: New files.
* i386-cygwin-tdep.h: Delete.
* i386-cygwin-tdep.c: Include win32-tdep.h instead of
i386-cygwin-tdep.h.
(win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
* win32-nat.c: Likewise.
* configure.tgt: Add win32-tdep.o to the list of target object
files for i386-cygwin and i386-mingw targets.
Tested on x86-windows. OK to apply?
Thank you,
--
Joel
[-- Attachment #2: solib_ops.diff --]
[-- Type: text/plain, Size: 6051 bytes --]
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index b9cd21b..f2b8ffb 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -201,13 +201,13 @@ i[34567]86-*-gnu*)
i[34567]86-*-cygwin*)
# Target: Intel 386 running win32
gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
- solib-target.o corelow.o"
+ solib-target.o corelow.o win32-tdep.o"
build_gdbserver=yes
;;
i[34567]86-*-mingw32*)
# Target: Intel 386 running win32
gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
- solib-target.o corelow.o"
+ solib-target.o corelow.o win32-tdep.o"
build_gdbserver=yes
;;
i[34567]86-*-*)
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index 3457cf2..d639f5b 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -21,7 +21,7 @@
#include "osabi.h"
#include "gdb_string.h"
#include "i386-tdep.h"
-#include "i386-cygwin-tdep.h"
+#include "win32-tdep.h"
#include "regset.h"
#include "gdb_obstack.h"
#include "xml-support.h"
@@ -111,24 +111,6 @@ i386_win32_regset_from_core_section (struct gdbarch *gdbarch,
return NULL;
}
-void
-win32_xfer_shared_library (const char* so_name, CORE_ADDR load_addr,
- struct obstack *obstack)
-{
- char *p;
- obstack_grow_str (obstack, "<library name=\"");
- p = xml_escape_text (so_name);
- obstack_grow_str (obstack, p);
- xfree (p);
- obstack_grow_str (obstack, "\"><segment address=\"0x");
- /* The symbols in a dll are offset by 0x1000, which is the the
- offset from 0 of the first byte in an image - because of the file
- header and the section alignment. */
- p = paddr_nz (load_addr + 0x1000);
- obstack_grow_str (obstack, p);
- obstack_grow_str (obstack, "\"/></library>");
-}
-
struct cpms_data
{
struct obstack *obstack;
diff --git a/gdb/i386-cygwin-tdep.h b/gdb/i386-cygwin-tdep.h
deleted file mode 100644
index f3d9997..0000000
--- a/gdb/i386-cygwin-tdep.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Target-dependent code for Cygwin running on i386's, for GDB.
-
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef I386_CYGWIN_TDEP_H
-#define I386_CYGWIN_TDEP_H
-
-struct obstack;
-
-extern void win32_xfer_shared_library (const char* so_name,
- CORE_ADDR load_addr,
- struct obstack *obstack);
-
-#endif /* I386_CYGWIN_TDEP_H */
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 286f1f9..9a1a28c 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -60,7 +60,7 @@
#include "i386-tdep.h"
#include "i387-tdep.h"
-#include "i386-cygwin-tdep.h"
+#include "win32-tdep.h"
#include "win32-nat.h"
static struct target_ops win32_ops;
diff --git a/gdb/win32-tdep.c b/gdb/win32-tdep.c
new file mode 100644
index 0000000..1a4bae8
--- /dev/null
+++ b/gdb/win32-tdep.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "defs.h"
+#include "win32-tdep.h"
+#include "gdb_obstack.h"
+#include "xml-support.h"
+
+void
+win32_xfer_shared_library (const char* so_name, CORE_ADDR load_addr,
+ struct obstack *obstack)
+{
+ char *p;
+ obstack_grow_str (obstack, "<library name=\"");
+ p = xml_escape_text (so_name);
+ obstack_grow_str (obstack, p);
+ xfree (p);
+ obstack_grow_str (obstack, "\"><segment address=\"0x");
+ /* The symbols in a dll are offset by 0x1000, which is the the
+ offset from 0 of the first byte in an image - because of the file
+ header and the section alignment. */
+ p = paddr_nz (load_addr + 0x1000);
+ obstack_grow_str (obstack, p);
+ obstack_grow_str (obstack, "\"/></library>");
+}
+
+
diff --git a/gdb/win32-tdep.h b/gdb/win32-tdep.h
new file mode 100644
index 0000000..a38aa33
--- /dev/null
+++ b/gdb/win32-tdep.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef WIN32_TDEP_H
+#define WIN32_TDEP_H
+
+struct obstack;
+
+extern void win32_xfer_shared_library (const char* so_name,
+ CORE_ADDR load_addr,
+ struct obstack *obstack);
+
+#endif
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-10 9:09 [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep Joel Brobecker
@ 2009-01-10 16:51 ` Christopher Faylor
2009-01-11 4:19 ` Joel Brobecker
0 siblings, 1 reply; 14+ messages in thread
From: Christopher Faylor @ 2009-01-10 16:51 UTC (permalink / raw)
To: gdb-patches, Joel Brobecker
On Sat, Jan 10, 2009 at 01:08:43PM +0400, Joel Brobecker wrote:
>Hello,
>
>This patch moves the win32_xfer_shared_library function to a file
>that is not specific to the target CPU. I introduced win32-tdep,
>to follow the naming scheme used by win32-nat, even though these
>file can also work on 64bit windows.
If this file can work on 64 bit windows then it seems like it should be
renamed to something more generic rather than potentially duplicating
the same code in two places.
Should win32-nat.c just be renamed to windows-nat.c?
(I assume that RMS will be happy to see the "win" part go away anyway)
cgf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-10 16:51 ` Christopher Faylor
@ 2009-01-11 4:19 ` Joel Brobecker
2009-01-11 4:24 ` Christopher Faylor
0 siblings, 1 reply; 14+ messages in thread
From: Joel Brobecker @ 2009-01-11 4:19 UTC (permalink / raw)
To: gdb-patches
> >This patch moves the win32_xfer_shared_library function to a file
> >that is not specific to the target CPU. I introduced win32-tdep,
> >to follow the naming scheme used by win32-nat, even though these
> >file can also work on 64bit windows.
>
> If this file can work on 64 bit windows then it seems like it should be
> renamed to something more generic rather than potentially duplicating
> the same code in two places.
>
> Should win32-nat.c just be renamed to windows-nat.c?
I think this would be a good idea. Same for win32-tdep.
I suggest I commit the two remaining patches as is, and then do
the move as a separate step. That way, I don't have to rework
the patches after the move is done.
In terms of the move itself, how do we want it to be done.
CVS doesn't support moves per se. Usually, in my own little CVS
repos where I don't use branches, I do a "mv" inside the CVS
repository. But I know that this brings its own problems.
Should we use "cvs remove + cvs add"?
--
Joel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-11 4:19 ` Joel Brobecker
@ 2009-01-11 4:24 ` Christopher Faylor
2009-01-11 6:29 ` Daniel Jacobowitz
2009-01-11 13:22 ` Joel Brobecker
0 siblings, 2 replies; 14+ messages in thread
From: Christopher Faylor @ 2009-01-11 4:24 UTC (permalink / raw)
To: gdb-patches, Joel Brobecker
On Sun, Jan 11, 2009 at 08:18:48AM +0400, Joel Brobecker wrote:
>> >This patch moves the win32_xfer_shared_library function to a file
>> >that is not specific to the target CPU. I introduced win32-tdep,
>> >to follow the naming scheme used by win32-nat, even though these
>> >file can also work on 64bit windows.
>>
>> If this file can work on 64 bit windows then it seems like it should be
>> renamed to something more generic rather than potentially duplicating
>> the same code in two places.
>>
>> Should win32-nat.c just be renamed to windows-nat.c?
>
>I think this would be a good idea. Same for win32-tdep.
>
>I suggest I commit the two remaining patches as is, and then do
>the move as a separate step. That way, I don't have to rework
>the patches after the move is done.
That's fine.
>In terms of the move itself, how do we want it to be done.
>CVS doesn't support moves per se. Usually, in my own little CVS
>repos where I don't use branches, I do a "mv" inside the CVS
>repository. But I know that this brings its own problems.
>Should we use "cvs remove + cvs add"?
I don't know of any way to do a "mv" in CVS. If no one objects, I'll do
some surgery on the CVS repository to make a copy of windows-nat.c
and windows-tdep.c to make it look like they always existed and then
I'll cvs delete the old files and change Makefile.in.
cgf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-11 4:24 ` Christopher Faylor
@ 2009-01-11 6:29 ` Daniel Jacobowitz
2009-01-11 13:22 ` Joel Brobecker
1 sibling, 0 replies; 14+ messages in thread
From: Daniel Jacobowitz @ 2009-01-11 6:29 UTC (permalink / raw)
To: gdb-patches, Joel Brobecker
On Sat, Jan 10, 2009 at 11:24:11PM -0500, Christopher Faylor wrote:
> >In terms of the move itself, how do we want it to be done.
> >CVS doesn't support moves per se. Usually, in my own little CVS
> >repos where I don't use branches, I do a "mv" inside the CVS
> >repository. But I know that this brings its own problems.
> >Should we use "cvs remove + cvs add"?
>
> I don't know of any way to do a "mv" in CVS. If no one objects, I'll do
> some surgery on the CVS repository to make a copy of windows-nat.c
> and windows-tdep.c to make it look like they always existed and then
> I'll cvs delete the old files and change Makefile.in.
Someone had a script for this but I don't remember who... the above is
what I usually do, but additionally remove tags from the new copies.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-11 4:24 ` Christopher Faylor
2009-01-11 6:29 ` Daniel Jacobowitz
@ 2009-01-11 13:22 ` Joel Brobecker
2009-01-11 15:59 ` Jan Kratochvil
1 sibling, 1 reply; 14+ messages in thread
From: Joel Brobecker @ 2009-01-11 13:22 UTC (permalink / raw)
To: gdb-patches
> >I suggest I commit the two remaining patches as is, and then do
> >the move as a separate step. That way, I don't have to rework
> >the patches after the move is done.
>
> That's fine.
Excellent! Thank you, Chris. The two patches have now been checked in.
> I don't know of any way to do a "mv" in CVS. If no one objects, I'll do
> some surgery on the CVS repository to make a copy of windows-nat.c
> and windows-tdep.c to make it look like they always existed and then
> I'll cvs delete the old files and change Makefile.in.
Thanks for taking care of that too. The files are ready for the "move".
--
Joel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-11 13:22 ` Joel Brobecker
@ 2009-01-11 15:59 ` Jan Kratochvil
2009-01-11 18:37 ` Christopher Faylor
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kratochvil @ 2009-01-11 15:59 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Sun, 11 Jan 2009 14:21:29 +0100, Joel Brobecker wrote:
> Excellent! Thank you, Chris. The two patches have now been checked in.
>
> > I don't know of any way to do a "mv" in CVS. If no one objects, I'll do
> > some surgery on the CVS repository to make a copy of windows-nat.c
> > and windows-tdep.c to make it look like they always existed and then
> > I'll cvs delete the old files and change Makefile.in.
>
> Thanks for taking care of that too. The files are ready for the "move".
x86_64-unknown-linux-gnu now fails using --enable-targets=all:
libgdb.a(i386-cygwin-tdep.o): In function `core_process_module_section':
.../gdb/i386-cygwin-tdep.c:160: undefined reference to `win32_xfer_shared_library'
Please apply possibly adjusted before/after the expected renaming.
Regards,
Jan
2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix linking with --enable-targets=all:
* Makefile.in (ALL_TARGET_OBS): Add win32-tdep.o.
(HFILES_NO_SRCDIR): Add win32-tdep.h.
(ALLDEPFILES): Add win32-tdep.c.
--- gdb/Makefile.in 9 Jan 2009 21:15:10 -0000 1.1063
+++ gdb/Makefile.in 11 Jan 2009 15:54:10 -0000
@@ -515,7 +515,8 @@ ALL_TARGET_OBS = \
xcoffread.o \
prologue-value.o \
symfile-mem.o \
- corelow.o
+ corelow.o \
+ win32-tdep.o
# Host-dependent makefile fragment comes in here.
@host_makefile_frag@
@@ -727,7 +728,7 @@ config/sparc/nm-sol2.h config/nm-linux.h
config/rs6000/nm-rs6000.h top.h bsd-kvm.h gdb-stabs.h reggroups.h \
annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
-sentinel-frame.h bcache.h symfile.h
+sentinel-frame.h bcache.h symfile.h win32-tdep.h
# Header files that already have srcdir in them, or which are in objdir.
@@ -1340,7 +1341,7 @@ ALLDEPFILES = \
spu-linux-nat.c spu-tdep.c \
v850-tdep.c \
vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
- win32-nat.c \
+ win32-nat.c win32-tdep.c \
xcoffread.c xcoffsolib.c \
xstormy16-tdep.c \
xtensa-tdep.c xtensa-config.c \
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep...
2009-01-11 15:59 ` Jan Kratochvil
@ 2009-01-11 18:37 ` Christopher Faylor
2009-01-12 1:11 ` Rename win32-* to windows-* Christopher Faylor
2009-01-12 13:30 ` win32-nat.c to windows-nat.c rename Pierre Muller
0 siblings, 2 replies; 14+ messages in thread
From: Christopher Faylor @ 2009-01-11 18:37 UTC (permalink / raw)
To: gdb-patches, Joel Brobecker, Jan Kratochvil
On Sun, Jan 11, 2009 at 04:58:01PM +0100, Jan Kratochvil wrote:
>On Sun, 11 Jan 2009 14:21:29 +0100, Joel Brobecker wrote:
>> Excellent! Thank you, Chris. The two patches have now been checked in.
>>
>> > I don't know of any way to do a "mv" in CVS. If no one objects, I'll do
>> > some surgery on the CVS repository to make a copy of windows-nat.c
>> > and windows-tdep.c to make it look like they always existed and then
>> > I'll cvs delete the old files and change Makefile.in.
>>
>> Thanks for taking care of that too. The files are ready for the "move".
>
>x86_64-unknown-linux-gnu now fails using --enable-targets=all:
>libgdb.a(i386-cygwin-tdep.o): In function `core_process_module_section':
>.../gdb/i386-cygwin-tdep.c:160: undefined reference to `win32_xfer_shared_library'
>
>Please apply possibly adjusted before/after the expected renaming.
ACK
cgf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Rename win32-* to windows-*
2009-01-11 18:37 ` Christopher Faylor
@ 2009-01-12 1:11 ` Christopher Faylor
2009-01-12 19:42 ` Eli Zaretskii
2009-01-12 13:30 ` win32-nat.c to windows-nat.c rename Pierre Muller
1 sibling, 1 reply; 14+ messages in thread
From: Christopher Faylor @ 2009-01-12 1:11 UTC (permalink / raw)
To: gdb-patches
I did the rename. I didn't have a mingw environment handy to test that
this worked but I think I got all of the cases except for gdbserver.
I had to make some minor changes to windows-nat.c to get this building
under Cygwin which were apparently already there as a result of the
DWORD -> PVOID change.
Thanks to Daniel Jacobowitz for reminding me that it is best to remove
the history from the copied CVS files. I always forget that part.
cgf
2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix linking with --enable-targets=all:
* Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
(HFILES_NO_SRCDIR): Add windows-tdep.h.
(ALLDEPFILES): Add windows-tdep.c.
2009-01-11 Christopher Faylor <me+cygwin@cgf.cx>
* win32-tdep.h: Delete.
* windows-tdep.h: Rename from win32-tdep.h.
* win32-nat.h: Delete.
* windows-nat.h: Rename from win32-nat.h.
* win32-nat.c: Delete.
* windows-nat.c: Rename from win32-nat.c.
* win32-termcapt.c: Delete.
* windows-termcap.c: Rename from win32-termcap.c.
* amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
* configure.ac: Handle rename from win32-termcap.c ->
windows-termcap.c.
* configure: Regenerate.
* gdb_curses.h: Change comment to reflect rename from win32-termcap.c
-> windows-termcap.c.
* i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
windows-tdep.h.
* i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
* windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
windows-tdep.h.
(win32_make_so): Handle cygwin compiler warning due to change of
load_addr from DWORD to LPVOID.
(handle_load_dll): Use %p in format string to properly print address
and avoid a compiler warning.
(DEBUG_EXCEPTION_SIMPLE): Ditto.
(handle_exception): Ditto.
* windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
* config/i386/cygwin.mh: Handle rename from win32-nat.o ->
windows-nat.o.
* config/i386/mingw.mh: Ditto.
* config/i386/mingw64.mh: Ditto.
Index: Makefile.in
===================================================================
RCS file: /cvs/uberbaum/gdb/Makefile.in,v
retrieving revision 1.1063
diff -d -u -r1.1063 Makefile.in
--- Makefile.in 9 Jan 2009 21:15:10 -0000 1.1063
+++ Makefile.in 12 Jan 2009 01:04:58 -0000
@@ -515,7 +515,8 @@
xcoffread.o \
prologue-value.o \
symfile-mem.o \
- corelow.o
+ corelow.o \
+ windows-tdep.o
# Host-dependent makefile fragment comes in here.
@host_makefile_frag@
@@ -727,7 +728,7 @@
config/rs6000/nm-rs6000.h top.h bsd-kvm.h gdb-stabs.h reggroups.h \
annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
-sentinel-frame.h bcache.h symfile.h
+sentinel-frame.h bcache.h symfile.h windows-tdep.h
# Header files that already have srcdir in them, or which are in objdir.
@@ -1340,7 +1341,7 @@
spu-linux-nat.c spu-tdep.c \
v850-tdep.c \
vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
- win32-nat.c \
+ windows-nat.c windows-tdep.c \
xcoffread.c xcoffsolib.c \
xstormy16-tdep.c \
xtensa-tdep.c xtensa-config.c \
Index: amd64-windows-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/amd64-windows-nat.c,v
retrieving revision 1.1
diff -d -u -r1.1 amd64-windows-nat.c
--- amd64-windows-nat.c 11 Jan 2009 13:15:56 -0000 1.1
+++ amd64-windows-nat.c 12 Jan 2009 01:04:58 -0000
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "win32-nat.h"
+#include "windows-nat.h"
#include <windows.h>
Index: configure
===================================================================
RCS file: /cvs/uberbaum/gdb/configure,v
retrieving revision 1.263
diff -d -u -r1.263 configure
--- configure 9 Dec 2008 17:18:29 -0000 1.263
+++ configure 12 Jan 2009 01:04:59 -0000
@@ -10170,7 +10170,7 @@
;;
*mingw32*)
ac_cv_search_tgetent="none required"
- CONFIG_OBS="$CONFIG_OBS win32-termcap.o"
+ CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
;;
esac
Index: configure.ac
===================================================================
RCS file: /cvs/uberbaum/gdb/configure.ac,v
retrieving revision 1.83
diff -d -u -r1.83 configure.ac
--- configure.ac 9 Dec 2008 17:18:30 -0000 1.83
+++ configure.ac 12 Jan 2009 01:04:59 -0000
@@ -506,7 +506,7 @@
;;
*mingw32*)
ac_cv_search_tgetent="none required"
- CONFIG_OBS="$CONFIG_OBS win32-termcap.o"
+ CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
;;
esac
Index: configure.tgt
===================================================================
RCS file: /cvs/uberbaum/gdb/configure.tgt,v
retrieving revision 1.208
diff -d -u -r1.208 configure.tgt
--- configure.tgt 11 Jan 2009 13:15:56 -0000 1.208
+++ configure.tgt 12 Jan 2009 01:04:59 -0000
@@ -201,13 +201,13 @@
i[34567]86-*-cygwin*)
# Target: Intel 386 running win32
gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
- solib-target.o corelow.o win32-tdep.o"
+ solib-target.o corelow.o windows-tdep.o"
build_gdbserver=yes
;;
i[34567]86-*-mingw32*)
# Target: Intel 386 running win32
gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
- solib-target.o corelow.o win32-tdep.o"
+ solib-target.o corelow.o windows-tdep.o"
build_gdbserver=yes
;;
i[34567]86-*-*)
@@ -526,7 +526,7 @@
# Target: MingW/amd64
gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \
i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
- solib-target.o win32-tdep.o"
+ solib-target.o windows-tdep.o"
;;
x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
# Target: NetBSD/amd64
Index: gdb_curses.h
===================================================================
RCS file: /cvs/uberbaum/gdb/gdb_curses.h,v
retrieving revision 1.10
diff -d -u -r1.10 gdb_curses.h
--- gdb_curses.h 3 Jan 2009 05:57:51 -0000 1.10
+++ gdb_curses.h 12 Jan 2009 01:04:59 -0000
@@ -36,7 +36,7 @@
#include <term.h>
#else
/* On MinGW, a real termcap library is usually not present. Stub versions
- of the termcap functions will be built from win32-termcap.c. Readline
+ of the termcap functions will be built from windows-termcap.c. Readline
provides its own extern declarations when there's no termcap.h; do the
same here for the termcap functions used in GDB. */
extern int tgetnum (const char *);
Index: i386-cygwin-tdep.c
===================================================================
RCS file: /cvs/uberbaum/gdb/i386-cygwin-tdep.c,v
retrieving revision 1.19
diff -d -u -r1.19 i386-cygwin-tdep.c
--- i386-cygwin-tdep.c 11 Jan 2009 13:10:44 -0000 1.19
+++ i386-cygwin-tdep.c 12 Jan 2009 01:04:59 -0000
@@ -21,7 +21,7 @@
#include "osabi.h"
#include "gdb_string.h"
#include "i386-tdep.h"
-#include "win32-tdep.h"
+#include "windows-tdep.h"
#include "regset.h"
#include "gdb_obstack.h"
#include "xml-support.h"
Index: i386-windows-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/i386-windows-nat.c,v
retrieving revision 1.1
diff -d -u -r1.1 i386-windows-nat.c
--- i386-windows-nat.c 11 Jan 2009 04:13:55 -0000 1.1
+++ i386-windows-nat.c 12 Jan 2009 01:04:59 -0000
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "win32-nat.h"
+#include "windows-nat.h"
#include <windows.h>
Index: windows-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/windows-nat.c,v
retrieving revision 1.175
diff -d -u -r1.175 windows-nat.c
--- windows-nat.c 11 Jan 2009 13:10:44 -0000 1.175
+++ windows-nat.c 12 Jan 2009 01:05:00 -0000
@@ -60,8 +60,8 @@
#include "i386-tdep.h"
#include "i387-tdep.h"
-#include "win32-tdep.h"
-#include "win32-nat.h"
+#include "windows-tdep.h"
+#include "windows-nat.h"
static struct target_ops win32_ops;
@@ -651,8 +651,8 @@
/* The symbols in a dll are offset by 0x1000, which is the the
offset from 0 of the first byte in an image - because of the
file header and the section alignment. */
- cygwin_load_start = load_addr + 0x1000;
- cygwin_load_end = cygwin_load_start + bfd_section_size (abfd, text);
+ cygwin_load_start = (bfd_vma) ((char *) load_addr + 0x1000);
+ cygwin_load_end = (bfd_vma) ((char *) cygwin_load_start + bfd_section_size (abfd, text));
bfd_close (abfd);
}
@@ -727,7 +727,7 @@
solib_end->next = win32_make_so (dll_name, event->lpBaseOfDll);
solib_end = solib_end->next;
- DEBUG_EVENTS (("gdb: Loading dll \"%s\" at 0x%lx.\n", solib_end->so_name,
+ DEBUG_EVENTS (("gdb: Loading dll \"%s\" at %p.\n", solib_end->so_name,
solib_end->lm_info->load_addr));
return 1;
@@ -973,7 +973,7 @@
#define DEBUG_EXCEPTION_SIMPLE(x) if (debug_exceptions) \
- printf_unfiltered ("gdb: Target exception %s at 0x%08lx\n", x, \
+ printf_unfiltered ("gdb: Target exception %s at %p\n", x, \
current_event.u.Exception.ExceptionRecord.ExceptionAddress)
static int
@@ -1086,7 +1086,7 @@
/* Treat unhandled first chance exceptions specially. */
if (current_event.u.Exception.dwFirstChance)
return -1;
- printf_unfiltered ("gdb: unknown target exception 0x%08lx at 0x%08lx\n",
+ printf_unfiltered ("gdb: unknown target exception 0x%08lx at %p\n",
current_event.u.Exception.ExceptionRecord.ExceptionCode,
current_event.u.Exception.ExceptionRecord.ExceptionAddress);
ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
Index: windows-tdep.c
===================================================================
RCS file: /cvs/uberbaum/gdb/windows-tdep.c,v
retrieving revision 1.1
diff -d -u -r1.1 windows-tdep.c
--- windows-tdep.c 11 Jan 2009 13:10:44 -0000 1.1
+++ windows-tdep.c 12 Jan 2009 01:05:00 -0000
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "win32-tdep.h"
+#include "windows-tdep.h"
#include "gdb_obstack.h"
#include "xml-support.h"
Index: config/i386/cygwin.mh
===================================================================
RCS file: /cvs/uberbaum/gdb/config/i386/cygwin.mh,v
retrieving revision 1.9
diff -d -u -r1.9 cygwin.mh
--- config/i386/cygwin.mh 11 Jan 2009 04:13:57 -0000 1.9
+++ config/i386/cygwin.mh 12 Jan 2009 01:05:00 -0000
@@ -1,4 +1,4 @@
MH_CFLAGS=
-NATDEPFILES= i386-nat.o win32-nat.o i386-windows-nat.o
+NATDEPFILES= i386-nat.o windows-nat.o i386-windows-nat.o
NAT_FILE=nm-cygwin.h
XM_CLIBS=
Index: config/i386/mingw.mh
===================================================================
RCS file: /cvs/uberbaum/gdb/config/i386/mingw.mh,v
retrieving revision 1.2
diff -d -u -r1.2 mingw.mh
--- config/i386/mingw.mh 11 Jan 2009 04:13:57 -0000 1.2
+++ config/i386/mingw.mh 12 Jan 2009 01:05:00 -0000
@@ -1,4 +1,4 @@
MH_CFLAGS=
-NATDEPFILES= i386-nat.o win32-nat.o i386-windows-nat.o
+NATDEPFILES= i386-nat.o windows-nat.o i386-windows-nat.o
NAT_FILE=nm-cygwin.h
XM_CLIBS=
Index: config/i386/mingw64.mh
===================================================================
RCS file: /cvs/uberbaum/gdb/config/i386/mingw64.mh,v
retrieving revision 1.1
diff -d -u -r1.1 mingw64.mh
--- config/i386/mingw64.mh 11 Jan 2009 13:15:56 -0000 1.1
+++ config/i386/mingw64.mh 12 Jan 2009 01:05:00 -0000
@@ -1,2 +1,2 @@
-NATDEPFILES= i386-nat.o win32-nat.o amd64-windows-nat.o
+NATDEPFILES= i386-nat.o windows-nat.o amd64-windows-nat.o
NAT_FILE=nm-cygwin64.h
^ permalink raw reply [flat|nested] 14+ messages in thread
* win32-nat.c to windows-nat.c rename
2009-01-11 18:37 ` Christopher Faylor
2009-01-12 1:11 ` Rename win32-* to windows-* Christopher Faylor
@ 2009-01-12 13:30 ` Pierre Muller
2009-01-13 10:24 ` Joel Brobecker
1 sibling, 1 reply; 14+ messages in thread
From: Pierre Muller @ 2009-01-12 13:30 UTC (permalink / raw)
To: gdb-patches
There is also a
problem if trying to generate a mutibuild on cygwin on a 32 bit
machine with --enable-64-bit-bfd:
make[1]: Leaving directory `/usr/local/src/gdbcvs/multibuild/gdb'
gcc -gstabs+ -O0 -I. -I../../purecvs/gdb -I../../purecvs/gdb/config
-DLOCALEDI
R="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../purecvs/gdb/../include/o
pcode -I../../purecvs/gdb/../readline/.. -I../bfd -I../../purecvs/gdb/../bfd
-I.
./../purecvs/gdb/../include -I../libdecnumber
-I../../purecvs/gdb/../libdecnumbe
r -I../../purecvs/gdb/gnulib -Ignulib -DMI_OUT=1 -DTUI=1 -Wall
-Wdeclaration-
after-statement -Wpointer-arith -Wformat-nonliteral -Wno-unused -Wno-switch
-Wno
-char-subscripts -Werror -c -o windows-nat.o -MT windows-nat.o -MMD -MP -MF
.dep
s/windows-nat.Tpo ../../purecvs/gdb/windows-nat.c
../../purecvs/gdb/windows-nat.c: In function `win32_make_so':
../../purecvs/gdb/windows-nat.c:654: warning: cast from pointer to integer
of di
fferent size
../../purecvs/gdb/windows-nat.c:655: warning: cast to pointer from integer
of di
fferent size
../../purecvs/gdb/windows-nat.c:655: warning: cast from pointer to integer
of di
fferent size
../../purecvs/gdb/windows-nat.c: In function `win32_xfer_shared_libraries':
../../purecvs/gdb/windows-nat.c:2052: warning: cast from pointer to integer
of d
ifferent size
make: *** [windows-nat.o] Error 1
Pierre Muller
Pascal language support maintainer for GDB
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Rename win32-* to windows-*
2009-01-12 1:11 ` Rename win32-* to windows-* Christopher Faylor
@ 2009-01-12 19:42 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2009-01-12 19:42 UTC (permalink / raw)
To: gdb-patches
> Date: Sun, 11 Jan 2009 20:10:38 -0500
> From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
>
> I did the rename.
Thanks.
> * win32-tdep.h: Delete.
> * windows-tdep.h: Rename from win32-tdep.h.
> * win32-nat.h: Delete.
> * windows-nat.h: Rename from win32-nat.h.
> * win32-nat.c: Delete.
> * windows-nat.c: Rename from win32-nat.c.
> * win32-termcapt.c: Delete.
> * windows-termcap.c: Rename from win32-termcap.c.
> * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
> * configure.ac: Handle rename from win32-termcap.c ->
> windows-termcap.c.
The new windows-*.c file names all clash in 8+3 namespace, so we need
a few new entries in config/djgpp/fnchange.lst for them.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: win32-nat.c to windows-nat.c rename
2009-01-12 13:30 ` win32-nat.c to windows-nat.c rename Pierre Muller
@ 2009-01-13 10:24 ` Joel Brobecker
2009-01-13 11:04 ` Pierre Muller
0 siblings, 1 reply; 14+ messages in thread
From: Joel Brobecker @ 2009-01-13 10:24 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> There is also a
> problem if trying to generate a mutibuild on cygwin on a 32 bit
> machine with --enable-64-bit-bfd:
Is that something new? Apart from moving some of the code to a different
file, I don't think I changed the actual code...
I'm wondering if I'm looking at the right version of the code.
For instance, it reports errors on the following two lines:
cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *) load_addr + 0x1000);
cygwin_load_end = cygwin_load_start + bfd_section_size (abfd, text);
> ../../purecvs/gdb/windows-nat.c:654: warning: cast from pointer to integer
> of different size
load_addr is an LPVOID (which is a void *), so casting it to (char *)
should be OK, then to (uintptr_t) should also be OK, and then to
a CORE_ADDR, it's an integer to integer conversion, that should be
OK too, no?
Do you see where the problem is? I'll see if I can reproduce
without cygwin...
--
Joel
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: win32-nat.c to windows-nat.c rename
2009-01-13 10:24 ` Joel Brobecker
@ 2009-01-13 11:04 ` Pierre Muller
2009-01-13 17:55 ` Christopher Faylor
0 siblings, 1 reply; 14+ messages in thread
From: Pierre Muller @ 2009-01-13 11:04 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb-patches
This problem has been fixed by the last patch from
Christopher that changed the type of
cygwin_load_start and cygwin_load_end variables
from bfd_vma to CORE_ADDR type.
Thanks, Christopher !
Pierre Muller
Pascal language support maintainer for GDB
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Tuesday, January 13, 2009 11:23 AM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: win32-nat.c to windows-nat.c rename
>
> > There is also a
> > problem if trying to generate a mutibuild on cygwin on a 32 bit
> > machine with --enable-64-bit-bfd:
>
> Is that something new? Apart from moving some of the code to a
> different
> file, I don't think I changed the actual code...
>
> I'm wondering if I'm looking at the right version of the code.
> For instance, it reports errors on the following two lines:
>
> cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *) load_addr +
> 0x1000);
> cygwin_load_end = cygwin_load_start + bfd_section_size (abfd, text);
>
> > ../../purecvs/gdb/windows-nat.c:654: warning: cast from pointer to
> integer
> > of different size
>
> load_addr is an LPVOID (which is a void *), so casting it to (char *)
> should be OK, then to (uintptr_t) should also be OK, and then to
> a CORE_ADDR, it's an integer to integer conversion, that should be
> OK too, no?
>
> Do you see where the problem is? I'll see if I can reproduce
> without cygwin...
>
> --
> Joel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: win32-nat.c to windows-nat.c rename
2009-01-13 11:04 ` Pierre Muller
@ 2009-01-13 17:55 ` Christopher Faylor
0 siblings, 0 replies; 14+ messages in thread
From: Christopher Faylor @ 2009-01-13 17:55 UTC (permalink / raw)
To: gdb-patches, 'Joel Brobecker', Pierre Muller
On Tue, Jan 13, 2009 at 12:03:28PM +0100, Pierre Muller wrote:
> This problem has been fixed by the last patch from
>Christopher that changed the type of
>cygwin_load_start and cygwin_load_end variables
>from bfd_vma to CORE_ADDR type.
i.e., http://sourceware.org/ml/gdb-patches/2009-01/msg00269.html
Glad to hear that it was fixed.
cgf
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2009-01-13 17:55 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10 9:09 [RFA/win32] move win32_xfer_shared_library to (new) win32-tdep Joel Brobecker
2009-01-10 16:51 ` Christopher Faylor
2009-01-11 4:19 ` Joel Brobecker
2009-01-11 4:24 ` Christopher Faylor
2009-01-11 6:29 ` Daniel Jacobowitz
2009-01-11 13:22 ` Joel Brobecker
2009-01-11 15:59 ` Jan Kratochvil
2009-01-11 18:37 ` Christopher Faylor
2009-01-12 1:11 ` Rename win32-* to windows-* Christopher Faylor
2009-01-12 19:42 ` Eli Zaretskii
2009-01-12 13:30 ` win32-nat.c to windows-nat.c rename Pierre Muller
2009-01-13 10:24 ` Joel Brobecker
2009-01-13 11:04 ` Pierre Muller
2009-01-13 17:55 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox