From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2752 invoked by alias); 5 Aug 2010 16:07:54 -0000 Received: (qmail 2730 invoked by uid 22791); 5 Aug 2010 16:07:51 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_00,RCVD_ILLEGAL_IP X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 16:07:45 +0000 Received: from eusaamw0707.eamcs.ericsson.se ([147.117.20.32]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id o75G948K031835; Thu, 5 Aug 2010 11:09:09 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.134]) by eusaamw0707.eamcs.ericsson.se ([147.117.20.32]) with mapi; Thu, 5 Aug 2010 12:07:40 -0400 From: Marc Khouzam To: "'Pedro Alves'" , "'gdb-patches@sourceware.org'" Date: Thu, 05 Aug 2010 16:07:00 -0000 Subject: RE: [MI] Fix segfault for -remove-inferior Message-ID: References: <201008051547.46328.pedro@codesourcery.com> In-Reply-To: <201008051547.46328.pedro@codesourcery.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2010-08/txt/msg00038.txt.bz2 =20 > You can run the testsuite in parallel make mode nowadays. E.g., > on my laptop, "make check -j4" only takes around 5 minutes. Cool! I just ran it 4 or 5 times, since it was so fast :-) Same results before and after the patch. > > OK? >=20 > Looks obviously correct to me. Checked-in to HEAD and 7_2. Thanks Marc >=20 > --=20 > Pedro Alves >=20 > > GNU gdb (GDB) 7.2.50.20100727-cvs > > Copyright (C) 2010 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later=20 > > > This is free software: you are free to change and redistribute it. > > There is NO WARRANTY, to the extent permitted by law. Type=20 > "show copying" > > and "show warranty" for details. > > This GDB was configured as "i686-pc-linux-gnu". > > For bug reporting instructions, please see: > > . > > (gdb) interpreter-exec mi "-remove-inferior i1" > > Segmentation fault > >=20 > >=20 > > 2010-08-04 Marc Khouzam > >=20 > > * mi/mi-main.c (mi_cmd_remove_inferior): Properly=20 > access first argument. > >=20 > >=20 > > ### Eclipse Workspace Patch 1.0 > > #P src > > Index: gdb/mi/mi-main.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: /cvs/src/src/gdb/mi/mi-main.c,v > > retrieving revision 1.178 > > diff -u -r1.178 mi-main.c > > --- gdb/mi/mi-main.c 11 Jun 2010 15:36:07 -0000 1.178 > > +++ gdb/mi/mi-main.c 4 Aug 2010 19:40:19 -0000 > > @@ -1609,7 +1609,7 @@ > > if (argc !=3D 1) > > error ("-remove-inferior should be passed a single argument"); > >=20=20 > > - if (sscanf (argv[1], "i%d", &id) !=3D 1) > > + if (sscanf (argv[0], "i%d", &id) !=3D 1) > > error ("the thread group id is syntactically invalid"); > >=20=20 > > inf =3D find_inferior_id (id); > >=20=20 >=20