Changed fetch_core_registers to ignore "which" parameter as int and fp
registers are contiguous. Noted by Matthias Pfaller in PR #2072.
This commit is contained in:
parent
4c5575d1b7
commit
343f25f416
|
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: m68k-nat.c,v 1.10 1995/09/16 19:45:03 leo Exp $
|
||||
$Id: m68k-nat.c,v 1.11 1996/03/01 01:00:14 jtc Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -85,15 +85,12 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
|
|||
|
||||
core_reg = (struct md_core *)core_reg_sect;
|
||||
|
||||
if (which == 0) {
|
||||
/* Integer registers */
|
||||
memcpy(®isters[REGISTER_BYTE (0)],
|
||||
&core_reg->intreg, sizeof(struct reg));
|
||||
} else if (which == 2) {
|
||||
/* Floating point registers */
|
||||
memcpy(®isters[REGISTER_BYTE (FP0_REGNUM)],
|
||||
&core_reg->freg, sizeof(struct fpreg));
|
||||
}
|
||||
/* Integer registers */
|
||||
memcpy(®isters[REGISTER_BYTE (0)],
|
||||
&core_reg->intreg, sizeof(struct reg));
|
||||
/* Floating point registers */
|
||||
memcpy(®isters[REGISTER_BYTE (FP0_REGNUM)],
|
||||
&core_reg->freg, sizeof(struct fpreg));
|
||||
}
|
||||
|
||||
/* Get registers from a kernel crash dump. */
|
||||
|
|
Loading…
Reference in New Issue