Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
RHEL8.4 system, using gdb version "GNU gdb (GDB) Red Hat Enterprise Linux 8.2-15.el8" we are experiencing the issue below. This problem does not occur on our old system RHEL7, using gdb "GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7"
Running an ABF image (ingres built terminal application) through gdb the keyboard handling breaks after a breakpoint in a āCā module and we then continue. Function keys all work prior to hitting the break (we use F1, F2 etc to select screen actions).
This means we only have 1 chance to debug an embedded āCā module. If we need to debug several times before hitting the required bit of code or data then we cannot as gdb seems to break the application function key functionality. Instead of the function keys performing specific actions, we just get control characters output to the screen and cannot debug our application further.
Version-Release number of selected component (if applicable):
How reproducible:
- reliably using sample code
Steps to Reproduce:
- See reproducer
Sample reproducer:
----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <curses.h>
/*************************************************************
1. Compile using -> cc -g foractian.c -lcurses -o foractian
2. Test number 1 - Normal execution ...
run ./foractian press down twice, code exits.
3. Test number 2 - Run via debugger (gdb) ...
run gdb ./foractian put a break on line 51 and run
Press down and the breakpoint is reached.
Type "cont" to continue and when prompted to press down
it does not work, you get ^[OB instead (escape code
for down cursor).
**************************************************************/
int main()
{
WINDOW *mainwin;
int c=0;
mainwin=initscr();
cbreak();
noecho();
nonl();
curs_set(0);
keypad(mainwin,TRUE);
wprintw(mainwin,"hello world - press cursor down\n");
wrefresh(mainwin);
while(c!=KEY_DOWN)
{
c=wgetch(mainwin);
usleep(5000);
}
wprintw(mainwin,"hello world - press cursor down\n");
wrefresh(mainwin);
c=0; /* gdb: Break on this line and then continue */
while(c!=KEY_DOWN)
{
c=wgetch(mainwin);
usleep(5000);
}
endwin();
}
----------------------------------------------------------------------------
Actual results:
- function keys print control characters to the console
Expected results:
- function keys work as coded
Additional info:
I can verify that this is a problem with system GDB on RHEL 8.5.
I have also verified that GCC Toolset 10 and 11 work as expected.
Is using GTS an option?
(In reply to Joe Wright from comment #3)
> No, customer is using mainline
This is not what I asked, but I will see
if we can get a more in-depth investigation
on the schedule. We're far too late for
8.6.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (gdb bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:7571
Description of problem: RHEL8.4 system, using gdb version "GNU gdb (GDB) Red Hat Enterprise Linux 8.2-15.el8" we are experiencing the issue below. This problem does not occur on our old system RHEL7, using gdb "GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7" Running an ABF image (ingres built terminal application) through gdb the keyboard handling breaks after a breakpoint in a āCā module and we then continue. Function keys all work prior to hitting the break (we use F1, F2 etc to select screen actions). This means we only have 1 chance to debug an embedded āCā module. If we need to debug several times before hitting the required bit of code or data then we cannot as gdb seems to break the application function key functionality. Instead of the function keys performing specific actions, we just get control characters output to the screen and cannot debug our application further. Version-Release number of selected component (if applicable): How reproducible: - reliably using sample code Steps to Reproduce: - See reproducer Sample reproducer: ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <curses.h> /************************************************************* 1. Compile using -> cc -g foractian.c -lcurses -o foractian 2. Test number 1 - Normal execution ... run ./foractian press down twice, code exits. 3. Test number 2 - Run via debugger (gdb) ... run gdb ./foractian put a break on line 51 and run Press down and the breakpoint is reached. Type "cont" to continue and when prompted to press down it does not work, you get ^[OB instead (escape code for down cursor). **************************************************************/ int main() { WINDOW *mainwin; int c=0; mainwin=initscr(); cbreak(); noecho(); nonl(); curs_set(0); keypad(mainwin,TRUE); wprintw(mainwin,"hello world - press cursor down\n"); wrefresh(mainwin); while(c!=KEY_DOWN) { c=wgetch(mainwin); usleep(5000); } wprintw(mainwin,"hello world - press cursor down\n"); wrefresh(mainwin); c=0; /* gdb: Break on this line and then continue */ while(c!=KEY_DOWN) { c=wgetch(mainwin); usleep(5000); } endwin(); } ---------------------------------------------------------------------------- Actual results: - function keys print control characters to the console Expected results: - function keys work as coded Additional info: