From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15877 invoked by alias); 18 Oct 2019 12:27:27 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 15868 invoked by uid 89); 18 Oct 2019 12:27:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,MIME_CHARSET_FARAWAY,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=dose, H*f:sk:6fea79c, H*MI:sk:6fea79c, HX-Languages-Length:815 X-HELO: mail-qt1-f175.google.com Received: from mail-qt1-f175.google.com (HELO mail-qt1-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 12:27:25 +0000 Received: by mail-qt1-f175.google.com with SMTP id c21so8717512qtj.12 for ; Fri, 18 Oct 2019 05:27:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=b+BGId76RUQPgQ4OcvwK6vFHacU9B0qsQg6HDrrUbIs=; b=Xg4Cf6FbLVv6eqgmnZXo3AbPOf4Tci+dGiH4QbtUStX6m7QO8BW7/Dq1aoWp9ZuPFb RuIPY/hl2xl75Hlgd4t+Y92MpZkL8ElBG6RFcwoY9HaDpvLj4YhifGB0SbAjXwNddiIu Q3d277NeMFcSayyvqzcRw3HcstgRUbWPX6StNMsbmMm14j7sTDX/JhbYCpDHMjvsnNCf bvV3yG0sJ5tBwNgNtXZ4cSd42pMZuihc24wcHpz7fc++OXItSIhybWLPxZKhksd5bjic lcl5f2/jCiDENg0xLd5pISTvHJO+VB6w24zCjUTQdT0Edjg+qbx0Igs99BI3aDxAAkIF cTOw== Return-Path: Received: from [192.168.15.21] (201-42-175-128.dsl.telesp.net.br. [201.42.175.128]) by smtp.gmail.com with ESMTPSA id s17sm2657521qkg.79.2019.10.18.05.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2019 05:27:23 -0700 (PDT) Subject: Re: gdbserver for arm does not support multi-process debugging To: =?UTF-8?B?5YiY5bq3?= , gdb@sourceware.org References: <6fea79cd.5d47.16dd85f053a.Coremail.lkang0305@163.com> From: Luis Machado Message-ID: <73071c36-cbe3-aacf-36fe-4097dc6a0817@linaro.org> Date: Fri, 18 Oct 2019 12:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6fea79cd.5d47.16dd85f053a.Coremail.lkang0305@163.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00019.txt.bz2 Hi, On 10/17/19 3:19 AM, Áõ¿µ wrote: > Dear gdb@sourceware.org > > > I am researching the gdbserver's source code for ARM, what confused me is that it does not support multi-process to debug the target's child process, cause it dose not interesting in PTRACE_EVENT_FORK, I don't know whether it's a bug or it's just a feature by design. The handling of PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK and PTRACE_EVENT_CLONE is in generic linux code. See gdb/gdbserver/linux-low.c:handle_extended_wait. As long as the kernel supports reporting such events via ptrace and we are debugging using extended remote mode (not regular remote mode), it should work. If it doesn't, then we may have a problem that we should fix. Does that answer your question? Luis