From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by sourceware.org (Postfix) with ESMTPS id 86D5C385E006 for ; Fri, 27 Mar 2020 14:20:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 86D5C385E006 Received: by mail-io1-xd31.google.com with SMTP id k9so9988582iov.7 for ; Fri, 27 Mar 2020 07:20:33 -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:from:date:message-id:subject:to; bh=/U04r0/tfVLOLZSCPvAQ3GEdOop14E5k29ZNgjLg5WY=; b=kZmEyXMThjysGC0htAKsc1+4LdBwaSGOLEDWwKHGSttqrL/VXkQxr5B+e6brZAVK2n e9wEBQutbI0Xy9NImwiVKRT+CjRLoZX/cbMzEZwsSy+tcVzWPLpn2aFV02kJXdlMCK6w qQDVqsXW6ooVARhqvjP7oU400ZSFjIbQPHhGQAmUXXGklM9Qw/ZoSx+6C4Wldl6kXIvq KmmHem2waYQlYRft7OXVhEj+HVrSwXbkeGznqjCcVLnrIBdFug2BYNS0eOo4KRyCgHgS egIDXiGxBQbhSY5AuujtS4XJ7nIp1n0Zv01ziXZUN7+4a0tbet6MTG+Cfuz/4f7V5QVx VDcw== X-Gm-Message-State: ANhLgQ1IEpF0zh4kwpySbHtM9RMD2JnbeMAY3I0HHuw+7Li1T/5sU4yH +9Msz3s3Ve2W5IvnUtg/h5lSEyDXLqJDyJdYElyEiRXF0l0= X-Google-Smtp-Source: ADFU+vtMrDgcVzakDifooVbe402iurTNNVqT1Tk6jxM7A4nr7XKUHY/bwekvMvmyOiPyE7tfNLQSHhydphMKgwzBJqY= X-Received: by 2002:a05:6602:2e95:: with SMTP id m21mr12967292iow.110.1585318832806; Fri, 27 Mar 2020 07:20:32 -0700 (PDT) MIME-Version: 1.0 From: Norbert Lange Date: Fri, 27 Mar 2020 15:20:21 +0100 Message-ID: Subject: Automatically fetching Build ID from remote libraries and resole them locally? To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 27 Mar 2020 14:20:35 -0000 Hello, I am mostly remote debugging, and I often have mismatches from the remote binaries and the local build environment (typically this makes thing worse than having no debug info) This can include the app themself, but most commonly its slightly different builds of libraries. Right now I can pick between setting up a sysroot path, or DL the (stripped) libraries from the target. Neither is optimal. If your sysroot is compromised of several builds, its also not feasible to have all combinations of them around. Build-Ids already solve those problems on a local gdb session. Would it be possibly to use the benefits on remote sessions aswell? ie. DL only some ELF headers or remotely inspect the Build-ID, then lookup and resolve the matching library and debuginfo in the debug-file-directory database. Potentially transfer the whole library from the target if that fails. Such a scheme would make connection to a remote target rather foolproof, and allowing other stuff like manually loaded libraries (no valid filename) to work aswell. Norbert