From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18548 invoked by alias); 15 Oct 2007 23:31:49 -0000 Received: (qmail 18537 invoked by uid 22791); 15 Oct 2007 23:31:48 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.168) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 Oct 2007 23:31:45 +0000 Received: by ug-out-1314.google.com with SMTP id o2so1128186uge for ; Mon, 15 Oct 2007 16:31:42 -0700 (PDT) Received: by 10.66.221.5 with SMTP id t5mr8414161ugg.1192491102127; Mon, 15 Oct 2007 16:31:42 -0700 (PDT) Received: from ?78.130.29.140? ( [78.130.29.140]) by mx.google.com with ESMTPS id k5sm5801963nfd.2007.10.15.16.31.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Oct 2007 16:31:40 -0700 (PDT) Message-ID: <4713DBA2.90805@portugalmail.pt> Date: Mon, 15 Oct 2007 23:32:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: Support of gdb for Windows 64 native systems References: <20071013154715.GE29152@adacore.com> <4711021C.8010805@portugalmail.pt> <20071013205105.GA13789@adacore.com> <47114BB7.1000501@portugalmail.pt> <20071014051622.GC13789@adacore.com> <471200C5.6050609@portugalmail.pt> <20071014173921.GD11619@ednor.casa.cgf.cx> <471259B2.6050808@portugalmail.pt> <20071014221603.GA13096@ednor.casa.cgf.cx> <4712A2B9.1070101@portugalmail.pt> <20071015183910.GH14543@ednor.casa.cgf.cx> In-Reply-To: <20071015183910.GH14543@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00410.txt.bz2 Christopher Faylor wrote: > > You took a 'flags = ' out of the first part of an if/else block and put > it before the if block. Doesn't that seem wrong? Shame on me. I should sleep more often :( I stared at it for long, but still somehow missed the fact that the first branch of the 'if' is negated ... This is what I should have written: #ifdef __CYGWIN__ if (!useshell) { cygwin_conv_to_win32_path (exec_file, real_path); toexec = real_path; flags = DEBUG_ONLY_THIS_PROCESS; } else { char *newallargs; sh = getenv ("SHELL"); if (!sh) sh = "/bin/sh"; cygwin_conv_to_win32_path (sh, shell); newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file) + strlen (allargs) + 2); sprintf (newallargs, " -c 'exec %s %s'", exec_file, allargs); allargs = newallargs; toexec = shell; flags = DEBUG_PROCESS; } #else toexec = exec_file; flags = DEBUG_ONLY_THIS_PROCESS; #endif Thanks for your patience. Cheers, Pedro Alves