Message ID | cover.1729940786.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 910783858C35 for <patchwork@sourceware.org>; Sat, 26 Oct 2024 11:12:06 +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 ESMTP id 7803B3858D29 for <gdb-patches@sourceware.org>; Sat, 26 Oct 2024 11:11:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7803B3858D29 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 7803B3858D29 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=1729941091; cv=none; b=ncMan9sEZZWaYPGMwVeXtlcJXSjPrtUpXkC59sbK/uRZAQJ8oJgv7pWJOWk2C0/ZaMszSJPezTVQoe6EUGcH1aBcCQ78Dnjezam8aEyiMjxNbXRmyeWOg4/PQSVpuPCgBF297LdxSrS1vR8qJocOMeIVCso1Y08y1Gcbxi7KlDg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729941091; c=relaxed/simple; bh=nGNjMgbp0IBIZLRttC/WBVmsQOlme/ZS7idCronTbTQ=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=tlprjNiADezAQUU3VFDpWEJF01QWhC1WKsdrsM5qnlXYBTj3l0kkWP44sD2KiivZhHE7jZzhi4BqYxVsnhBPrfLO3cK1G+RvlESCmN2zRj6uZ4KHrGqs4KVv5FiSzjY7lyGYv3R5O29GzL6Ts/6bo3BQuMM+ufvZTmaDtOl/TV8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729941090; 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=Oa1GLgQXiMoUhnLQDircVwfXUXByB+Tvf/XVlzNZyws=; b=M5jRW4+pgWJi0dH6fN64Se9W74pdBvNGHZY6B8ojjsHL12/9FZx7KutrXdlG0F6v0J8yq+ 1MujJtf3atmC9TXksevvt8tWR6wtBu5k+fMgzBSOmPbgNHRHLCfwqA1xbrSwCw2ux6L6QZ 0P/6X2VaaS4sirMJOuaKG9131EnE9o0= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-307-Iu-O6WXGPwioM2HHNUuQcg-1; Sat, 26 Oct 2024 07:11:29 -0400 X-MC-Unique: Iu-O6WXGPwioM2HHNUuQcg-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a9a0710ca24so177371466b.3 for <gdb-patches@sourceware.org>; Sat, 26 Oct 2024 04:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729941087; x=1730545887; 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=Oa1GLgQXiMoUhnLQDircVwfXUXByB+Tvf/XVlzNZyws=; b=n46OrxE178tI9BYxw0eEWkNqxnUBmaDixQFnu1wrS6UP3nWeHwxktyMlulOTQH032J BX3n7YX61BLv3wNx4MxUgblk3IVuIma3p4AKLOVfzKSkpxXcIus8N5azquonS3SdV/LD qo1giToPidZKguLwxiEB79ZKfvjOT5cd3yUNXZ2K2wiYm6qvh8kqPslnyYQWkEuHq8HS 0JlJdu10YtAL5uirtbF/9NNBGOX08Bfl3/3gsQQdWZ+MBmNpwHxGlKni0tJxacS2MvUD SAjVPOJiXv5y38hgsGhsmZq3Ai3jgaEpfdKZcWyfq6eNT9zTogQu2np5vH1SVGrnaL6j LF9w== X-Gm-Message-State: AOJu0YwlJZwhYbQOoNnhMVbeurUQE4dKpl1RY2hqKoNYWzIsbO5lE8jr gdTvUzp6UXsvAAmtfZPabHeyC5fg+nfuLJUsLefj2fLX4DD9auRXwx8K5bG6lXPzube25DcH2G8 BLx77kKDBMuhQ2Z2urtQU/dcqKpxIbqn5DYOLRBxM95PFGJwGrPZhOU+h2t4kPd0kr3wSEEK/9/ i/YR9nhgw5g5JcdbnSRKLHPetUvUAagwWrghmqlnB6P9U= X-Received: by 2002:a17:906:da8a:b0:a9a:6ac3:92e with SMTP id a640c23a62f3a-a9de5ce68f8mr202398366b.23.1729941086707; Sat, 26 Oct 2024 04:11:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+NpitzYT19vKql2IHszhAnCvNzU/xM3ERauXA1lBsoHdzW2HgcNGDRkura5K6CaIZqOotAg== X-Received: by 2002:a17:906:da8a:b0:a9a:6ac3:92e with SMTP id a640c23a62f3a-a9de5ce68f8mr202394966b.23.1729941086215; Sat, 26 Oct 2024 04:11:26 -0700 (PDT) Received: from localhost (92.40.184.80.threembb.co.uk. [92.40.184.80]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b3a088ae9sm162765866b.217.2024.10.26.04.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2024 04:11:25 -0700 (PDT) From: Andrew Burgess <aburgess@redhat.com> To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com> Subject: [PATCH 0/5] Better executable auto-loading when opening a core file Date: Sat, 26 Oct 2024 12:11:18 +0100 Message-Id: <cover.1729940786.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=-4.8 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_H2, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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 |
Better executable auto-loading when opening a core file
|
|
Message
Andrew Burgess
Oct. 26, 2024, 11:11 a.m. UTC
There's actually a couple of core file related improvements in this series. Patches #1 and #2 improve what information GDB can extract about the execution context (executable name, inferior arguments, and environment) when opening a core file. Then patch #4 improves GDB's ability to auto-load the executable that matches a core file (on GNU/Linux). Patch #3 is a testsuite refactor to allow for patch #4. And patch #5 replicates patch #4, but for FreeBSD. Thanks, Andrew --- Andrew Burgess (5): gdb: add gdbarch method to get execution context from core file gdb: parse and set the inferior environment from core files gdb/testsuite: make some of the core file / build-id tests harder gdb: improve GDB's ability to auto-load the exec for a core file gdb/freebsd: port core file context parsing to FreeBSD gdb/arch-utils.c | 26 ++ gdb/arch-utils.h | 89 +++++ gdb/corefile.c | 10 + gdb/corelow.c | 172 +++++++++- gdb/fbsd-tdep.c | 134 ++++++++ gdb/gdbarch-gen.c | 22 ++ gdb/gdbarch-gen.h | 15 + gdb/gdbarch.h | 1 + gdb/gdbarch_components.py | 20 ++ gdb/linux-tdep.c | 308 ++++++++++++++++++ gdb/testsuite/gdb.base/coredump-filter.exp | 17 +- gdb/testsuite/gdb.base/corefile-buildid.exp | 252 ++++++-------- .../gdb.base/corefile-exec-context.c | 25 ++ .../gdb.base/corefile-exec-context.exp | 165 ++++++++++ gdb/testsuite/gdb.base/corefile-find-exec.c | 25 ++ gdb/testsuite/gdb.base/corefile-find-exec.exp | 252 ++++++++++++++ gdb/testsuite/gdb.base/corefile.exp | 9 + 17 files changed, 1379 insertions(+), 163 deletions(-) create mode 100644 gdb/testsuite/gdb.base/corefile-exec-context.c create mode 100644 gdb/testsuite/gdb.base/corefile-exec-context.exp create mode 100644 gdb/testsuite/gdb.base/corefile-find-exec.c create mode 100644 gdb/testsuite/gdb.base/corefile-find-exec.exp base-commit: 2bba46058789196c1c384896933cbc9692ef4933