Article View: gnu.gdb.bug
Article #70(none)
From: Peggy Fieland
Date: Fri, 10 Apr 1992 15:08
Date: Fri, 10 Apr 1992 15:08
110 lines
4171 bytes
4171 bytes
I am running gdb-4.3 on a stratus i860 (big endian) under SVR4. I have found a bug in the "info registers" command. This command always gets the registers relative to the innermost frame (frame 0). Here is a fix: diff sc-gdb/gdb/i860-tdep.c gdb/i860-tdep.c 1321,1322c1321 < #if 0 < /* This routine is uncalled -- remove this routine sometime */ --- > 1328,1329c1327,1334 < < read_relative_register_raw_bytes (regno, raw_buffer); --- > > /* NOTE that only integer and floating point registers can be relative to a frame */ > > if ((regno >= R0) && (regno <= F31)) /* user register */ > read_relative_register_raw_bytes (regno, raw_buffer); > else > bcopy (®isters[regno << 2], raw_buffer, sizeof (long)); > 1333d1337 < #endif 1427c1431,1434 < on the floating point registers, so we ignore the parameter fpregs */ --- > on the floating point registers, so we ignore the parameter fpregs. > NOTE also that only integer and floating point registers can be relative to a frame -- > see subroutine get_reg (above ) */ > 1443,1446c1450 < if ((regnum >=F0 ) && (regnum <= F31)) < bcopy (®isters[ADJ_FREG(regnum)<<2], &val, sizeof (long)); < else < bcopy (®isters[regnum<<2], &val, sizeof (long)); --- > val = get_reg(regnum); 1456c1460 < bcopy (®isters[j<<2], &val, sizeof (long)); --- > val = get_reg(j); 1462c1466 < bcopy (®isters[EPSR<<2], &val, sizeof (long)); --- > val = get_reg(EPSR); 1466c1470 < bcopy (®isters[FSR<<2], &val, sizeof (long)); --- > val = get_reg(FSR); 1470c1474 < bcopy (®isters[CCR<<2], &val, sizeof (long)); --- > val = get_reg(CCR); 1473c1477 < bcopy (®isters[BEAR<<2], &val, sizeof (long)); --- > val = get_reg(BEAR); 1480c1484 < bcopy (®isters[j<<2], &val, sizeof (long)); --- > val = get_reg(j); 1492c1496 < bcopy (®isters[j<<2], &val, sizeof (long)); --- > val = get_reg(j); 1503c1507 < bcopy (®isters[ADJ_FREG(j)<<2], &val, sizeof (long)); --- > val = get_reg(j); 1515,1516c1519,1520 < bcopy (®isters[j<<2], &val, sizeof (long)); < bcopy (®isters[(j+1)<<2], &valh, sizeof (long)); --- > val = get_reg(j); > valh = get_reg(j+1); 1524,1525c1528,1529 < bcopy (®isters[j<<2], &val, sizeof (long)); < bcopy (®isters[(j+1)<<2], &valh, sizeof (long)); --- > val = get_reg(j); > valh = get_reg(j+1); 1533,1536c1537,1542 < bcopy (®isters[j<<2], &val, sizeof (long)); < bcopy (®isters[(j+1)<<2], &valh, sizeof (long)); < bcopy (®isters[(j+2)<<2], &val2, sizeof (long)); < bcopy (®isters[(j+3)<<2], &val3, sizeof (long)); --- > > val = get_reg(j); > valh = get_reg(j+1); > val2 = get_reg(j+2); > val3 = get_reg(j+3); > 1545,1549c1551,1557 < bcopy (®isters[i<<2], &val4, sizeof (long)); < bcopy (®isters[j<<2], &val, sizeof (long)); < bcopy (®isters[(j+1)<<2], &valh, sizeof (long)); < bcopy (®isters[k<<2], &val2, sizeof (long)); < bcopy (®isters[(k+1)<<2], &val3, sizeof (long)); --- > > val4 = get_reg(i); > val = get_reg(j); > valh = get_reg(j+1); > val2 = get_reg(k); > val3 = get_reg(k+1); >
Technical Details
Message-ID:
<9204101508.AA02642@citron.sw.stratus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!citron.sw.stratus.com!pfielandShow Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!citron.sw.stratus.com!pfieland From: pfieland@citron.sw.stratus.com (Peggy Fieland) Subject: (none) Message-ID: <9204101508.AA02642@citron.sw.stratus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 10 Apr 1992 15:08:29 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 112