From patchwork Mon Aug 16 15:27:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 44670 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F592394AC03 for ; Mon, 16 Aug 2021 15:28:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F592394AC03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629127735; bh=8N5Ba/Mm7RaTiTq/7Sp0JqBCK8/zaRlUw9dONmIVr3E=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=E9aGGXNKKQ0p8MOY2nbaMTuVMuNIlk5IxuTtLqVuhKPUKR1XHZCUtiAJOPO+nq1QC 4VhiUZWItAPFgkd0AhLgiKNzXSQ6rHCyUMDfvF2z138waxayXqmlYJhmH+Tb+k35As lTapMtLzkGU6HY9iKE2zDx+APtC4Ew0UbpY8UxI4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 25CC2385742B; Mon, 16 Aug 2021 15:27:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 25CC2385742B Received: by mail-pj1-x1033.google.com with SMTP id bo18so27227140pjb.0; Mon, 16 Aug 2021 08:27:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=8N5Ba/Mm7RaTiTq/7Sp0JqBCK8/zaRlUw9dONmIVr3E=; b=N/bUtf5kOGEV9/ZD7lyQBp8PHsY+EyeSyXwiHGt1X00GrpiuEqy+Gg8WrV1ijruwAJ wVqRMGVujUJccFIGDV8F0+V9WsmnDqfSw/QQ4NHbJJzx4VQXMsZ+ajAF2sssfWq9uJYp VFkt4icTxmKQ5P8jLCGvqDiFaVCJdvFaVaeIKtgt6WmreoRSNAiuxhV49ZI2yY04XTyW KSHRPpZhgx8ilmKh9qNG6d4p7kPPI88MsSQ/gO6LT3vmsyMtGnjtNLUMzdxliFnpmz2Z nWqClqc2VLw6sgR2NsB4PsEhbkXnwN++zd45DfP9rCmkAPo88++Soxq7tpekaK0wCOwV 55iA== X-Gm-Message-State: AOAM531s/VhTJeF9a5YNpN/x0eeU3RfKwhq4zqM3Xuy5zo7nIdYxL6q4 NSOMSqTwWzMUDdPLgnOUCpA/LyfUXBE= X-Google-Smtp-Source: ABdhPJyklDdob6n5GK0aQbO2nlznCLMHJlKMwKPGOWFavOJry0033lbgZuRLR2u5Gc5nmMaPNnuZOA== X-Received: by 2002:a63:2f04:: with SMTP id v4mr16300825pgv.380.1629127676127; Mon, 16 Aug 2021 08:27:56 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.58.38.240]) by smtp.gmail.com with ESMTPSA id 128sm11990305pfe.55.2021.08.16.08.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 08:27:55 -0700 (PDT) Received: by gnu-cfl-2.localdomain (Postfix, from userid 1000) id 90FB1C0360; Mon, 16 Aug 2021 08:27:54 -0700 (PDT) Date: Mon, 16 Aug 2021 08:27:54 -0700 To: gdb-patches@sourceware.org, GNU C Library Subject: [PATCH] gdbserver: Check r_version < 1 for Linux debugger interface Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3033.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Update gdbserver to check r_version < 1 instead of r_version != 1 so that r_version can be bumped for a new field in the glibc debugger interface to support multiple namespaces. PR gdb/11839 * linux-low.cc (linux_process_target::qxfer_libraries_svr4): Check r_version < 1 instead of r_version != 1. --- gdbserver/linux-low.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index 5c6191d941c..fc7a995351d 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -6845,7 +6845,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex, if (linux_read_memory (priv->r_debug + lmo->r_version_offset, (unsigned char *) &r_version, sizeof (r_version)) != 0 - || r_version != 1) + || r_version < 1) { warning ("unexpected r_debug version %d", r_version); }