From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28255 invoked by alias); 5 Feb 2015 14:06:54 -0000 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 Received: (qmail 28234 invoked by uid 89); 5 Feb 2015 14:06:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 05 Feb 2015 14:06:53 +0000 Received: from EUSAAHC007.ericsson.se (Unknown_Domain [147.117.188.93]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 90.FC.25146.F7913D45; Thu, 5 Feb 2015 08:19:27 +0100 (CET) Received: from [142.133.111.161] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.95) with Microsoft SMTP Server id 14.3.210.2; Thu, 5 Feb 2015 09:06:50 -0500 Message-ID: <54D378FA.1090809@ericsson.com> Date: Thu, 05 Feb 2015 14:06:00 -0000 From: Antoine Tremblay User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: , Subject: Re: [PATCH] gdbserver: Fix crash when QTinit is handled with no inferior process attached References: <1422387337-32334-1-git-send-email-antoine.tremblay@ericsson.com> <54D37065.4020303@ericsson.com> <54D37228.2000309@codesourcery.com> <54D373C3.5040201@codesourcery.com> <54D375DD.5090704@ericsson.com> <54D3787A.60605@codesourcery.com> In-Reply-To: <54D3787A.60605@codesourcery.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00125.txt.bz2 On 02/05/2015 09:04 AM, Luis Machado wrote: > On 02/05/2015 11:53 AM, Antoine Tremblay wrote: >> Hi, >> I'm quite new to gdb, but in general I would argue that it's better >> to make a program resilient to wrong input then to sanitize the input, >> let's say someday something else then gdb would use gdbserver....? > > It is certainly a valid concern. > >> >> But I sure would like to take a look at your patch if you have it >> handy ? > > I just need to extract it from the tree and do a bit of an update. We > could probably merge both to robustify the tracepoint mechanism. > Yes that's sounds a good idea :) Thanks! >> On 02/05/2015 08:44 AM, Luis Machado wrote: >>> On 02/05/2015 11:37 AM, Luis Machado wrote: >>>> On 02/05/2015 11:30 AM, Antoine Tremblay wrote: >>>>> ping >>>>> >>>>> On 01/27/2015 02:35 PM, Antoine Tremblay wrote: >>>>>> When gdbserver is called with --multi and attach has not been >>>>>> called yet >>>>>> and tstart is called on the gdb client, gdbserver would crash. >>>>>> This patch fixes gdbserver so that it returns E01 to the gdb client. >>>> >>>> Wouldn't it make more sense to prevent GDB from sending any tracepoint >>>> packets that require a running inferior if there is none? >>>> >>>> I remember fixing this in a local tree but on GDB's side. I think >>>> it is >>>> remote.c:remote_trace_init and other related functions. >>>> >>>> What do you think? >>> >>> I've looked around and found the patch in a local tree of mine. It >>> fixes more cases of tracepoint commands that require a running >>> inferior. >>> >>> I could revive and submit it if it makes things easier. >>> >> >