Bug 23472 - gdb crash when use finish to look at function return value
Summary: gdb crash when use finish to look at function return value
Status: RESOLVED DUPLICATE of bug 22854
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 8.1.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2018-08-01 14:36 UTC by 0xFFFFFFFF
Modified: 2020-04-01 19:10 UTC (History)
4 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description 0xFFFFFFFF 2018-08-01 14:36:12 UTC
platform : Windows, MinGW-w64, GDB 8.1 & 8.1.1, GCC 6.4 & 7.3, binutils 2.31.1

add break to function foo return;
and then 'finish' to look return value;
gdb crash.

on gdb 8.0.1 it works well.

int foo() {
    return 42;

int main() {
    int x = foo();
Comment 1 asmwarrior 2018-08-03 15:19:26 UTC
No crash here. My environment is: Windows 7(64bit), 32bit GDB-git-20180725 self build, i686-7.2.0-release-posix-dwarf-rt_v5-rev1(from MinGW-W64 site).
Comment 2 0xFFFFFFFF 2018-08-03 17:43:04 UTC
I just rebuilt gdb using 32-bit mingw-w64 and everything is good.
but when I build gdb as 64-bit it is crashed. so it seems this is only x64 gdb bug


Windows 10 64-bit
binutils 2.31.1 64-bit
gcc 6.4.0 & 7.3.0 64-bit
mingw-w64 5.0.4
gdb 8.1.0 & 8.1.1 64-bit
debugged exe file 64-bit

and gdb 8.0.1 works same environment.
Comment 4 Tom Tromey 2018-08-08 17:12:55 UTC
Any chance of a backtrace of the crashing gdb?
Maybe that would help.
Comment 5 Hannes Domani 2019-02-20 16:54:30 UTC
I think that's the same as #22854, which is fixed in 8.2.
Comment 6 Hannes Domani 2020-04-01 19:10:36 UTC

*** This bug has been marked as a duplicate of bug 22854 ***