]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/tdep] Use symbolic constants in s390_prologue_frame_unwind_cache
authorTom de Vries <tdevries@suse.de>
Thu, 9 Jan 2025 13:32:19 +0000 (14:32 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 9 Jan 2025 13:32:19 +0000 (14:32 +0100)
commit7d5a005997109212849de49e79c52267b36c06ff
tree249f7922901d33e19ddbbfa68b9191b72439a089
parent2063681a381c2b582f811d47658f7383b85ac21a
[gdb/tdep] Use symbolic constants in s390_prologue_frame_unwind_cache

In s390_prologue_frame_unwind_cache there are two loops using a hardcoded
constant 16:
...
  for (i = 0; i < 16; i++)
    if (s390_register_call_saved (gdbarch, S390_R0_REGNUM + i)
  ...
  for (i = 0; i < 16; i++)
    if (s390_register_call_saved (gdbarch, S390_F0_REGNUM + i)
...

Fix this by using symbolic constants S390_NUM_GPRS and S390_NUM_FPRS instead.

Tested on s390x-linux, by rebuilding.

Approved-By: Andreas Arnez <arnez@linux.ibm.com>
gdb/s390-tdep.c