* [Bug gdb/31256] [14 regression] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
@ 2024-01-18 18:26 ` ssbssa at sourceware dot org
2024-01-18 18:39 ` sam at gentoo dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-18 18:26 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] [14 regression] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
2024-01-18 18:26 ` [Bug gdb/31256] " ssbssa at sourceware dot org
@ 2024-01-18 18:39 ` sam at gentoo dot org
2024-01-18 19:43 ` csfore at posteo dot net
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sam at gentoo dot org @ 2024-01-18 18:39 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |blarsen at redhat dot com
--- Comment #1 from Sam James <sam at gentoo dot org> ---
The original reporter Christopher Fore has bisected it to
commit 3e3a1874fcec34bcf51b4baf4be09aebab561bff
Author: Bruno Larsen <blarsen@redhat.com>
Date: Thu Jun 15 12:14:22 2023 +0200
gdb/cli: add '.' as an argument for 'list' command
Currently, after the user has used the list command once, there is no
self-contained way to ask GDB to print the location where the inferior is
stopped. The current best options require either using a separate
command to scope out where the inferior is stopped, or using "list *$pc"
requiring knowledge of GDB standard registers. This commit adds a way
to do that using '.' as a new argument for the 'list' command. If the
inferior isn't running, the command prints around the main function.
Because this necessitated having the inferior running and the test was
(seemingly unnecessarily) using printf in a non-essential way and it
would make the resulting log harder to read for no benefit, it was
replaced by a different statement.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
.. which added the feature
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] [14 regression] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
2024-01-18 18:26 ` [Bug gdb/31256] " ssbssa at sourceware dot org
2024-01-18 18:39 ` sam at gentoo dot org
@ 2024-01-18 19:43 ` csfore at posteo dot net
2024-01-18 22:33 ` csfore at posteo dot net
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: csfore at posteo dot net @ 2024-01-18 19:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Christopher Fore <csfore at posteo dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |csfore at posteo dot net
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] [14 regression] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (2 preceding siblings ...)
2024-01-18 19:43 ` csfore at posteo dot net
@ 2024-01-18 22:33 ` csfore at posteo dot net
2024-01-19 8:44 ` [Bug gdb/31256] " blarsen at redhat dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: csfore at posteo dot net @ 2024-01-18 22:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
--- Comment #2 from Christopher Fore <csfore at posteo dot net> ---
After some trial and error I discovered that the root cause seems to be the
`list .` command does not properly function when a program is compiled without
debugging symbols. When you compile the test program with `-ggdb3` it functions
normally.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (3 preceding siblings ...)
2024-01-18 22:33 ` csfore at posteo dot net
@ 2024-01-19 8:44 ` blarsen at redhat dot com
2024-01-23 15:19 ` blarsen at redhat dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: blarsen at redhat dot com @ 2024-01-19 8:44 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Guinevere Larsen <blarsen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[14 regression] Crash with |Crash with basic 'list .'
|basic 'list .' |
Status|NEW |ASSIGNED
--- Comment #3 from Guinevere Larsen <blarsen at redhat dot com> ---
I just reproduced it with upstream GDB, and see it is still there.
Sorry, when I was developing the "list ." command, I never
--- Comment #4 from Guinevere Larsen <blarsen at redhat dot com> ---
(...) I never tested with an inferior without debuginfo.
IMO, the whole "list" command doesn't handle missing debug information all too
well. I'll try to tackle both and fix this as soon as possible.
PS: sorry for double updates, it was a misclick
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (4 preceding siblings ...)
2024-01-19 8:44 ` [Bug gdb/31256] " blarsen at redhat dot com
@ 2024-01-23 15:19 ` blarsen at redhat dot com
2024-01-23 15:43 ` csfore at posteo dot net
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: blarsen at redhat dot com @ 2024-01-23 15:19 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
--- Comment #5 from Guinevere Larsen <blarsen at redhat dot com> ---
I have an upstream patch already for this issue here[1]. This should be fixed
as soon as people look/approve it.
[1]
https://inbox.sourceware.org/gdb-patches/20240123105043.39408-1-blarsen@redhat.com/T/#u
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (5 preceding siblings ...)
2024-01-23 15:19 ` blarsen at redhat dot com
@ 2024-01-23 15:43 ` csfore at posteo dot net
2024-01-23 15:59 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: csfore at posteo dot net @ 2024-01-23 15:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
--- Comment #6 from Christopher Fore <csfore at posteo dot net> ---
Thank you! Just tested on head and 14.1 and both worked.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (6 preceding siblings ...)
2024-01-23 15:43 ` csfore at posteo dot net
@ 2024-01-23 15:59 ` cvs-commit at gcc dot gnu.org
2024-01-23 16:10 ` blarsen at redhat dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-23 15:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
--- Comment #7 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Guinevere Larsen
<blarsen@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0068bd6fb3579dd8df7561e038cb3fe27f122b0e
commit 0068bd6fb3579dd8df7561e038cb3fe27f122b0e
Author: Guinevere Larsen <blarsen@redhat.com>
Date: Mon Jan 22 10:13:52 2024 +0100
gdb: fix "list ." related crash
When a user attempts to use the "list ." command with an inferior that
doesn't have debug symbols, GDB would crash. This was reported as PR
gdb/31256.
The crash would happen when attempting to get the current symtab_and_line
for the stop location, because the symtab would return a null pointer
and we'd attempt to dereference it to print the line.
This commit fixes that by checking for an empty symtab and erroring out
of the function if it happens.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Approved-By: Tom Tromey <tom@tromey.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (7 preceding siblings ...)
2024-01-23 15:59 ` cvs-commit at gcc dot gnu.org
@ 2024-01-23 16:10 ` blarsen at redhat dot com
2024-01-23 16:25 ` cvs-commit at gcc dot gnu.org
2024-02-11 4:42 ` brobecker at gnat dot com
10 siblings, 0 replies; 12+ messages in thread
From: blarsen at redhat dot com @ 2024-01-23 16:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Guinevere Larsen <blarsen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Guinevere Larsen <blarsen at redhat dot com> ---
The commit above fixes the issue. It will also be backported to the gdb-14
branch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (8 preceding siblings ...)
2024-01-23 16:10 ` blarsen at redhat dot com
@ 2024-01-23 16:25 ` cvs-commit at gcc dot gnu.org
2024-02-11 4:42 ` brobecker at gnat dot com
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-23 16:25 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
--- Comment #9 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The gdb-14-branch branch has been updated by Guinevere Larsen
<blarsen@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4fe1a40c7c464bde0212aa859774fe59fb71ccfe
commit 4fe1a40c7c464bde0212aa859774fe59fb71ccfe
Author: Guinevere Larsen <blarsen@redhat.com>
Date: Mon Jan 22 10:13:52 2024 +0100
gdb: fix "list ." related crash
When a user attempts to use the "list ." command with an inferior that
doesn't have debug symbols, GDB would crash. This was reported as PR
gdb/31256.
The crash would happen when attempting to get the current symtab_and_line
for the stop location, because the symtab would return a null pointer
and we'd attempt to dereference it to print the line.
This commit fixes that by checking for an empty symtab and erroring out
of the function if it happens.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Approved-By: Tom Tromey <tom@tromey.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/31256] Crash with basic 'list .'
2024-01-18 4:57 [Bug gdb/31256] New: [14 regression] Crash with basic 'list .' sam at gentoo dot org
` (9 preceding siblings ...)
2024-01-23 16:25 ` cvs-commit at gcc dot gnu.org
@ 2024-02-11 4:42 ` brobecker at gnat dot com
10 siblings, 0 replies; 12+ messages in thread
From: brobecker at gnat dot com @ 2024-02-11 4:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31256
Joel Brobecker <brobecker at gnat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |brobecker at gnat dot com
Target Milestone|--- |14.2
--- Comment #10 from Joel Brobecker <brobecker at gnat dot com> ---
Added the 14.2 "target milestone" in order for our release scripts to know that
the fix was included in that release too.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread