#2681 closed defect (fixed)

GDB on Windows (x86_64-w64-mingw32) does not work in cmd.exe

Reported by: Chris Johns Owned by: Chris Johns
Priority: high Milestone: 4.11
Component: tool/gdb Version: 4.11
Severity: blocker Keywords:
Cc: Blocked By:
Blocking:

Description

A x86_64-w64-mingw32 gdb for RTEMS targets does not work in cmd.exe. Pressing any key results in gdb exiting to the cmd.exe command line prompt.

This is due to gdb's internal readline being built for MINGW32 and calling 'getch()' and this has been changed to _getch. Debugging shows:

(gdb) call _getch()
$4 = 13
(gdb) call getch()
$5 = -1

and so gdb sees EOF and quits.

The solution is to build gdb using --with-system-readline on win32 hosts.

Change History (4)

comment:1 Changed on Apr 15, 2016 at 5:26:25 AM by Chris Johns <chrisj@…>

Resolution: fixed
Status: newclosed

In 1675a733536d1aec2020011e5e522497a442561a/rtems-source-builder:

gdb: Build with system readline and use MinGW compilers.

Select MinGW compilers for Windows builds on Windows.

Use the system readline rather than GDB's which does not
handle cmd.exe correctly.

Closes #2681.

comment:2 Changed on Nov 16, 2016 at 12:17:42 AM by Chris Johns <chrisj@…>

In 1675a733536d1aec2020011e5e522497a442561a/rtems-source-builder:

gdb: Build with system readline and use MinGW compilers.

Select MinGW compilers for Windows builds on Windows.

Use the system readline rather than GDB's which does not
handle cmd.exe correctly.

Closes #2681.

comment:3 Changed on Nov 18, 2016 at 8:35:25 PM by Chris Johns <chrisj@…>

In 1675a733536d1aec2020011e5e522497a442561a/rtems-source-builder:

gdb: Build with system readline and use MinGW compilers.

Select MinGW compilers for Windows builds on Windows.

Use the system readline rather than GDB's which does not
handle cmd.exe correctly.

Closes #2681.

comment:4 Changed on Oct 10, 2017 at 6:09:53 AM by Sebastian Huber

Component: MinGWtool/gdb
Note: See TracTickets for help on using tickets.