GNU bug report logs -
#79360
30.2; lldb shows incorrect code location when no column number is available
Previous Next
To reply to this bug, email your comments to 79360 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79360
; Package
emacs
.
(Mon, 01 Sep 2025 14:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gustav Hållberg <gustav <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 01 Sep 2025 14:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
[0001-lldb-bugfix-source-code-location-without-column.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79360
; Package
emacs
.
(Mon, 01 Sep 2025 15:53:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 79360 <at> debbugs.gnu.org (full text, mbox):
> From: Gustav Hållberg <gustav <at> gmail.com>
> Date: Mon, 1 Sep 2025 16:42:33 +0200
>
> 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.
Thanks, but if this is a bug in lldb, why shouldn't it be solved in
lldb, not in Emacs?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79360
; Package
emacs
.
(Mon, 01 Sep 2025 17:10:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79360 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
On Mon, Sep 1, 2025 at 5:52 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Gustav Hållberg <gustav <at> gmail.com>
> > Date: Mon, 1 Sep 2025 16:42:33 +0200
> >
> > 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.
>
> Thanks, but if this is a bug in lldb, why shouldn't it be solved in
> lldb, not in Emacs?
>
[Message part 2 (text/html, inline)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 06 Sep 2025 09:07:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gustav Hållberg <gustav <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 06 Sep 2025 09:07:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 79360-done <at> debbugs.gnu.org (full text, mbox):
> From: Gustav Hållberg <gustav <at> gmail.com>
> Date: Mon, 1 Sep 2025 19:09:10 +0200
> Cc: 79360 <at> debbugs.gnu.org
>
> 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.
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.