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.
* 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-termcap.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.
This commit is contained in:
Christopher Faylor 2009-01-12 01:10:28 +00:00
parent cd4a7468c9
commit 31b060a20f
19 changed files with 62 additions and 2519 deletions

View File

@ -1,3 +1,41 @@
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 Christ Faylor <me.gdb@cgf.cx>
* 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-termcap.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.
2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com> 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable

View File

@ -515,7 +515,8 @@ ALL_TARGET_OBS = \
xcoffread.o \ xcoffread.o \
prologue-value.o \ prologue-value.o \
symfile-mem.o \ symfile-mem.o \
corelow.o corelow.o \
windows-tdep.o
# Host-dependent makefile fragment comes in here. # Host-dependent makefile fragment comes in here.
@host_makefile_frag@ @host_makefile_frag@
@ -727,7 +728,7 @@ config/sparc/nm-sol2.h config/nm-linux.h config/mips/nm-irix5.h \
config/rs6000/nm-rs6000.h top.h bsd-kvm.h gdb-stabs.h reggroups.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 \ 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 \ 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. # 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 \ spu-linux-nat.c spu-tdep.c \
v850-tdep.c \ v850-tdep.c \
vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-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 \ xcoffread.c xcoffsolib.c \
xstormy16-tdep.c \ xstormy16-tdep.c \
xtensa-tdep.c xtensa-config.c \ xtensa-tdep.c xtensa-config.c \

View File

@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h" #include "defs.h"
#include "win32-nat.h" #include "windows-nat.h"
#include <windows.h> #include <windows.h>

View File

@ -1,4 +1,4 @@
MH_CFLAGS= 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 NAT_FILE=nm-cygwin.h
XM_CLIBS= XM_CLIBS=

View File

@ -1,4 +1,4 @@
MH_CFLAGS= 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 NAT_FILE=nm-cygwin.h
XM_CLIBS= XM_CLIBS=

View File

@ -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 NAT_FILE=nm-cygwin64.h

2
gdb/configure vendored
View File

@ -10170,7 +10170,7 @@ case $host_os in
;; ;;
*mingw32*) *mingw32*)
ac_cv_search_tgetent="none required" ac_cv_search_tgetent="none required"
CONFIG_OBS="$CONFIG_OBS win32-termcap.o" CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
;; ;;
esac esac

View File

@ -506,7 +506,7 @@ case $host_os in
;; ;;
*mingw32*) *mingw32*)
ac_cv_search_tgetent="none required" ac_cv_search_tgetent="none required"
CONFIG_OBS="$CONFIG_OBS win32-termcap.o" CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
;; ;;
esac esac

View File

@ -201,13 +201,13 @@ i[34567]86-*-gnu*)
i[34567]86-*-cygwin*) i[34567]86-*-cygwin*)
# Target: Intel 386 running win32 # Target: Intel 386 running win32
gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \ 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 build_gdbserver=yes
;; ;;
i[34567]86-*-mingw32*) i[34567]86-*-mingw32*)
# Target: Intel 386 running win32 # Target: Intel 386 running win32
gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \ 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 build_gdbserver=yes
;; ;;
i[34567]86-*-*) i[34567]86-*-*)
@ -526,7 +526,7 @@ x86_64-*-mingw*)
# Target: MingW/amd64 # Target: MingW/amd64
gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \ gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \
i386-tdep.o i386-cygwin-tdep.o i387-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) x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
# Target: NetBSD/amd64 # Target: NetBSD/amd64

View File

@ -36,7 +36,7 @@
#include <term.h> #include <term.h>
#else #else
/* On MinGW, a real termcap library is usually not present. Stub versions /* 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 provides its own extern declarations when there's no termcap.h; do the
same here for the termcap functions used in GDB. */ same here for the termcap functions used in GDB. */
extern int tgetnum (const char *); extern int tgetnum (const char *);

View File

@ -21,7 +21,7 @@
#include "osabi.h" #include "osabi.h"
#include "gdb_string.h" #include "gdb_string.h"
#include "i386-tdep.h" #include "i386-tdep.h"
#include "win32-tdep.h" #include "windows-tdep.h"
#include "regset.h" #include "regset.h"
#include "gdb_obstack.h" #include "gdb_obstack.h"
#include "xml-support.h" #include "xml-support.h"

View File

@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h" #include "defs.h"
#include "win32-nat.h" #include "windows-nat.h"
#include <windows.h> #include <windows.h>

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +0,0 @@
/* Copyright 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_NAT_H
#define WIN32_NAT_H
extern void win32_set_context_register_offsets (const int *offsets);
#endif

View File

@ -1,41 +0,0 @@
/* 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>");
}

View File

@ -1,27 +0,0 @@
/* 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

View File

@ -1,65 +0,0 @@
/* Win32 termcap emulation.
Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
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 <stdlib.h>
/* Each of the files below is a minimal implementation of the standard
termcap function with the same name, suitable for use in a Windows
console window. */
int
tgetent (char *buffer, char *termtype)
{
return -1;
}
int
tgetnum (char *name)
{
return -1;
}
int
tgetflag (char *name)
{
return -1;
}
char *
tgetstr (char *name, char **area)
{
return NULL;
}
int
tputs (char *string, int nlines, int (*outfun) ())
{
while (*string)
outfun (*string++);
return 0;
}
char *
tgoto (const char *cap, int col, int row)
{
return NULL;
}

View File

@ -60,8 +60,8 @@
#include "i386-tdep.h" #include "i386-tdep.h"
#include "i387-tdep.h" #include "i387-tdep.h"
#include "win32-tdep.h" #include "windows-tdep.h"
#include "win32-nat.h" #include "windows-nat.h"
static struct target_ops win32_ops; static struct target_ops win32_ops;
@ -651,8 +651,8 @@ win32_make_so (const char *name, LPVOID load_addr)
/* The symbols in a dll are offset by 0x1000, which is the the /* 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 offset from 0 of the first byte in an image - because of the
file header and the section alignment. */ file header and the section alignment. */
cygwin_load_start = load_addr + 0x1000; cygwin_load_start = (bfd_vma) ((char *) load_addr + 0x1000);
cygwin_load_end = cygwin_load_start + bfd_section_size (abfd, text); cygwin_load_end = (bfd_vma) ((char *) cygwin_load_start + bfd_section_size (abfd, text));
bfd_close (abfd); bfd_close (abfd);
} }
@ -727,7 +727,7 @@ handle_load_dll (void *dummy)
solib_end->next = win32_make_so (dll_name, event->lpBaseOfDll); solib_end->next = win32_make_so (dll_name, event->lpBaseOfDll);
solib_end = solib_end->next; 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)); solib_end->lm_info->load_addr));
return 1; return 1;
@ -973,7 +973,7 @@ info_w32_command (char *args, int from_tty)
#define DEBUG_EXCEPTION_SIMPLE(x) if (debug_exceptions) \ #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) current_event.u.Exception.ExceptionRecord.ExceptionAddress)
static int static int
@ -1086,7 +1086,7 @@ handle_exception (struct target_waitstatus *ourstatus)
/* Treat unhandled first chance exceptions specially. */ /* Treat unhandled first chance exceptions specially. */
if (current_event.u.Exception.dwFirstChance) if (current_event.u.Exception.dwFirstChance)
return -1; 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.ExceptionCode,
current_event.u.Exception.ExceptionRecord.ExceptionAddress); current_event.u.Exception.ExceptionRecord.ExceptionAddress);
ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;

View File

@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h" #include "defs.h"
#include "win32-tdep.h" #include "windows-tdep.h"
#include "gdb_obstack.h" #include "gdb_obstack.h"
#include "xml-support.h" #include "xml-support.h"