]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: change default initialization for register numbers on x86
authorChristina Schimpe <christina.schimpe@intel.com>
Mon, 28 Jul 2025 14:00:45 +0000 (07:00 -0700)
committerChristina Schimpe <christina.schimpe@intel.com>
Thu, 7 Aug 2025 12:06:43 +0000 (12:06 +0000)
commit158b142e801393f4c68b54ec57fee7dee0558eff
tree691d8fb896a4e4a6450bbd7f04c9c69e9b8fb8fb
parent815d9e9dae61da40e93ff5bc88cb771abf36e063
gdb: change default initialization for register numbers on x86

As defined by the enums amd64_regnum and i386_regnum the register
numbering starts at 0.
Defaults for register numbers are currently set to 0 which seems to
be the wrong default.  Set them to -1 instead.  Configure the right
register number if we find out it's supported in i386_gdbarch_init.

Similarly we don't have to set the num_*regname* variables to 0 in
i386_gdbarch_init, as it's already assigned to 0 by default.

Approved-By: Andrew Burgess <aburgess@redhat.com>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/i386-tdep.c
gdb/i386-tdep.h