public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-muller-windows-multi:  Use new common/windows-hdep.h header.  * windows-nat.c (windows-hep.h): New include.  Remove macros that have been displaced in windows-hdep.h header.  (GetModuleFileNameEx): New function variable.  (get_module_name): Rewrite using gdb_win_conv_path function.  (windows_make_so): Likewise.  (windows_create_inferior): Simplify using new header functions.  Set maybe modified environment to CreateProcess.  Handle Cygwin special environment variables.  (bad_GetModuleFileNameEx): New. Replace  (bad_GetModuleFileNameExA, bad_GetModuleFileNameExW): Removed.  (_initialize_loadable): Adapt to new bad_GetModuleFileNameEx.  Try to find K32EnumProcessModules in kernel32 DLL  for EnumProcessModules function variable before EnumProcessModules  from psapi DLL.
@ 2011-03-25 23:13 muller
  0 siblings, 0 replies; only message in thread
From: muller @ 2011-03-25 23:13 UTC (permalink / raw)
  To: archer-commits

The branch, archer-muller-windows-multi has been updated
       via  b57932a3f3140d094d2ff57e8754f1f6b5b69529 (commit)
       via  b4242fa1c46de00282ce40bf8a26ee34a9707e55 (commit)
       via  0adaff808fabf070829354f8ff323dc57b68eabd (commit)
       via  3f307e84e39f8b8b56734606dcac631aa7e4ee59 (commit)
       via  719c0eb57fcd66c2cdad70c79360419be36c4b4f (commit)
       via  e9a60c248928fd82b5165029c9c8d7729f330f2d (commit)
       via  56bbb9db466e87a00d2394cf09f6e4ea1de93b60 (commit)
       via  0a75c449200665ef503f4a8e73efd3939d7ca537 (commit)
       via  dfb6544d0602676e01226bc9aa6a9ed21ca1862c (commit)
       via  39c0d0766c4a4626c9d3f1de976af35c112f3703 (commit)
       via  5800a6edc38506522f26e9f497be27f03c6f2e2d (commit)
       via  410b0400bbf712bb465eb32fd98fd6f2e57cb82f (commit)
       via  146ccbe9471ab00e4a8a183163ea7b02ad1eef20 (commit)
       via  c40415cfe4d602ded27d296c771006609596d5f4 (commit)
      from  e65e6659973dc8554f75f731491986720d7f3929 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit b57932a3f3140d094d2ff57e8754f1f6b5b69529
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Sat Mar 26 00:12:38 2011 +0100

    	Use new common/windows-hdep.h header.
    	* windows-nat.c (windows-hep.h): New include.
    	Remove macros that have been displaced in windows-hdep.h header.
    	(GetModuleFileNameEx): New function variable.
    	(get_module_name): Rewrite using gdb_win_conv_path function.
    	(windows_make_so): Likewise.
    	(windows_create_inferior): Simplify using new header functions.
    	Set maybe modified environment to CreateProcess.
    	Handle Cygwin special environment variables.
    	(bad_GetModuleFileNameEx): New. Replace
    	(bad_GetModuleFileNameExA, bad_GetModuleFileNameExW): Removed.
    	(_initialize_loadable): Adapt to new bad_GetModuleFileNameEx.
    	Try to find K32EnumProcessModules in kernel32 DLL
    	for EnumProcessModules function variable before EnumProcessModules
    	from psapi DLL.

commit b4242fa1c46de00282ce40bf8a26ee34a9707e55
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:13:47 2011 +0100

     Use new path conversion functions from windows-hdep.c

commit 0adaff808fabf070829354f8ff323dc57b68eabd
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:11:53 2011 +0100

     Use new functions from windows-hdep.c for cygwin specific code

commit 3f307e84e39f8b8b56734606dcac631aa7e4ee59
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:10:44 2011 +0100

     Use new functions from windows-hdep.c for cygwin specific code

commit 719c0eb57fcd66c2cdad70c79360419be36c4b4f
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:07:39 2011 +0100

     * Allow compilation of remote-mips with mingw

commit e9a60c248928fd82b5165029c9c8d7729f330f2d
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:06:26 2011 +0100

     * Add windows-hdep.o in srv_tgtobj

commit 56bbb9db466e87a00d2394cf09f6e4ea1de93b60
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:05:30 2011 +0100

     * Add windows-hdep.o in gdb_host_obs

commit 0a75c449200665ef503f4a8e73efd3939d7ca537
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:03:58 2011 +0100

     * Rule for windows-hdep.c compilation in gdbserver

commit dfb6544d0602676e01226bc9aa6a9ed21ca1862c
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:02:24 2011 +0100

     * Rule for windows-hdep.c compilation

commit 39c0d0766c4a4626c9d3f1de976af35c112f3703
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 25 16:00:09 2011 +0100

     + New windows-hdep files

-----------------------------------------------------------------------

Summary of changes:
 bfd/version.h                  |    2 +-
 gdb/Makefile.in                |    1 -
 gdb/common/windows-hdep.c      |   30 ++-
 gdb/common/windows-hdep.h      |   56 +++-
 gdb/configure.host             |    2 +-
 gdb/gdbserver/Makefile.in      |    1 -
 gdb/mingw-hdep.c               |    6 -
 gdb/p-lang.h                   |   26 +-
 gdb/regformats/regdat.sh       |   10 -
 gdb/testsuite/gdb.base/dbx.exp |    2 +-
 gdb/testsuite/lib/gdb.exp      |  153 ---------
 gdb/testsuite/lib/pascal.exp   |   23 --
 gdb/version.in                 |    2 +-
 gdb/windows-nat.c              |  660 ++++------------------------------------
 gdb/windows-tdep.c             |   38 +--
 15 files changed, 148 insertions(+), 864 deletions(-)
 mode change 100644 => 100755 gdb/common/windows-hdep.h

First 500 lines of diff:
diff --git a/bfd/version.h b/bfd/version.h
index 8c54415..6b5223b 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20110319
+#define BFD_VERSION_DATE 20110320
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 2783af9..164498b 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1994,7 +1994,6 @@ tui-winsource.o: $(srcdir)/tui/tui-winsource.c
 	$(COMPILE) $(srcdir)/tui/tui-winsource.c
 	$(POSTCOMPILE)
 
-
 #
 # gdb/python/ dependencies
 #
diff --git a/gdb/common/windows-hdep.c b/gdb/common/windows-hdep.c
index 315a983..9d922f8 100644
--- a/gdb/common/windows-hdep.c
+++ b/gdb/common/windows-hdep.c
@@ -34,7 +34,7 @@
 #include "windows-hdep.h"
 
 int
-gdb_win_conv_path (conv_type oper, const void *from, void * to, int size)
+gdb_win_conv_path (conv_type oper, const void *from, void *to, int size)
 {
 #ifdef USE_MINGW_CONV
   if (size == 0)
@@ -91,19 +91,22 @@ gdb_win_conv_path (conv_type oper, const void *from, void * to, int size)
 
   switch (oper)
     {
-    case WINDOWS_NATIVE_W_TO_POSIX:
+#ifdef USE_WIDE_WINAPI
+     case WINDOWS_NATIVE_W_TO_POSIX:
       op = CCP_WIN_W_TO_POSIX;
       break;
 
+    case WINDOWS_POSIX_TO_NATIVE_W:
+      op = CCP_POSIX_TO_WIN_W;
+      break;
+
+#endif /* USE_WIDE_WINAPI */
+ 
     case WINDOWS_NATIVE_A_TO_POSIX:
     case WINDOWS_NATIVE_TO_MSYS:
       op = CCP_WIN_A_TO_POSIX;
       break;
 
-    case WINDOWS_POSIX_TO_NATIVE_W:
-      op = CCP_POSIX_TO_WIN_W;
-      break;
-
     case WINDOWS_POSIX_TO_NATIVE_A:
       op = CCP_POSIX_TO_WIN_A;
       break;
@@ -146,7 +149,7 @@ gdb_win_conv_path (conv_type oper, const void *from, void * to, int size)
 /* Analogeous function for PATH style lists.  */
 
 int
-gdb_win_conv_path_list (conv_type oper, const void *from, void * to, int size)
+gdb_win_conv_path_list (conv_type oper, const void *from, void *to, int size)
 {
 #ifdef USE_MINGW_CONV
 #ifdef USE_WIDE_WINAPI
@@ -178,19 +181,22 @@ gdb_win_conv_path_list (conv_type oper, const void *from, void * to, int size)
 
   switch (oper)
     {
-    case WINDOWS_NATIVE_W_TO_POSIX:
+#ifdef USE_WIDE_WINAPI
+     case WINDOWS_NATIVE_W_TO_POSIX:
       op = CCP_WIN_W_TO_POSIX;
       break;
 
+    case WINDOWS_POSIX_TO_NATIVE_W:
+      op = CCP_POSIX_TO_WIN_W;
+      break;
+
+#endif /* USE_WIDE_WINAPI */
+
     case WINDOWS_NATIVE_A_TO_POSIX:
     case WINDOWS_NATIVE_TO_MSYS:
       op = CCP_WIN_A_TO_POSIX;
       break;
 
-    case WINDOWS_POSIX_TO_NATIVE_W:
-      op = CCP_POSIX_TO_WIN_W;
-      break;
-
     case WINDOWS_POSIX_TO_NATIVE_A:
       op = CCP_POSIX_TO_WIN_A;
       break;
diff --git a/gdb/common/windows-hdep.h b/gdb/common/windows-hdep.h
old mode 100644
new mode 100755
index 29d99fb..148c37a
--- a/gdb/common/windows-hdep.h
+++ b/gdb/common/windows-hdep.h
@@ -19,7 +19,10 @@
    conversion between POSIX style and Windows NATIVE style
    path and path lists.
    For this purpose, generic replacement of the two cygwin function
-   cygwin_conv_path and cygwin_conv_path_list are created.  */
+   cygwin_conv_path and cygwin_conv_path_list are created.
+
+   The header also declares a substitute of sleep function
+   if that function is not included in the system headers.  */
 
 #ifndef WINDOWS_HDEP_H
 #define WINDOWS_HDEP_H
@@ -37,7 +40,28 @@
    GDB with wide char use even on systems for which the default is to
    use ASCII chars.  */
 #undef _G
+/* Macro _G_SUFFIX(text) expands either to 'text "A"' or to 'text "W"'
+   depending on the use of wide chars or not.  */
+#undef _G_SUFFIX
+/* Macro LPGSTR holds either LCSTR or LPWSTR.  */
+#undef LPGSTR
+/* Type win_buf_t is also set to char or wchar_t. */
+
+/* The use of wide char for the above function is dependent of the definition
+   of the macro USE_WIDE_WINAPI.
+
+   For Cygwin compiler, the default is wide API for the newer cygwin
+   version 1.7.X and above; and ascii API for older 1.5.X versions.  
+
+   Otherwise mingw compiler is assumed, which defaults to use of ascii
+   WINAPI for now (this may change later).
 
+   Default can be overridden either by defining USE_WIDE_WINAPI
+   to force use of wide API, or by defining USE_ASCII_WINAPI to prevent
+   use of wide API.  */
+
+
+/* CYGWIN part */
 #ifdef __CYGWIN__
 #ifdef PATH_MAX
 # define __PMAX	PATH_MAX
@@ -45,29 +69,36 @@
 # include <sys/param.h>
 # define __PMAX MAXPATHLEN
 #endif
-/*  For new Cygwin 1.7.X versions, use WIDE version of Windows API functions
-    by default, unless USE_ASCII_WINAPI is defined.
-    For older Cygwin 1.5.X versionsd, or for MingwXX systems, default to use
-    the Ansi versions.  */
+/* For new Cygwin 1.7.X versions, use WIDE version of Windows API functions
+   by default, unless USE_ASCII_WINAPI is defined.
+   For older Cygwin 1.5.X versionsd, or for MingwXX systems, default to use
+   the Ansi versions.  */
 #include <sys/cygwin.h>
 #include <cygwin/version.h>
 # if CYGWIN_VERSION_DLL_MAKE_COMBINED(CYGWIN_VERSION_API_MAJOR,CYGWIN_VERSION_API_MINOR) >= 181
+/* Conditional set to use the newer cygwin_conv_path function.  */
 #  define USE_NEW_CYGWIN_CONV
+/* Set macro USE_WIDE_WINAPI by default, unless USE_ASCII_WINAPI is set
+   to disable its use.  */
 #   ifndef USE_ASCII_WINAPI
 #     define USE_WIDE_WINAPI
 #   endif /* not USE_ASCII_WINAPI  */
 # else
-/*  For older 1.5.X Cygwin versions, use cygwin_onv_to_XXX functions
+/*  For older 1.5.X Cygwin versions, use cygwin_conv_to_XXX functions
     to emulate newer cygwin_conv_path function.  */
 #  define USE_OLD_CYGWIN_CONV
 #  define CW_SET_DOS_FILE_WARNING -1	/* no-op this for older Cygwin */
 # endif
 #else /* not __CYGWIN__ */
+/* We assume that no __CYGWIN__ macro means that we are using a
+   mingw compiler.  */
 # define __PMAX	(MAX_PATH + 1)
 # define USE_MINGW_CONV
 # define NEED_SLEEP_SUBSTITUTE
 #endif /* not __CYGWIN__ */
 
+
+/* Using wide WINAPI.  */
 #ifdef USE_WIDE_WINAPI
 # define _G(text) L##text
 # define _G_SUFFIX(text) (text "W")
@@ -78,13 +109,14 @@
 # define STARTUPINFO STARTUPINFOW
 # define CreateProcess CreateProcessW
 # define GetSystemDirectory GetSystemDirectoryW
-# define gdb_windows_strlen wstrlen
-# define gdb_windows_strcat wcscat
+# define gdb_win_strlen wstrlen
+# define gdb_win_strcat wcscat
 /* Mingw has a special swprintf function without length argument.  */
 # ifndef __CYGWIN__
 #  define swprintf _snwprintf
 #endif
 #else /* not USE_WIDE_WINAPI */
+/* Using ascii WINAPI.  */
 # define _G(text) text
 # define _G_SUFFIX(text) (text "A")
 # define LPGSTR LPSTR
@@ -94,8 +126,8 @@
 # define STARTUPINFO STARTUPINFOA
 # define CreateProcess CreateProcessA
 # define GetSystemDirectory GetSystemDirectoryA
-# define gdb_windows_strlen strlen
-# define gdb_windows_strcat strcat
+# define gdb_win_strlen strlen
+# define gdb_win_strcat strcat
 #endif /* not USE_WIDE_WINAPI */
 
 
@@ -119,12 +151,12 @@ typedef enum
    -1 if there was an error.  */
 
 extern int gdb_win_conv_path (conv_type oper, const void *from,
-			      void * to, int size);
+			      void *to, int size);
 
 /* Analogeous function for PATH style lists.  */
 
 extern int gdb_win_conv_path_list (conv_type oper, const void *from,
-				   void * to, int size);
+				   void *to, int size);
 
 #ifdef NEED_SLEEP_SUBSTITUTE
 extern int sleep (int);
diff --git a/gdb/configure.host b/gdb/configure.host
index 86dd05a..fce90fc 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -103,7 +103,7 @@ i[34567]86-*-openbsd*)	gdb_host=obsd ;;
 i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
 			gdb_host=sol2-64 ;;
 i[34567]86-*-solaris*)	gdb_host=i386sol2 ;;
-i[34567]86-*-cygwin*)	gdb_host=cygwin 
+i[34567]86-*-cygwin*)	gdb_host=cygwin
 			gdb_host_obs="posix-hdep.o windows-hdep.o"
 			;;
 
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index cc49260..dba4507 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -446,7 +446,6 @@ win32-low.o: win32-low.c $(win32_low_h) $(server_h) $(regdef_h) $(regcache_h)
 win32-arm-low.o: win32-arm-low.c $(win32_low_h) $(server_h)
 win32-i386-low.o: win32-i386-low.c $(win32_low_h) $(server_h) $(i386_low_h)
 
-
 spu-low.o: spu-low.c $(server_h)
 
 reg-arm.o : reg-arm.c $(regdef_h)
diff --git a/gdb/mingw-hdep.c b/gdb/mingw-hdep.c
index ae602d4..1a1d1df 100644
--- a/gdb/mingw-hdep.c
+++ b/gdb/mingw-hdep.c
@@ -27,7 +27,6 @@
 #include "gdb_string.h"
 #include "readline/readline.h"
 
-#include <stdio.h>
 #include <windows.h>
 
 /* This event is signalled whenever an asynchronous SIGINT handler
@@ -38,7 +37,6 @@ static HANDLE sigint_event;
    function.  */
 struct async_signal_handler *sigint_handler;
 
-
 /* The strerror() function can return NULL for errno values that are
    out of range.  Provide a "safe" version that always returns a
    printable string.
@@ -258,8 +256,4 @@ void
 _initialize_mingw_hdep (void)
 {
   sigint_event = CreateEvent (0, FALSE, FALSE, 0);
-  SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX
-		| SEM_NOOPENFILEERRORBOX);
-  setvbuf (stdout, NULL, _IONBF, BUFSIZ);
-  setvbuf (stderr, NULL, _IONBF, BUFSIZ);
 }
diff --git a/gdb/p-lang.h b/gdb/p-lang.h
index b9a34e0..c284c1d 100644
--- a/gdb/p-lang.h
+++ b/gdb/p-lang.h
@@ -22,17 +22,16 @@
 
 struct value;
 
-/* Defined in p-lang.c file.  */
+/* Defined in p-lang.c */
 extern const char *pascal_main_name (void);
 
-/* Defined in p-exp.y file.  */
-extern int pascal_parse (void);
+extern int pascal_parse (void);	/* Defined in p-exp.y */
 
-extern void pascal_error (char *);
+extern void pascal_error (char *);	/* Defined in p-exp.y */
 
-/* Defined in p-typeprint.c file.  */
-extern void pascal_print_type (struct type *, const char *,
-			       struct ui_file *, int, int);
+/* Defined in p-typeprint.c */
+extern void pascal_print_type (struct type *, const char *, struct ui_file *,
+			       int, int);
 
 extern void pascal_print_typedef (struct type *, struct symbol *,
 				  struct ui_file *);
@@ -48,7 +47,7 @@ extern int pascal_value_print (struct value *, struct ui_file *,
 extern void pascal_type_print_method_args (char *, char *,
 					   struct ui_file *);
 
-/* These are in p-lang.c file. */
+/* These are in p-lang.c: */
 
 extern int
   is_pascal_string_type (struct type *, int *, int *, int *,
@@ -56,20 +55,19 @@ extern int
 
 extern void pascal_printchar (int, struct type *, struct ui_file *);
 
-extern void pascal_printstr (struct ui_file *, struct type *,
-			     const gdb_byte *, unsigned int, const char *,
-			     int, const struct value_print_options *);
+extern void pascal_printstr (struct ui_file *, struct type *, const gdb_byte *,
+			     unsigned int, const char *, int,
+			     const struct value_print_options *);
 
 extern struct type **const (pascal_builtin_types[]);
 
-/* These are in p-typeprint.c file. */
+/* These are in p-typeprint.c: */
 
 extern void
   pascal_type_print_base (struct type *, struct ui_file *, int, int);
 
 extern void
-  pascal_type_print_varspec_prefix (struct type *, struct ui_file *, int,
-				    int);
+  pascal_type_print_varspec_prefix (struct type *, struct ui_file *, int, int);
 
 extern void pascal_object_print_value_fields (struct type *, const gdb_byte *,
 					      int,
diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh
index 94c07f2..5d3cc3b 100755
--- a/gdb/regformats/regdat.sh
+++ b/gdb/regformats/regdat.sh
@@ -25,16 +25,6 @@ move_if_change ()
     if test -r ${file} && cmp -s "${file}" new-"${file}"
     then
 	echo "${file} unchanged." 1>&2
-	if test ${file} -ot $0
-	then
-	    echo "Script \"$0\" is newer, touching \"${file}\"" 1>&2
-	    touch -r $0 ${file}
-	fi
-	if test ${file} -ot $1
-	then
-	    echo "Data file \"$1\" is newer, touching \"${file}\"" 1>&2
-	    touch -r $1 ${file}
-	fi
     else
 	mv new-"${file}" "${file}"
 	echo "${file} updated." 1>&2
diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp
index 4ab55e6..d4a95e9 100644
--- a/gdb/testsuite/gdb.base/dbx.exp
+++ b/gdb/testsuite/gdb.base/dbx.exp
@@ -265,7 +265,7 @@ proc gdb_file_cmd {arg} {
 #
 proc test_breakpoints { } {
     gdb_test "stop in main" "Breakpoint.*at.*: file.*average\.c, line 38\."
-    gdb_test "status" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \t\]+breakpoint\[ \t\]+keep y.*in main at.*average\.c:38.*"
+    gdb_test "status" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep y.*in main at.*average\.c:38.*"
     gdb_test "stop at average.c:43" "Breakpoint.*at.*: file.*average\.c, line 43.*"
     gdb_test "stop in average.c:43" "Usage: stop in <function . address>"
     gdb_test "stop at main" "Usage: stop at <line>"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 621183c..6a2f1a2 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -97,135 +97,6 @@ if ![info exists env(EXEEXT)] {
     set EXEEXT $env(EXEEXT)
 }
 
-global cygpath
-global use_cygpath
-
-set use_cygpath "no"
-set cygpath ""
-if { [catch {exec which "cygpath"} cygpath] != 0 } {
-  set use_cygpath "no"
-} else {
-  if { [file exists $cygpath] } {
-    set use_cygpath "yes"
-  }
-}
- 
-verbose "cygpath is '$cygpath'"
-verbose "use_cygpath is '$use_cygpath'"
-
-global transform_gdb_expect_code
-set transform_gdb_expect_code ""
-
-if { [istarget "*-*-mingw*"] || [istarget "*djgpp"]
-     || [istarget "*-*-solaris*"] } {
-  set transform_gdb_expect_code "adapt_expcode_to_text_mode";
-  verbose "Using adapt_expcode_to_text_mode proc for target"
-}
-
-# Special code used to transform regular expressions inside
-# gdb_expect to be able to cope with the two \r appearing if 
-# stdout is open in text mode.
-# This simply replaces all \r\n by \r+\n, expect if the pattern is within
-# square brackets.
-# FIXME: if expcode contains variables that themselves contain \r\n
-# patterns, those patterns are not correctly converted.
-
-proc adapt_expcode_to_text_mode { expcode } {
-    global gdb_prompt
-    verbose "Special replacement in gdb_expect entry expcode=\"$expcode\"" 3
-    # Protect all '\r\n' inside square brackets by
-    # replacing those '\r\n' by '\rzz\n'
-    set subst1a [regsub -all {\[([^]]*)\\r\\n([^]]*)\]} "$expcode" \
-		{[\1\\rzz\\n\2]} expcode1a]
-    if { $subst1a > 0 } {
-	verbose "subst1a $subst1a"
-	verbose "before \"$expcode\""
-	verbose "after \"$expcode1a\""
-    }
-    set subst1b [regsub -all {\[([^]]*)\r\n([^]]*)\]} $expcode1a \
-		{[\1\rzz\n\2]} expcode1b]
-    if { $subst1b > 0 } {
-	verbose "subst1b $subst1b"
-	verbose "before \"$expcode1a\""
-	verbose "after \"$expcode1b\""
-    }
-
-    set substp0 [regsub -all {\\[(\\]gdb\\[)\\]} [subst -nobackslashes {$gdb_prompt}] {.*gdb.*} modprompt0]
-    set substp1 [regsub -all {\\} [subst -nobackslashes {$modprompt0}] {\\\\} modprompt1]
-    set substp2 [regsub -all {\r\n} [subst -nobackslashes {$modprompt1}] {\\r\\n} modprompt2]
-
-    set substp3 [regsub -all {\\\\} [subst -nobackslashes {$modprompt2}] {\\} modprompt]
-    if { $substp2 > 0 } {
-	verbose "Subst found in gdb_prompt"
-	verbose [subst -nobackslashes $gdb_prompt]
-	verbose "modprompt1 [subst -nobackslashes $modprompt1]"
-	verbose "modprompt2"
-	verbose [subst -nobackslashes $modprompt2]
-	verbose "modprompt"
-	verbose [subst  $modprompt]
-        set subst1gdb [regsub -all {\$gdb_prompt} $expcode1b "$modprompt" \
-	    expcode1c]
-    if { $subst1gdb > 0 } {
-	verbose "subst1gdb $subst1gdb"
-	verbose "before \"$expcode1b\""
-	verbose "after \"$expcode1c\""
-    }
-
-
-	verbose "Subst for gdb_prompt found = $subst1gdb"
-	set expcode1 "$expcode1c"
-    } else {
-	verbose "No subst for gdb_prompt found"
-	set expcode1 "$expcode1b"
-    }
-    verbose "expcode1 is \"$expcode1\"" 
-    set subst2a [regsub -all {\\r\\n} $expcode1 {\\r+\\n} expcode2a]
-    if { $subst2a > 0 } {
-	verbose "subst2a $subst2a"
-	verbose "before \"$expcode1\""
-	verbose "after \"$expcode2a\""
-    }
-    set subst2b [regsub -all {\r\n} $expcode2a "\r+\n" expcode2]
-    if { $subst2b > 0 } {
-	verbose "subst2b $subst2b"
-	verbose "before \"$expcode2a\""
-	verbose "after \"$expcode2\""
-    }
-
-    set subst3a [regsub -all {\[([^]]*)\\rzz\\n([^]]*)\]} $expcode2 \
-		{[\1\r\n\2]} expcode3a]
-    if { $subst3a > 0 } {
-	verbose "subst3a $subst3a"
-	verbose "before \"$expcode2\""
-	verbose "after \"$expcode3a\""
-    }
-
-    set subst3b [regsub -all {\[([^]]*)\\rzz\\n([^]]*)\]} $expcode3a \
-		{[\1\r\n\2]} expcode3]
-    if { $subst3b > 0 } {
-	verbose "subst3b $subst3b"
-	verbose "before \"$expcode3a\""
-	verbose "after \"$expcode3\""


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-25 23:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-25 23:13 [SCM] archer-muller-windows-multi: Use new common/windows-hdep.h header. * windows-nat.c (windows-hep.h): New include. Remove macros that have been displaced in windows-hdep.h header. (GetModuleFileNameEx): New function variable. (get_module_name): Rewrite using gdb_win_conv_path function. (windows_make_so): Likewise. (windows_create_inferior): Simplify using new header functions. Set maybe modified environment to CreateProcess. Handle Cygwin special environment variables. (bad_GetModuleFileNameEx): New. Replace (bad_GetModuleFileNameExA, bad_GetModuleFileNameExW): Removed. (_initialize_loadable): Adapt to new bad_GetModuleFileNameEx. Try to find K32EnumProcessModules in kernel32 DLL for EnumProcessModules function variable before EnumProcessModules from psapi DLL muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).