From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10534 invoked by alias); 4 Jun 2014 20:09:22 -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 10525 invoked by uid 89); 4 Jun 2014 20:09:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Jun 2014 20:09:20 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s54K9I6f027991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Jun 2014 16:09:18 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s54K9Gx8017242; Wed, 4 Jun 2014 16:09:17 -0400 Message-ID: <538F7CEC.9070402@redhat.com> Date: Wed, 04 Jun 2014 20:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [RFA] gdbserver crash if the_target->supports_z_point_type is NULL References: <538F5E3A.8010507@redhat.com> <1401905805-22408-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1401905805-22408-1-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-06/txt/msg00213.txt.bz2 On 06/04/2014 07:16 PM, Joel Brobecker wrote: > Hello, > > When debugging on LynxOS targets (and probably on SPU targets as well), > inserting a breakpoint and resuming the program's execution causes > GDBserver to crash. > > The crash occurs while handling the Z0 packet sent by GDB to insert > our breakpoint, because z_type_supported calls > the_target->supports_z_point_type without checking that it is not NULL > This patch fixes the issue by making z_type_supported return false if > the_target->supports_z_point_type is NULL. > > gdb/gdbserver/ChangeLog: > > PR server/17023 > * mem-break.c (z_type_supported): Return zero if > THE_TARGET->SUPPORTS_Z_POINT_TYPE is NULL. > > Tested on ppx-lynx5. I haven't tested on GNU/Linux, but I feel > sufficiently confident since supports_z_point_type is defined there, > and I am eager to take a look at Windows next. But I can do it > if people think it would be best. OK to push? OK. -- Pedro Alves