public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17632] New: No locals for lambdas in initialiser lists
@ 2014-11-21 17:04 khaurbeille+sourceware at gmail dot com
2023-12-29 16:59 ` [Bug c++/17632] " ssbssa at sourceware dot org
0 siblings, 1 reply; 2+ messages in thread
From: khaurbeille+sourceware at gmail dot com @ 2014-11-21 17:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17632
Bug ID: 17632
Summary: No locals for lambdas in initialiser lists
Product: gdb
Version: 7.6
Status: NEW
Severity: minor
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: khaurbeille+sourceware at gmail dot com
Created attachment 7961
--> https://sourceware.org/bugzilla/attachment.cgi?id=7961&action=edit
Example code
GDB is not able to display local variables for lambda functions that are used
in an initialiser list. Lambda functions in regular code work fine.
Steps to reproduce:
Compile attached file (GCC 4.8.3) with c++11 and debug info enabled
Run gdb on the executable
Run the following commands:
break 10
break 22
run
info locals
c
info locals
Actual results:
1st info locals:
std::__ioinit = {static _S_refcount = <optimized out>, static
_S_synced_with_stdio = <optimized out>}
2nd info locals:
b = 4
c = @0x7fffffffddac: 4
Expected results:
Similar outputs for the 2 info locals
Stepping works as expected inside both lambdas.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/17632] No locals for lambdas in initialiser lists
2014-11-21 17:04 [Bug c++/17632] New: No locals for lambdas in initialiser lists khaurbeille+sourceware at gmail dot com
@ 2023-12-29 16:59 ` ssbssa at sourceware dot org
0 siblings, 0 replies; 2+ messages in thread
From: ssbssa at sourceware dot org @ 2023-12-29 16:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17632
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|NEW |RESOLVED
CC| |ssbssa at sourceware dot org
--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
This was a debug info bug on gcc side that was fixed a while ago.
If you compile this with a gcc >= 6.1, then the output looks like this:
```
Reading symbols from gdb-17632.exe...done.
(gdb) b 10
Breakpoint 1 at 0x4a0778: file gdb-17632.cpp, line 10.
(gdb) b 22
Breakpoint 2 at 0x401668: file gdb-17632.cpp, line 22.
(gdb) r
Starting program: C:\src\tests\gdb-17632.exe
[New Thread 6852.0x1bd8]
Breakpoint 1, Breaker::Breaker(int)::{lambda()#1}::operator()() const
(__closure=0x22fde0) at gdb-17632.cpp:10
10 b++;
(gdb) info locals
b = 2
c = @0x22fe08: 2
(gdb) c
Continuing.
3
Breakpoint 2, <lambda()>::operator()(void) const (__closure=0x22fe40) at
gdb-17632.cpp:22
22 b++;
(gdb) info locals
b = 4
c = @0x22fe2c: 4
```
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-29 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 17:04 [Bug c++/17632] New: No locals for lambdas in initialiser lists khaurbeille+sourceware at gmail dot com
2023-12-29 16:59 ` [Bug c++/17632] " ssbssa at sourceware dot org
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).