From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 99FBA1F8C6 for ; Tue, 17 Aug 2021 20:30:02 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D35653951899 for ; Tue, 17 Aug 2021 20:30:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D35653951899 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629232201; 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=HEo61suQzBV0OjvKJv7QH5h1/Z87w/GCGj74UPnS4najofkjkVuuPhvya1XoDxEI7 SIMcsnwgH0+TkBT1ix290dXSOj7pfRnb3KxtETgxFX9jHAsU4VpwKQoZ4Prmo0LrH3 PhdUk/nSgFWL/s1IM4CC68CzMU1j9hCM1l8MUDyA= 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: 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: , From: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: GDB , GNU C Library Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" 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.