From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19706 invoked by alias); 3 Jan 2007 09:08:55 -0000 Received: (qmail 19696 invoked by uid 22791); 3 Jan 2007 09:08:54 -0000 X-Spam-Check-By: sourceware.org Received: from vir-del-02.spheriq.net (HELO vir-del-02.spheriq.net) (194.50.41.41) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 03 Jan 2007 09:08:46 +0000 Received: from vir-out-02.spheriq.net ([194.50.41.31]) by vir-del-02.spheriq.net with ESMTP id l0398iRC026193 for ; Wed, 3 Jan 2007 09:08:44 GMT Received: from vir-cus-02.spheriq.net (vir-cus-02.spheriq.net [194.50.41.86]) by vir-out-02.spheriq.net with ESMTP id l0398h7f014638 for ; Wed, 3 Jan 2007 09:08:43 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by vir-cus-02.spheriq.net with ESMTP id l0398fst024681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Jan 2007 09:08:42 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BE47BDA42 for ; Wed, 3 Jan 2007 09:08:40 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 77C8747327 for ; Wed, 3 Jan 2007 09:08:40 +0000 (GMT) Received: from [164.129.44.95] (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CJI26786 (AUTH "denis pilat"); Wed, 3 Jan 2007 10:08:39 +0100 (CET) Message-ID: <459B7296.6000808@st.com> Date: Wed, 03 Jan 2007 09:08:00 -0000 From: Denis PILAT User-Agent: Thunderbird 1.5.0.9 (X11/20061206) MIME-Version: 1.0 To: Denis PILAT , gdb-patches Subject: Re: gdbserver with reversed arguments goes into an infinite loop References: <457FCEB6.4060008@st.com> <20061213133737.GA2633@nevyn.them.org> <45802031.2020402@st.com> <20061230154533.GC15107@nevyn.them.org> In-Reply-To: <20061230154533.GC15107@nevyn.them.org> 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-01/txt/msg00059.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Dec 13, 2006 at 04:45:53PM +0100, Denis PILAT wrote: > >> But may be it would be better to open only character device (S_ISCHR >> macro) than excluding ordinary files (S_ISREG macro). It's up to you ! >> > > Good idea. FIFOs are OK too. I've committed a nicer version of this. > > >> I took this opportunity to remove a warning on a strncpy() usage. >> > > Why did it warn? I omitted this bit, because I don't see any reason > (or any warning). > > >> I'm wondering about the compilation of this code under windows. I never >> compiled a gdbserver on windows, is there any gdbserver hosted under >> windows ? >> > > If you were working against HEAD, you'd see that there was now - but > we don't support serial ports there, so it's not a problem. It's all > #ifdef'd out. > > Daniel, Thanks for your commit, I was working on a 6.5 version, so far from the HEAD. About the warning, gcc4.1.1 emit the following: remote-utils.c:653: warning: value computed is not used I think it is because the returned value of strncpy is not used but it seems to be a gcc4.1 problem. Moreover it occures only in -01 or -02. About your patch, the infinite loop has gone but I'm having a segmentation fault when argument are reversed. I'm about to propose a patch in a new mail to avoid confusion. Denis