From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BJi/BRAcHGEkQgAAWB0awg (envelope-from ) for ; Tue, 17 Aug 2021 16:29:04 -0400 Received: by simark.ca (Postfix, from userid 112) id 0CF5C1EDFB; Tue, 17 Aug 2021 16:29:04 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4AB6B1EA7E for ; Tue, 17 Aug 2021 16:29:03 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 061FD3839405 for ; Tue, 17 Aug 2021 20:29:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 061FD3839405 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629232143; bh=SSWBowBvOgK2/o6pdFwCWHU00x+FCQYKDgXfCzrDSCc=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Lt21MXqremSLzyfHSFUi+JGM5p7PoLhcKeXH3ZI+QQCSCd7EAw+0pmXjIDv0uKsMV NBACLb8KAAT5NuMaMLOsTOZhKNdIrjrNI4z9BVuJcTmAHJ96MK9+iopzKHDSivgoRp QMgzr5ANRIpBsN28uGYO6AU5mIyfrXow7vKr7WA8= Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 6BC133839C68; Tue, 17 Aug 2021 20:26:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6BC133839C68 Received: by mail-pj1-x1030.google.com with SMTP id u21-20020a17090a8915b02901782c36f543so7235691pjn.4; Tue, 17 Aug 2021 13:26: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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SSWBowBvOgK2/o6pdFwCWHU00x+FCQYKDgXfCzrDSCc=; b=gRZXrjGlSMUFwjY91AK46kVP1YQqF4XD9i8yfrRBk0Y+XwBXz2QhNx9hfgq2rKdIxF HbueGjJqrYf5w0/Nd/NENJqqcXXhZMTGKmK4cqUbHnroLhj6xLDOQLz2dXcO5GtMcvT5 E5mWi5zG2UmJTXppG+IpQv2DgKZh8D9Fsn/KpOj0+sa5NYXA0XYYcHQk97N1jC6WolSc jAB4z82DO3PDzeGKxa/4atma/chElP3klpOeeP5rE4zh8Ka9V83+TrJNtq/wrjUn+fl8 MxfprNcwoowpspfV2fgz01fTrOm5Ji6Rw26SoccKKr+H9Tyv4LWdKDbLJeijw7hbfskr Z2QA== X-Gm-Message-State: AOAM532lY9WRX/HV7K8WKWTvtFtSyUUp5+lSpV83kiVAuPvVIe8VjQFt Tet/r8PSlLxT/sl24GM0yMziE3QkOBtE4zL8cvY= X-Google-Smtp-Source: ABdhPJwJAWqaXYiOl6uyOgI++Evvqku7TvKoIIGBEc5WvCeVcYB6fQbPM4AKCCsRpklFPd05lNDKCK56sJtu3XblVtQ= X-Received: by 2002:a62:7e41:0:b029:3e0:9c3f:ab50 with SMTP id z62-20020a627e410000b02903e09c3fab50mr5334688pfc.57.1629232016661; Tue, 17 Aug 2021 13:26:56 -0700 (PDT) MIME-Version: 1.0 References: <20210817010629.593479-1-hjl.tools@gmail.com> <20210817010629.593479-3-hjl.tools@gmail.com> <20210817175733.GI1633923@zorba> In-Reply-To: <20210817175733.GI1633923@zorba> Date: Tue, 17 Aug 2021 13:26:20 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] Extend struct r_debug to support multiple namespaces To: Daniel Walker Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "H.J. Lu via Gdb" Reply-To: "H.J. Lu" Cc: GDB , GNU C Library Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Tue, Aug 17, 2021 at 10:57 AM Daniel Walker wrote: > > On Mon, Aug 16, 2021 at 06:06:29PM -0700, H.J. Lu wrote: > > Glibc does not provide an interface for debugger to access libraries > > loaded in multiple namespaces via dlmopen. > > > > The current rtld-debugger interface is described in the file: > > > > elf/rtld-debugger-interface.txt > > > > under the "Standard debugger interface" heading. This interface only > > provides access to the first link-map (LM_ID_BASE). > > > > Based on the patch from Conan C Huang : > > > > https://sourceware.org/pipermail/libc-alpha/2020-June/115448.html > > > > 1. Bump r_version to 2. This triggers the GDB bug: > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=28236 > > > > 2. Add struct r_debug_extended to extend struct r_debug into a linked-list, > > where each element correlates to an unique namespace. > > 3. Add a hidden symbol, _r_debug_extended, for struct r_debug_extended. > > 4. Provide the compatibility symbol, _r_debug, with size of struct r_debug, > > as an alise of _r_debug_extended, for programs which reference _r_debug. > > > I've attached the GDB patch which was created at Cisco to support our version of > this type of feature which is similar to what you've created. You might be able > to make some small modifications to make it work for you. > > Daniel I will give it a try. Thanks. -- H.J.