From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18238 invoked by alias); 19 Mar 2012 12:08:51 -0000 Received: (qmail 18230 invoked by uid 22791); 19 Mar 2012 12:08:49 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from outdoor.onevision.de (HELO outdoor.onevision.de) (212.77.172.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Mar 2012 12:08:27 +0000 Received: from sanders.onevision.de (moonrace [212.77.172.62]) by outdoor.onevision.de (8.14.3/8.13.7/ROSCH/DDB) with ESMTP id q2JC8KcL019258 for ; Mon, 19 Mar 2012 13:08:25 +0100 Received: from [192.168.5.32] ([192.168.5.32]) by sanders.onevision.de (Lotus Domino Release 8.5.1FP3) with ESMTP id 2012031913081533-119309 ; Mon, 19 Mar 2012 13:08:15 +0100 Message-ID: <4F6721AE.1070406@onevision.com> Date: Mon, 19 Mar 2012 12:08:00 -0000 From: Roland Schwingel User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: insight@sourceware.org Subject: [PATCH] Compliancy to windows 64bit Content-Type: multipart/mixed; boundary="------------070406080805030401040508" 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: 2012-q1/txt/msg00026.txt.bz2 This is a multi-part message in MIME format. --------------070406080805030401040508 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-length: 671 Hi... On windows 64bit datatype long remains to be 32bit (as opposed to eg. linux/mac where it is extended to also be 64bit). This yields to some (easy to fix) problems for insight. The attached patch fixes this. Changelog: 2012-03-19 Roland Schwingel * generic/gdbtk-register.c (get_register_types): Cast result of TYPE_FIELD_TYPE to size_t instead of long. (gdb_regformat): on windows 64bit use strtoll instead of strtol. * generic/gdbtk-stack.c (gdb_get_vars_command): Don't cast clientData to long. Here checking of non NULL clientData is enough. Any comments? Is this ok? Roland --------------070406080805030401040508 Content-Transfer-Encoding: 7bit Content-Type: text/plain; name="win64_gdbtk-register.c.patch" Content-Disposition: attachment; filename="win64_gdbtk-register.c.patch" Content-length: 1288 --- gdbtk_orig/generic/gdbtk-register.c 2012-01-03 13:26:56.000000000 +0100 +++ gdbtk/generic/gdbtk-register.c 2012-03-05 12:04:17.458812300 +0100 @@ -240,7 +240,7 @@ { Tcl_Obj *ar[3], *list; char *buff; - buff = xstrprintf ("%lx", (long)TYPE_FIELD_TYPE (reg_vtype, i)); + buff = xstrprintf ("%lx", (size_t)TYPE_FIELD_TYPE (reg_vtype, i)); ar[0] = Tcl_NewStringObj (TYPE_FIELD_NAME (reg_vtype, i), -1); ar[1] = Tcl_NewStringObj (buff, -1); if (TYPE_CODE (TYPE_FIELD_TYPE (reg_vtype, i)) == TYPE_CODE_FLT) @@ -256,7 +256,7 @@ { Tcl_Obj *ar[3], *list; char *buff; - buff = xstrprintf ("%lx", (long)reg_vtype); + buff = xstrprintf ("%lx", (size_t)reg_vtype); ar[0] = Tcl_NewStringObj (TYPE_NAME(reg_vtype), -1); ar[1] = Tcl_NewStringObj (buff, -1); if (TYPE_CODE (reg_vtype) == TYPE_CODE_FLT) @@ -497,7 +497,11 @@ if (Tcl_GetIntFromObj (interp, objv[0], ®no) != TCL_OK) return TCL_ERROR; + #ifdef _WIN64 + type = (struct type *)strtoll (Tcl_GetStringFromObj (objv[1], NULL), NULL, 16); + #else type = (struct type *)strtol (Tcl_GetStringFromObj (objv[1], NULL), NULL, 16); + #endif fm = (int)*(Tcl_GetStringFromObj (objv[2], NULL)); numregs = (gdbarch_num_regs (get_current_arch ()) --------------070406080805030401040508 Content-Transfer-Encoding: 7bit Content-Type: text/plain; name="win64_gdbtk-stack.c.patch" Content-Disposition: attachment; filename="win64_gdbtk-stack.c.patch" Content-length: 327 --- gdbtk_orig/generic/gdbtk-stack.c 2012-03-05 09:19:01.000000000 +0100 +++ gdbtk/generic/gdbtk-stack.c 2012-03-14 11:56:31.851248200 +0100 @@ -289,7 +289,7 @@ return TCL_ERROR; } - arguments = (long) clientData; + arguments = clientData!=NULL?1:0; /* Initialize the result pointer to an empty list. */ --------------070406080805030401040508--