From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id C14893858C20 for ; Wed, 9 Nov 2022 15:31:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C14893858C20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x631.google.com with SMTP id m22so10447838eji.10 for ; Wed, 09 Nov 2022 07:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=T4jqwJwhB3RpOcboXR+iGr3n7FulRmAVmQgj/L0Y2Dw=; b=Zfh7XTQ1vKZwtg/e3/KqCQVmue+zExtki1eMY5aJH+OP0DXHQuqfDFGorRQIC+WrpD 3iugnrEt8KtqhA3Yr/P3dN36wY55tDx2QXmKFIA4O9AUjXB/rFjGT+hHk8r0ZT68MjXS ASx9n2aufrlH5SqIFOK4G7O2LQsvyKmhfFDr+qD/m08O46aKVvek1y1NNekUPXx7Ogb1 d0bHi7sFhkuWlCRcOwZLtY2G4EEtiU7GmGyyUmVz8CX4W4WXDiOMUeetMlSGUlxvUNQS J/nW5nvqHC8GWFUisAYbCInJQ+4Kxe2gFpg8zNyg2ogUyHje2lihhYtDG5Rq6biyt34D NHvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=T4jqwJwhB3RpOcboXR+iGr3n7FulRmAVmQgj/L0Y2Dw=; b=sg492kHfrvQLNUBbv2HOKD/ia65CYiGF6DGDhiasXRD1BFBRm3IzXut5EP7KFh+P68 dn6n32FWg+MuLP1da5VdotfE3zA4q0GiUZslk0lbbBCWLiYv1h5JlhK7rQA3lIN6LGy9 1OH6ZhDRJufnffYyHHvZxSDG48eBcQDbzVo7zNQLghk9w7WEeADBvkzoMeKA+Jtxl9Wx UhzRa89U+VhtAsHvuP2JrYYKduZpQMfVtErwJ1Bvlq+Vw5TJQsJVrE9FmHB9QUF7eLjA Nlx78ZRk46PgMXQfdVFYWVf6zq2039X6CKN3BLGlOrNO4PkY2CbPOYV2g776ZbEFRNwq ojng== X-Gm-Message-State: ACrzQf008g+9PBwveptta+AP9Y0qimr4Y5O1QwV8uAl0fU2Y9ScJG2HV z7pUH2Ns4hx+1wA4Pjfxkccvfb+0dMBtJUwJDSkT5Y6pbsI= X-Google-Smtp-Source: AMsMyM5ayBO6TtXQ8/G/aPEA4PfavHeR8660EDIBRlcgPOqyDP9QROsAg7r0YofEwaUZNBTSRi41Q5eerdTKKAHxhlE= X-Received: by 2002:a17:907:62a7:b0:789:48ea:ddb0 with SMTP id nd39-20020a17090762a700b0078948eaddb0mr55159773ejc.575.1668007867288; Wed, 09 Nov 2022 07:31:07 -0800 (PST) MIME-Version: 1.0 From: tangming chen Date: Wed, 9 Nov 2022 23:30:56 +0800 Message-ID: Subject: some questions about the underlying implementation principle of gdb To: gdb@sourceware.org Content-Type: multipart/alternative; boundary="000000000000698f2105ed0b5848" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000698f2105ed0b5848 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello: I am an undergraduate, and i am studying gdb. I have some questions about the underlying implementation principle of gdb. I learned that the implementation of gdb is related to ptrace. Therefore=EF=BC=8Chow does gdb debug programs through ptrace? More specifi= cally, I recently learned the awatch command=EF=BC=8Cignore command(ignore n number = (n is watchpoint number))=EF=BC=8Ccontinue command. how does gdb implement the commands=EF=BC=88awatch ignore continue=EF=BC=89=EF=BC=9F Thank you! --000000000000698f2105ed0b5848--