Message ID | cover.1715955328.git.aburgess@redhat.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> 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 4C27A384645B for <patchwork@sourceware.org>; Fri, 17 May 2024 14:19:47 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id B3F683858D20 for <gdb-patches@sourceware.org>; Fri, 17 May 2024 14:19:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3F683858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3F683858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715955550; cv=none; b=lloNHOBMdf3y91+DGcQxW9hwdBWRTlT9+ntUHRLaKqTfKkU4PKVljFbnlCeEVyX/GhE4kNsaTYFTakRdGipXFSh8RYvJscnE+W/0iU3O+Vb4xD6yr01B0wY2RUZSWn1SaJBnIEy/dt3CsmLO0IRkM0BMfZ0ILmSpkcUJg10kZ0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715955550; c=relaxed/simple; bh=3N1sk7dm7ToyKRff5JkJ+8b2CAqLU2rULuQjGY9wVc4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=f6+RPyvxXML55OPekxgQtNWeHRWtpbBXgsMDeRH7NYC6NlxRqW2LcFwV0Dh29GJZ4m3An4nDev7NRevkXx6tkecV+qYQdExT9mmXbZ2nnSsUQLhvM90GI7MwCIiaY8a495A/xnpinleBAFp4uVnqNc/Mkf0xDo9cILLO1oN+qII= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715955548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C9xO+MZi4SeVpMJFKSAv6j0CRI+Nh69P2UKJEjQQo98=; b=UobHy2lqJuY87TFbG2seemI9lkD0XWPpyE0vctPa7YlaqqIL/BlSQuTM5LbVzOiGKlO0K6 DqBZdUaDP1A7NwPI+aH1kywnCV7XkjLLnSio5QbD+yXSpO7K9DDmpfAhQd9IAona77jNRo CtFJkb2d5r0WMTNbap5ACGYBO0Z366Q= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-T44OeKB0NW-ZQ5Vzh6etrA-1; Fri, 17 May 2024 10:19:07 -0400 X-MC-Unique: T44OeKB0NW-ZQ5Vzh6etrA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42011360193so48902875e9.3 for <gdb-patches@sourceware.org>; Fri, 17 May 2024 07:19:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715955545; x=1716560345; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C9xO+MZi4SeVpMJFKSAv6j0CRI+Nh69P2UKJEjQQo98=; b=cI0tkc/XgscfIS3PhXKiB0scaCBPkGPeVj0h0z4nICAw15aNJyVIqfVXCsmiXZ6V0J tQ+Zkmj7xVVELyfAZt/nd3Lv+ToDZH0Sm0oh+52BZm8DCtMk9U71lBn7pMxq1IJ//aPx 3P4+MLB25WYzgRfXhqTbPu56frwtXkKlVPNXagiQN/IChs+J990wiBCbETYOVsjbZUC8 ptMCLWqXC4CW87xM/gtaUOkCGHEMyZlt5MjS851p1xlpr3216cLcQtWyk32SOEv3yKwE yYCy9/B/U7lajG9oqapPUrxlarDKsNK3QatY8l1iZo7dXdwiLJPVBcdLiCuiK64DJb/s Od8w== X-Gm-Message-State: AOJu0Yw53X7GsnSJqn+YEntIg9cwQj+s/MfeCdrcb3iIDT9Hek1R2DDD LJBrqNaXGxA0XXPNj1Wu09UorTOjnpTV/3OdWtaOOIRzD4sUX6yfXJox3EuQ3Q07I+acle5WMKJ fB11vZk6R7Vp/84D4rM3NClWegYXjVGy/9ABcxD7UvnY/D7Dt6YKLQUUDufsI/RV8Fx8LBSK8A9 lLwHAzhhKeBcLw2GBOfhD+/dgGfAkXBuIuRiQbKN+7Nsk= X-Received: by 2002:a1c:7910:0:b0:41b:bb90:4af with SMTP id 5b1f17b1804b1-41feaa44138mr213149415e9.20.1715955545232; Fri, 17 May 2024 07:19:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFoyW3bZyC3Jd3qvrMd/PwyEB/OmHfaYOPa3ZHBbA0ARBfpQXmVHK5ocho/yjLbsGpMRaspVA== X-Received: by 2002:a1c:7910:0:b0:41b:bb90:4af with SMTP id 5b1f17b1804b1-41feaa44138mr213149105e9.20.1715955544608; Fri, 17 May 2024 07:19:04 -0700 (PDT) Received: from localhost ([31.111.84.240]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccbe8fb5sm307793975e9.9.2024.05.17.07.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:19:04 -0700 (PDT) From: Andrew Burgess <aburgess@redhat.com> To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com> Subject: [PATCH 0/4] More build-id checking when opening core files Date: Fri, 17 May 2024 15:18:56 +0100 Message-Id: <cover.1715955328.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
More build-id checking when opening core files
|
|
Message
Andrew Burgess
May 17, 2024, 2:18 p.m. UTC
This series start with patch #3. I wanted to improve the build-id checking that GDB does when loading shared libraries as part of opening a core file, I found the existing build-id checks to be rather limited. To write #3 I ended up looking at the mapped file handling in corelow.c, which lead to patches #1 and #2. And patch #4 appeared when I observed that we do similar, but slightly different things in 3 places in GDB, and these could all be merged. --- Andrew Burgess (4): gdb/corefile: remove unavailable target sections gdb/corefile: improve file backed mapping handling gdb: improve shared library build-id check for core-files gdb: unify build-id to objfile lookup code gdb/build-id.c | 42 +- gdb/build-id.h | 21 +- gdb/corelow.c | 379 +++++++++++++----- gdb/solib-aix.c | 6 + gdb/solib-darwin.c | 6 + gdb/solib-dsbt.c | 6 + gdb/solib-frv.c | 6 + gdb/solib-svr4.c | 10 + gdb/solib-target.c | 6 + gdb/solib.c | 369 ++++++++++++++--- gdb/solib.h | 39 +- gdb/solist.h | 22 + gdb/testsuite/gdb.base/corefile.exp | 39 ++ gdb/testsuite/gdb.base/solib-search.exp | 6 +- .../gdb.debuginfod/corefile-mapped-file-1.c | 24 ++ .../gdb.debuginfod/corefile-mapped-file-2.c | 22 + .../gdb.debuginfod/corefile-mapped-file-3.c | 45 +++ .../gdb.debuginfod/corefile-mapped-file.exp | 335 ++++++++++++++++ .../gdb.debuginfod/solib-with-soname-1.c | 39 ++ .../gdb.debuginfod/solib-with-soname-2.c | 41 ++ .../gdb.debuginfod/solib-with-soname.exp | 268 +++++++++++++ gdb/testsuite/lib/gdb.exp | 20 +- 22 files changed, 1587 insertions(+), 164 deletions(-) create mode 100644 gdb/testsuite/gdb.debuginfod/corefile-mapped-file-1.c create mode 100644 gdb/testsuite/gdb.debuginfod/corefile-mapped-file-2.c create mode 100644 gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c create mode 100644 gdb/testsuite/gdb.debuginfod/corefile-mapped-file.exp create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-soname-1.c create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-soname-2.c create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-soname.exp base-commit: ad666becfe075ca7c831ebbf4b44526994395e97