From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38541 invoked by alias); 29 Jan 2018 17:13:41 -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 38522 invoked by uid 89); 29 Jan 2018 17:13:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=emulator X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr50089.outbound.protection.outlook.com (HELO EUR03-VE1-obe.outbound.protection.outlook.com) (40.107.5.89) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Jan 2018 17:13:33 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com (10.160.211.19) by AM3PR08MB0229.eurprd08.prod.outlook.com (10.161.35.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 17:13:28 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::c95:81b8:c681:ae2]) by AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::c95:81b8:c681:ae2%17]) with mapi id 15.20.0444.016; Mon, 29 Jan 2018 17:13:28 +0000 From: Alan Hayward To: Yao Qi CC: Omair Javaid , Philipp Rudo , "gdb-patches@sourceware.org" , nd Subject: Re: [PATCH v2 0/8] Remove XML files from gdbserver Date: Mon, 29 Jan 2018 17:13:00 -0000 Message-ID: References: <7C97CC6A-92CB-4702-820D-206022F07102@arm.com> <20180125141138.701802b4@ThinkPad> In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM3PR08MB0229;7:+RhTilc3ObzFbG3lUTaZCYkxbKWgVcu/L/+lBA6J38F4c4B/1eQtBjkM8ArE++36AeIwBET2YTT4niFASP01wiOUukLa/hiEwgkqmebsFwaHZXfSeBFezE1JKI1Q1zm33118KQIN5jk0gkhB9KZvOxAc+OxfhX6/zx9SeDVF8430vuSn3w9nAak/UJItHhuQCdG32NUDlxPrFmitM6J+M3So/IM4N852h1qgBGRqKpQg3eBSi0AOQ+aXV23q1qsd x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b45f0887-9f8c-42f1-072a-08d5673b9dac x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:AM3PR08MB0229; x-ms-traffictypediagnostic: AM3PR08MB0229: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(944501161)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:AM3PR08MB0229;BCL:0;PCL:0;RULEID:;SRVR:AM3PR08MB0229; x-forefront-prvs: 0567A15835 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39380400002)(376002)(39860400002)(346002)(396003)(366004)(189003)(199004)(102836004)(99286004)(72206003)(76176011)(53546011)(6506007)(6436002)(2900100001)(53936002)(305945005)(186003)(36756003)(83716003)(82746002)(6916009)(105586002)(54906003)(1411001)(7736002)(86362001)(26005)(2950100002)(66066001)(25786009)(478600001)(6512007)(106356001)(5660300001)(4326008)(3846002)(6246003)(39060400002)(6116002)(93886005)(3660700001)(316002)(2906002)(3280700002)(14454004)(5250100002)(33656002)(97736004)(68736007)(6486002)(229853002)(81156014)(8676002)(8936002)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR08MB0229;H:AM3PR08MB0101.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: tSOddRvYk2MRrNn1H8oagDgZmTgKYbUQJ2sD/8DneyRFmLDXbBsxhzu/LRw/4xk/fbM5PndqsUZEhQbdMrTQSg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <63E22119B043924DA84B6B9C6484A4D7@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: b45f0887-9f8c-42f1-072a-08d5673b9dac X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2018 17:13:28.7571 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR08MB0229 X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00606.txt.bz2 T25seSBqdXN0IHNwb3R0ZWQgdGhpcyB0aHJlYWQuDQoNCj4gT24gMjkgSmFu IDIwMTgsIGF0IDE2OjI4LCBZYW8gUWkgPHFpeWFvbHRjQGdtYWlsLmNvbT4g d3JvdGU6DQo+IA0KPiBIaSBPbWFpciwNCj4gVGhhbmtzIGZvciB0ZXN0aW5n IHRoZXNlIHBhdGNoZXMuLi4NCj4gDQo+IE9uIEZyaSwgSmFuIDI2LCAyMDE4 IGF0IDEwOjMxIFBNLCBPbWFpciBKYXZhaWQgPG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db-patches-return-145133-listarch-gdb-patches=sources.redhat.com@sourceware.org Mon Jan 29 17:24:45 2018 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 50834 invoked by alias); 29 Jan 2018 17:24:45 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 50816 invoked by uid 89); 29 Jan 2018 17:24:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= 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; Mon, 29 Jan 2018 17:24:42 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66CF166226; Mon, 29 Jan 2018 17:24:41 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B3EA60C8B; Mon, 29 Jan 2018 17:24:41 +0000 (UTC) From: Sergio Durigan Junior To: Simon Marchi Cc: Pedro Alves , gdb-patches@sourceware.org, Simon Marchi Subject: Re: [Regression] Segfault on native-extended-gdbserver + fork References: <20180119161628.21611-1-simon.marchi@polymtl.ca> <20180119161628.21611-3-simon.marchi@polymtl.ca> <87efmaebo3.fsf_-_@redhat.com> <931f8b594f7405649778f66ab2960a40@polymtl.ca> <669ec8c3-caa3-6901-b26c-00a7e20bc0d1@redhat.com> <1b82573ce66790c935eaff87b7565907@polymtl.ca> Date: Mon, 29 Jan 2018 17:24:00 -0000 In-Reply-To: <1b82573ce66790c935eaff87b7565907@polymtl.ca> (Simon Marchi's message of "Mon, 29 Jan 2018 11:25:47 -0500") Message-ID: <87mv0w8tnr.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00607.txt.bz2 Content-length: 1764 On Monday, January 29 2018, Simon Marchi wrote: > On 2018-01-29 11:00, Pedro Alves wrote: >> On 01/28/2018 04:50 PM, Simon Marchi wrote: >>> On 2018-01-28 01:32, Sergio Durigan Junior wrote: >>> This means (I just tried it) that it won't show the "[Inferior %d >>> detached]\n" message in that case.=C2=A0 So what I would suggest is >>> putting >>> >>> =C2=A0 if (print_inferior_events) >>> =C2=A0=C2=A0=C2=A0 printf_unfiltered (_("[Inferior %d detached]\n"), pi= d); >>> >>> in its own function, called by both versions of detach_inferior for >>> now (bonus, it de-duplicates the printing of the message).=C2=A0 In the >>> multi-target branch, remote_target::follow_fork (renamed from >>> remote_follow_fork) can call this function in the case where we >>> don't have an inferior object. >> >> But why would we want to print that? We will have already printed >> >> "Detaching after fork from child process PID." >> >> from the common code. When native debugging, in this scenario, >> we don't call detach_inferior either, right? Can't see why >> we'd want to call it for remote. > > It's true that it's a bit of a lie to say "[Inferior PID detached]" if > there never actually was an inferior for that PID. Since we never > print "[Inferior PID detached]" on native in that case, I am fine with > removing the call from remote.c. Sergio, that would fix the crash you > found I think? I was also unsure about printing the message in this case, because there's no real detach happening. I'm fine with not printing it. And yes, removing the call to "detach_inferior" also fixes the problem. I'll prepare a patch. --=20 Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/