public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Omar Sandoval <osandov@osandov.com>
Cc: elfutils-devel@sourceware.org
Subject: Re: [PATCH v3 2/4] libdw: Refactor dwarf_next_lines and fix skipped CU
Date: Thu, 29 Feb 2024 23:59:48 +0100	[thread overview]
Message-ID: <20240229225948.GE4502@gnu.wildebeest.org> (raw)
In-Reply-To: <fcd903cc9e2392af8c47533d2ec99bc96286c7a3.1708974560.git.osandov@fb.com>

Hi Omar,

On Mon, Feb 26, 2024 at 11:32:49AM -0800, Omar Sandoval wrote:
> dwarf_next_lines has two loops over CUs: one from the CU after the given
> CU to the end, and one from the first CU up to _but not including_ the
> given CU.  This means that the given CU is never checked.
> 
> This is unlikely to matter in practice since CUs usually correspond 1:1
> with line number tables in the same order, but let's fix it anyways.
> Refactoring it to one loop fixes the problem and simplifies the next
> change to support DWARF package files.
> 
> 	* libdw/dwarf_next_lines.c (dwarf_next_lines): Refactor loops
> 	over CUs into one loop.

Thanks. The patch itself was hard to understand, but when applied the
code is pretty clear. I only had to double check the reversal of the
split unit check was correct.

Pushed,

Mark

  reply	other threads:[~2024-02-29 22:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 19:32 [PATCH v3 0/4] elfutils: DWARF package (.dwp) file support Omar Sandoval
2024-02-26 19:32 ` [PATCH v3 1/4] libdw: Handle split DWARF in dwarf_decl_file Omar Sandoval
2024-02-29 22:08   ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 2/4] libdw: Refactor dwarf_next_lines and fix skipped CU Omar Sandoval
2024-02-29 22:59   ` Mark Wielaard [this message]
2024-02-26 19:32 ` [PATCH v3 3/4] libdw: Apply DWARF package file section offsets where appropriate Omar Sandoval
2024-02-29 23:49   ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 4/4] libdw: Handle overflowed DW_SECT_INFO offsets in DWARF package file indexes Omar Sandoval
2024-03-01 14:59   ` Mark Wielaard
2024-03-01 16:11     ` Mark Wielaard
2024-03-01 22:36     ` Omar Sandoval

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=20240229225948.GE4502@gnu.wildebeest.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=osandov@osandov.com \
    /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).