aboutsummaryrefslogtreecommitdiff
path: root/gdb/macrotab.h
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2022-06-10 16:19:01 +0000
committerCarl Love <cel@us.ibm.com>2022-06-10 16:19:01 +0000
commitcbc30d36acfb3f20f7736c5594d81088ae8e4e13 (patch)
tree615da972573372ed305733b2b6c3b150de1c6ac8 /gdb/macrotab.h
parentb69a68b93bf31bf17fe0b9db3fef4f4d6d089626 (diff)
downloadfsf-binutils-gdb-cbc30d36acfb3f20f7736c5594d81088ae8e4e13.zip
fsf-binutils-gdb-cbc30d36acfb3f20f7736c5594d81088ae8e4e13.tar.gz
fsf-binutils-gdb-cbc30d36acfb3f20f7736c5594d81088ae8e4e13.tar.bz2
Fix comparison of unsigned long int to int in record_linux_system_call.
The if statement in case gdb_sys_ioctl in function record_linux_system_call in file gdb/linux-record.c is as follows: if (tmpulongest == tdep->ioctl_FIOCLEX || tmpulongest == tdep->ioctl_FIONCLEX .... || tmpulongest == tdep->ioctl_TCSETSW ... } The PowerPC ioctl value for ioctl_TCSETW is 0x802c7415. The variable ioctl_TCSETW is defined in gdb/linux-record.h as an int. The TCSETW value has the MSB set to one so it is a negative integer. The comparison of the unsigned long value tmpulongest to a negative integer value for ioctl_TCSETSW fails. This patch changes the declarations for the ioctl_* values in struct linux_record_tdep to unsigned long to fix the comparisons between tmpulongest and the tdep->ioctl_* values. An additional test gdb.reverse/test_ioctl_TCSETSW.exp is added to verify the gdb record_linux_system_call() if statement for the ioctl TCSETSW succeeds. This patch has been tested on Power 10 and Intel with no test failures.
Diffstat (limited to 'gdb/macrotab.h')
0 files changed, 0 insertions, 0 deletions