From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13403 invoked by alias); 18 Jun 2010 22:24:48 -0000 Received: (qmail 13394 invoked by uid 22791); 18 Jun 2010 22:24:46 -0000 X-SWARE-Spam-Status: No, hits=1.5 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT,RCVD_IN_JMF_BL,TW_BT,TW_DB X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jun 2010 22:24:40 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o5IMOOd9035188 ; Sat, 19 Jun 2010 00:24:24 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms7.u-strasbg.fr [IPv6:2001:660:2402:d::16]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o5IMONpj041688 ; Sat, 19 Jun 2010 00:24:23 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o5IMOMmA016900 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Sat, 19 Jun 2010 00:24:22 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Hui Zhu'" , Cc: "'Keith Seitz'" References: In-Reply-To: Subject: [OBV] Fix Build gdbtk-cmds.c get error Date: Fri, 18 Jun 2010 22:24:00 -0000 Message-ID: <001201cb0f35$04c60240$0e5206c0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2010-q2/txt/msg00029.txt.bz2 > -----Message d'origine----- > De=A0: insight-owner@sourceware.org [mailto:insight-owner@sourceware.org] > De la part de Hui Zhu > Envoy=E9=A0: Thursday, June 17, 2010 4:18 AM > =C0=A0: insight@sourceware.org > Objet=A0: Re: Build gdbtk-cmds.c get error >=20 > Ping. I checked the following in: Note that it fixes the val_print problem and also cygwin specific problems to=20 allow compilation with both 1.5 and 1.7 cygwin... For the cygwin_conv_path function, I used the same macros as in gdb/windows-nat.c source. Please feel free to suggest better fixes. I didn't dare to change GDB_val_print function, as this could have implications for tcl/tk scripts... Am I right on this? =20=20 Pierre PS: I only fixed compilation and I am still unable to=20 really test cygwin insight :( 2010-06-18 Pierre Muller * generic/gdbtk-cmds.c: Add cygwin macros to allow compilation=20 with old or recent cygwin version. (gdb_path_conv): Use cygwin_conv_path function. (gdb_eval): Adapt to new field in val_print. * generic/gdbtk-register.c (get_register): Likewise. * generic/gdbtk-wrapper.c (wrap_val_print): Likewise. * generic/gdbtk.c (_initialize_gdbtk): Use cygwin_attach_handle_to_fd call to allow compilation with old and new cygwin version. Index: generic/gdbtk-cmds.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v retrieving revision 1.117 diff -u -p -r1.117 gdbtk-cmds.c --- generic/gdbtk-cmds.c 12 Mar 2010 18:34:12 -0000 1.117 +++ generic/gdbtk-cmds.c 18 Jun 2010 22:13:12 -0000 @@ -74,6 +74,20 @@ =20 #ifdef __CYGWIN__ #include /* for cygwin_conv_to_full_win32_path */ +#include +# if CYGWIN_VERSION_DLL_MAKE_COMBINED(CYGWIN_VERSION_API_MAJOR,CYGWIN_VERSION_API _MINOR) >=3D 181 +# define __USEWIDE +# else +# define CCP_POSIX_TO_WIN_A 0=20 +# define CCP_POSIX_TO_WIN_W 1 +# define CCP_WIN_A_TO_POSIX 2=20 +# define CCP_WIN_W_TO_POSIX 3 +# define cygwin_conv_path(op, from, to, size) \ + (op =3D=3D CCP_WIN_A_TO_POSIX) ? \ + cygwin_conv_to_full_posix_path (from, to) : \ + cygwin_conv_to_win32_path (from, to) +# define CW_SET_DOS_FILE_WARNING -1 /* no-op this for older Cygwin */ +# endif #endif =20 #ifdef HAVE_CTYPE_H @@ -640,7 +654,7 @@ gdb_eval (ClientData clientData, Tcl_Int make_cleanup_ui_file_delete (stb); val_print (value_type (val), value_contents (val), value_embedded_offset (val), value_address (val), - stb, 0, &opts, current_language); + stb, 0, val, &opts, current_language); result =3D ui_file_xstrdup (stb, &dummy); Tcl_SetObjResult (interp, Tcl_NewStringObj (result, -1)); xfree (result); @@ -2874,8 +2888,8 @@ gdb_path_conv (ClientData clientData, Tc { char pathname[256], *ptr; =20 - cygwin_conv_to_full_win32_path (Tcl_GetStringFromObj (objv[1], NULL), - pathname); + cygwin_conv_path (CCP_POSIX_TO_WIN_A, Tcl_GetStringFromObj (objv[1], NULL), + pathname, 256); for (ptr =3D pathname; *ptr; ptr++) { if (*ptr =3D=3D '\\') Index: generic/gdbtk-register.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v retrieving revision 1.38 diff -u -p -r1.38 gdbtk-register.c --- generic/gdbtk-register.c 7 Jul 2009 12:38:56 -0000 1.38 +++ generic/gdbtk-register.c 18 Jun 2010 22:13:12 -0000 @@ -343,11 +343,11 @@ get_register (int regnum, map_arg arg) gdbarch_register_name (get_current_arch (), regnum)) =3D=3D 0)) { val_print (FIELD_TYPE (TYPE_FIELD (reg_vtype, 0)), buffer, 0, 0, - stb, 0, &opts, current_language); + stb, 0, NULL, &opts, current_language); } else val_print (reg_vtype, buffer, 0, 0, - stb, 0, &opts, current_language); + stb, 0, NULL, &opts, current_language); } =20=20=20 res =3D ui_file_xstrdup (stb, &dummy); Index: generic/gdbtk-wrapper.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-wrapper.c,v retrieving revision 1.18 diff -u -p -r1.18 gdbtk-wrapper.c --- generic/gdbtk-wrapper.c 15 Dec 2008 18:06:12 -0000 1.18 +++ generic/gdbtk-wrapper.c 18 Jun 2010 22:13:12 -0000 @@ -218,7 +218,7 @@ wrap_val_print (char *a) recurse =3D (*args)->args[6].integer; opts.pretty =3D (enum val_prettyprint) (*args)->args[7].integer; =20 - val_print (type, valaddr, 0, address, stream, recurse, &opts, + val_print (type, valaddr, 0, address, stream, recurse, NULL, &opts, current_language); return 1; } Index: generic/gdbtk.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v retrieving revision 1.50 diff -u -p -r1.50 gdbtk.c --- generic/gdbtk.c 6 Apr 2009 23:33:32 -0000 1.50 +++ generic/gdbtk.c 18 Jun 2010 22:13:13 -0000 @@ -709,15 +709,15 @@ _initialize_gdbtk () break; default: AllocConsole (); - cygwin32_attach_handle_to_fd ("/dev/conin", 0, - GetStdHandle (STD_INPUT_HANDLE), - 1, GENERIC_READ); - cygwin32_attach_handle_to_fd ("/dev/conout", 1, - GetStdHandle (STD_OUTPUT_HANDLE), - 0, GENERIC_WRITE); - cygwin32_attach_handle_to_fd ("/dev/conout", 2, - GetStdHandle (STD_ERROR_HANDLE), - 0, GENERIC_WRITE); + cygwin_attach_handle_to_fd ("/dev/conin", 0, + GetStdHandle (STD_INPUT_HANDLE), + 1, GENERIC_READ); + cygwin_attach_handle_to_fd ("/dev/conout", 1, + GetStdHandle (STD_OUTPUT_HANDLE), + 0, GENERIC_WRITE); + cygwin_attach_handle_to_fd ("/dev/conout", 2, + GetStdHandle (STD_ERROR_HANDLE), + 0, GENERIC_WRITE); break; } }