mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
Initialize 'ra' to zero to avoid uninitialized use.
If the instruction in this case does not include an RA field, then 'ra' is used uninitialized. Use the same idiom used elsewhere in this file of initializing ra to zero before check for an RA field. gdb/ChangeLog: * rs6000-tdep.c (ppc_process_record_op31): Initialize ra.
This commit is contained in:
parent
99a54ef6f7
commit
bec734b212
@ -1,3 +1,7 @@
|
||||
2016-06-14 John Baldwin <jhb@FreeBSD.org>
|
||||
|
||||
* rs6000-tdep.c (ppc_process_record_op31): Initialize ra.
|
||||
|
||||
2016-06-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* gdbtypes.c (replace_type): Fix assertion.
|
||||
|
@ -4631,6 +4631,7 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
|| at_dcsz == 0)
|
||||
at_dcsz = 128; /* Assume 128-byte cache line size (POWER8) */
|
||||
|
||||
ra = 0;
|
||||
if (PPC_RA (insn) != 0)
|
||||
regcache_raw_read_unsigned (regcache,
|
||||
tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
|
||||
|
Loading…
Reference in New Issue
Block a user