From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id 8CBE93858D37 for ; Mon, 18 Mar 2024 16:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CBE93858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=obs.cr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=obs.cr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8CBE93858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::234 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710778937; cv=none; b=o6KocHFCDIyP5YLbKFOUGcUCUSDfEsNL9P4zEJLL3/OitHK0QdYlhgyJivPTYTWKkeWUxI9K3XlHBngpYMcg93061e5z90lHDXW+TrP9oy0o+1O0ghrWjq+89Ypjl069NSM8RDejsRo88qMS6RzNIGOkkYTsOffWruskP1PAsN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710778937; c=relaxed/simple; bh=lzR0WrtOOgnXD0fkJWkKPuo9Z0FVhLCXY/vi+YkfoP8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UTKUcDxx6CM1DPrZqTbTSGL7qORmUaO0EughQX3bFjZWmiwsXUfayK1qHvI+6zLlNqCNHr6b6L3tGu3rG+O7kXgmBwOGzWuqUu2QIin5PrviD7wo2ermnOveVjAg6Y32oAFzT0JAu3FJ77RK7s2JWFnSumR2lc11kWqM9029Qn8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3c38f4e18eeso271948b6e.1 for ; Mon, 18 Mar 2024 09:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=obs-cr.20230601.gappssmtp.com; s=20230601; t=1710778934; x=1711383734; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lVPxeFAIxEJEiawqrgOW6F3mrDk+/dPTQ4+VyZXBJQU=; b=07KF9olJhh11Rlsoujl3CDUW13MIiyQ9pIjWF1TNizHnkqdNBaQQp9iF0vd7Y0OuO2 u2fGjDvK4sucHjnQuYzNsGcOXq820Qqx8z2Zwr+e8iU7tGLy+02rPdFEnoiaa4rH3iqH wfHS8VyGHjQGx9zk6G/zR7Wa6rKCx1eAaZvDHZI6BPAqDPNLPNgWVO1sBHcBiF0KjLxg WW+EbZ+ytU4wmCPEAwRPIZNzCu+XcpS7JWir2aU6rZSt/Ix0Qsmsow0RGnQ7octSUfzP w1fGQm7HF2atvi343Pzb7SRUsePSXbxFkOYFD0oGxR+gibn9Nif+w8Mw+hRKgMKjY318 vhGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710778934; x=1711383734; 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=lVPxeFAIxEJEiawqrgOW6F3mrDk+/dPTQ4+VyZXBJQU=; b=S3/5yRaj+db4N2mzO/YEt8H5imHcvMfUx1yL4jgRndkTblyYue7TqdCQB2DF8xdypo LbHL/IVQhxPVv6+dkcpXXnyEU9yhU2GQrjN2v8q+GgEnnEyyadHwzCy6xKvxXuomkNdN PT4QgKXQh/P9LmeKh1kr5U98K3AU9Xfax2fkcUsaTrl+RGD6WPUxxpSldaaK1ziKE1It j6V+OECt/d3ZXNXn1WDhEWwrqjWTKp+q91yKwfgY/MTuv9IgeIm3SLsh5apLBBsQ2tF0 62TDHtV72NO1zlWQNTflLVcf6+H4FJZIMnPJsU1yBGQIvhh8yHYUCUqWEntB8a6sBPiI b7ow== X-Gm-Message-State: AOJu0YzoosSgkTb/1VgD5XjgU2292iGP2eKeXHqGDSyOw1P8C1ynouLp J1ncAJCZ4Zm2mQ2EQpQbLo5vXA9a0oNhyzkZ8fTS+aAd8jGTAziKn946Ww4wvvgZt+BKw8y7O0a L X-Google-Smtp-Source: AGHT+IGpN5z+rhw+ICrHfqLOZPYTiDQJsJAFmEG8rZeNVosnlOteoGeCoSacOUIi1NiehntBkWdyuQ== X-Received: by 2002:a05:6808:17a3:b0:3c1:f573:b68c with SMTP id bg35-20020a05680817a300b003c1f573b68cmr230905oib.30.1710778934541; Mon, 18 Mar 2024 09:22:14 -0700 (PDT) Received: from ininer.rhod.uc.edu ([129.137.96.15]) by smtp.gmail.com with ESMTPSA id kk12-20020a05622a2c0c00b0042f3830ef2csm5159697qtb.33.2024.03.18.09.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 09:22:14 -0700 (PDT) From: Will Hawkins To: gdb-patches@sourceware.org Cc: Will Hawkins Subject: [RFC][PATCH 0/1] Add support for embedded source in GDB Date: Mon, 18 Mar 2024 12:22:05 -0400 Message-ID: <20240318162209.468831-1-hawkinsw@obs.cr> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello everyone! First, thank you for all that you do to keep gdb the best open-source debugger available. I am a long-time user and minor contributor. This is my first major-ish contribution. Second, I know that cover letters are not generally encouraged but because this patch is an RFC, I thought it would be a good opportunity to introduce the patch's current status. As it stands, DWARF has not finalized the DW_LNCT_source. However, LLVM does emit it, when asked. It would be great if gdb supported it. This patch adds support for the to-be-standardized version and the vendor extension that LLVM currently uses. If this is something that you think gdb would like to add, then I am happy to continue cleaning up this patch by - cleaning up the included test - adding additional tests - handling corner cases that I am sure you will discover. I just wanted to pass this along early to get your sense of things. I have attempted to follow all the coding guidelines and the best practices but I know that I have probably fallen short. Again, if this is something that you think you would like to see in gdb, I am 100% willing to learn from you and get this into better shape. No matter what, thank you again for all your volunteer work to keep gdb going. Will Will Hawkins (1): gdb: Support embedded source in DWARF gdb/dwarf2/line-header.c | 22 +++-- gdb/dwarf2/line-header.h | 9 ++- gdb/dwarf2/read.c | 11 ++- gdb/source.c | 73 ++++++++++++++++- gdb/source.h | 4 + gdb/symtab.h | 2 + gdb/testsuite/gdb.dwarf2/dw2-lnct-source.c | 24 ++++++ gdb/testsuite/gdb.dwarf2/dw2-lnct-source.exp | 85 ++++++++++++++++++++ gdb/testsuite/lib/dwarf.exp | 14 +++- include/dwarf2.h | 2 + 10 files changed, 227 insertions(+), 19 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-lnct-source.c create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-lnct-source.exp -- 2.44.0