From cad9cd605caf93d182a55ce929374ab706b9e876 Mon Sep 17 00:00:00 2001 From: Geoffrey Noer Date: Tue, 12 Nov 1996 02:19:25 +0000 Subject: [PATCH] Mon Nov 11 17:15:59 1996 Geoffrey Noer * defs.h: modify Nov 11 12:59:00 change so _MSC_VER is checked instead of _WIN32 * win32-nat.c: fix Nov 11 12:59:00 change (windows.h should be included instead of windefs.h for compilers other than VC++). * mswin/windefs.h: remove ^Ms and change C++ style comments to C style comments --- gdb/ChangeLog | 10 ++++++++++ gdb/defs.h | 2 +- gdb/win32-nat.c | 22 +++++++++------------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fb2a90654f..9d2a0c4041 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Mon Nov 11 17:15:59 1996 Geoffrey Noer + + * defs.h: modify Nov 11 12:59:00 change so _MSC_VER is checked + instead of _WIN32 + * win32-nat.c: fix Nov 11 12:59:00 change (windows.h should + be included instead of windefs.h for compilers other than + VC++). + * mswin/windefs.h: remove ^Ms and change C++ style comments + to C style comments + Mon Nov 11 14:32:38 1996 Mark Alexander * utils.c (get_cell): Fix off-by-one bug. diff --git a/gdb/defs.h b/gdb/defs.h index 2f5ed4a600..039bb6ae47 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -571,7 +571,7 @@ extern char *strsave PARAMS ((const char *)); extern char *mstrsave PARAMS ((void *, const char *)); -#ifdef _WIN32 /* FIXME; was long, but this causes compile errors in msvc if already defined */ +#ifdef _MSC_VER /* FIXME; was long, but this causes compile errors in msvc if already defined */ extern PTR xmmalloc PARAMS ((PTR, size_t)); extern PTR xmrealloc PARAMS ((PTR, PTR, size_t)); diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 580b13b179..5fdea1f972 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -16,7 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ /* by Steve Chamberlain, sac@cygnus.com */ @@ -32,7 +33,14 @@ #include #include #include +#include + +#ifdef _MSC_VER #include "windefs.h" +#else /* other WIN32 compiler */ +#include +#endif + #include "buildsym.h" #include "symfile.h" #include "objfiles.h" @@ -96,7 +104,6 @@ struct regmappings int mask; }; - static const struct regmappings mappings[] = { #ifdef __PPC__ @@ -172,7 +179,6 @@ static const struct regmappings mappings[] = {(char *) &context.Fpr30, CONTEXT_FLOATING_POINT}, {(char *) &context.Fpr31, CONTEXT_FLOATING_POINT}, - {(char *) &context.Iar, CONTEXT_CONTROL}, {(char *) &context.Msr, CONTEXT_CONTROL}, {(char *) &context.Cr, CONTEXT_INTEGER}, @@ -209,7 +215,6 @@ static const struct regmappings mappings[] = #endif }; - /* This vector maps the target's idea of an exception (extracted from the DEBUG_EVENT structure) to GDB's idea. */ @@ -219,7 +224,6 @@ struct xlate_exception enum target_signal us; }; - static const struct xlate_exception xlate[] = { @@ -230,7 +234,6 @@ static const struct xlate_exception {EXCEPTION_SINGLE_STEP, TARGET_SIGNAL_TRAP}, {-1, -1}}; - static void check (BOOL ok, const char *file, int line) { @@ -270,7 +273,6 @@ child_store_inferior_registers (int r) /* Wait for child to do something. Return pid of child, or -1 in case of error; store status through argument pointer OURSTATUS. */ - static int handle_load_dll (char *eventp) { @@ -352,7 +354,6 @@ handle_load_dll (char *eventp) return 1; } } - context.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT; GetThreadContext (current_thread, &context); @@ -519,7 +520,6 @@ child_wait (int pid, struct target_waitstatus *ourstatus) } } - /* Attach to process PID, then initialize for debugging it. */ static void @@ -539,7 +539,6 @@ child_attach (args, from_tty) if (!ok) error ("Can't attach to process."); - exception_count = 0; event_count = 0; @@ -561,7 +560,6 @@ child_attach (args, from_tty) push_target (&child_ops); } - static void child_detach (args, from_tty) char *args; @@ -580,7 +578,6 @@ child_detach (args, from_tty) unpush_target (&child_ops); } - /* Print status information about what we're accessing. */ static void @@ -763,7 +760,6 @@ child_mourn_inferior () generic_mourn_inferior (); } - /* Send a SIGINT to the process group. This acts just like the user typed a ^C on the controlling terminal. */