public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Will Hawkins <hawkinsw@obs.cr>
To: gdb-patches@sourceware.org
Cc: Will Hawkins <hawkinsw@obs.cr>
Subject: [RFC][PATCH 0/1] Add support for embedded source in GDB
Date: Mon, 18 Mar 2024 12:22:05 -0400	[thread overview]
Message-ID: <20240318162209.468831-1-hawkinsw@obs.cr> (raw)

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


             reply	other threads:[~2024-03-18 16:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 16:22 Will Hawkins [this message]
2024-03-18 16:22 ` [RFC][PATCH 1/1] gdb: Support embedded source in DWARF Will Hawkins
2024-03-18 17:24   ` Tom Tromey
2024-03-18 21:18     ` Will Hawkins
2024-03-18 17:17 ` [RFC][PATCH 0/1] Add support for embedded source in GDB Tom Tromey
2024-04-01 19:18   ` Will Hawkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240318162209.468831-1-hawkinsw@obs.cr \
    --to=hawkinsw@obs.cr \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).