Subject: bug#79360: closed (Re: bug#79360: 30.2; lldb shows incorrect code location when no column number is available)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 06 Sep 2025 09:07:02 +0000

Your bug report

#79360: 30.2; lldb shows incorrect code location when no column number is available

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
79360: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79360
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#79360: 30.2; lldb shows incorrect code location when no column number is available
From: Eli Zaretskii <[email-masked]>
To: Gustav Hållberg <[email-masked]>
Cc: [email-masked]
Date: Sat, 06 Sep 2025 12:06:14 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Gustav Hållberg <[email-masked]>
> Date: Mon, 1 Sep 2025 19:09:10 +0200
> Cc: [email-masked]
> 
> It is a bug in the emacs M-x lldb command.
> 
> lldb (the tool) correctly sends an empty column field when it has no column number debug information.
> 
> If you look at the patch you'll see that the gud.el regexp (correctly) matches an empty digit sequence for the
> column number field, but that (incorrectly) is treated as column zero (which doesn't exist) rather than an
> absent column number field.

Thanks, I've now installed the change on the master branch, and I'm
therefore closing this bug.

Subject: 30.2; lldb shows incorrect code location when no column number is available
From: Gustav Hållberg <[email-masked]>
To: [email-masked]
Date: Mon, 1 Sep 2025 16:42:33 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

In (lldb), there is a bug that positions the source code location on the
last character of the previous line if lldb doesn't report a column number.

Example, save the following as "t.s" and compile (on x86-64) with "gcc -g
t.s -o t":

        .global _main
_main:
        xor %eax,%eax
        ret

and debug using (lldb "lldb ./t"):

(lldb) *b main*
  :
(lldb) *run*
  :
(lldb)
*disas*t`main:
    0x555555555129 <+0>: xorl   %eax, %eax
->  0x55555555512b <+2>: retq

but the source code location ends up at the last character of the "xor
%eax..." line.

Attaching proposed pach against 66ef930ebea4618c1dac71a09495766476ced1d6.