From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by sourceware.org (Postfix) with ESMTPS id 13D073858031; Mon, 5 Jul 2021 13:49:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 13D073858031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f45.google.com with SMTP id u8so22153979wrq.8; Mon, 05 Jul 2021 06:49:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Y9w+qIuQkRvlODj3La9vr9Oga1mJbMrzLU6j4WFU6GQ=; b=M05o91NR0OyNW4wTgBS43+c0G1Ue03cJWYlWpikZbjqUMWecEe5Iaw6vAOjuVimb/8 8sPyj3fSWFfCX7yo/s+z/xGADSrpZMJ4dqszVMOCZ4pBB06WK9GmJuG0YLC7rnlX3mQg 7NDdTzyK8y4LzZHg+lv/Q351kVmtjmNPEyHTBaAd6zkMx/gEbHUXnxgMa6uU6cAZgjce EiQD6d9YCJGhFe9INEmiwvR5ptwBcHKUSOL3OtwCXbetAyfLKIscFdZSg/1KJ09qGTdd uZ6D6U9QhuITsQRUEj1pzTb+wRIf+2j9htsDVRVXsqqunx3bu+yo8v0xQrO8pxmzg87o nLiQ== X-Gm-Message-State: AOAM531Mdy4RIACJmP/CObuwpSkYziwoAhMN/sVmfYqS1AYRJCVWdtMz ahlT/rq2AZ1uV3KBo5ByHHNN5VRuTGMiLA== X-Google-Smtp-Source: ABdhPJzG/54zQT06O7r0Sxg1zOcQHsp8JmpYaG63K5+CCCqFPdNuFwC7jZOZNq6kbpBowS7g83lUuA== X-Received: by 2002:a5d:698c:: with SMTP id g12mr15951784wru.309.1625492939350; Mon, 05 Jul 2021 06:48:59 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id a4sm13014348wru.55.2021.07.05.06.48.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 06:48:58 -0700 (PDT) Subject: =?UTF-8?B?UmU6IOWbnuWkje+8mlJl77yaUmXvvJpHREIgb2Z0ZW4gaXMgYmxvY2tl?= =?UTF-8?Q?d_at_async=5ffile=5fflush?= From: Pedro Alves To: =?UTF-8?B?5ZGo5pil5piOKOaXpeaciCk=?= , Simon Marchi , Gdb-patches , gdb-patches References: <0eb7e2ec-44d0-49dc-8765-1ef76c9f7363.riyue.zcm@alibaba-inc.com> <6c63de92-1d02-47f2-bc79-d58edbf2bde1.riyue.zcm@alibaba-inc.com> Message-ID: Date: Mon, 5 Jul 2021 14:48:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <6c63de92-1d02-47f2-bc79-d58edbf2bde1.riyue.zcm@alibaba-inc.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, BODY_8BITS, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2021 13:49:02 -0000 On 2021-07-05 2:11 p.m., 周春明(日月) wrote: > > > I would maybe debug gdb and put a conditional breakpoint at "close" (conditional > on the file descriptor number), trying to catch where the pipe is closed. > > [David] could you detail the conditional breakpoint?   I don't which variable should be used for close.  "b close if xxx==12" ? The fd argument: int close(int fd); b close if fd==12