From: John Gilmore Date: Sat, 20 Jun 1992 03:42:14 +0000 (+0000) Subject: * remote-adapt.c, remote-eb.c, remote-mm.c: Lint. Fix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e95bfbf19c3d4a6aaf3ed265b7a333a322fc0be2;p=binutils-gdb.git * remote-adapt.c, remote-eb.c, remote-mm.c: Lint. Fix INT_REGNUM to INTE_REGNUM. * tm-29k.h (SDB_REG_TO_REGNUM): Add for EPI 29K C compiler. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9b75e68d9b4..b5ba2430334 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Fri Jun 19 19:06:41 1992 John Gilmore (gnu at cygnus.com) + + * remote-adapt.c, remote-eb.c, remote-mm.c: Lint. Fix + INT_REGNUM to INTE_REGNUM. + + * tm-29k.h (SDB_REG_TO_REGNUM): Add for EPI 29K C compiler. + + * elfread.c (elf_symfile_read): Update bfd_elf_find_section + usage to match new prototype. Include libbfd.h to get prototype. + Fri Jun 19 15:30:15 1992 Stu Grossman (grossman at cygnus.com) * configure.in, dbxread.c, hppa-coredep.c, hppa-pinsn.c, diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c index 1a75b1b21d5..a21cbb823b4 100644 --- a/gdb/remote-adapt.c +++ b/gdb/remote-adapt.c @@ -50,7 +50,7 @@ extern struct target_ops adapt_ops; /* Forward declaration */ /* Forward function declarations */ static void adapt_fetch_registers (); -static int adapt_store_registers (); +static void adapt_store_registers (); static void adapt_close (); static int adapt_clear_breakpoints(); @@ -970,7 +970,7 @@ adapt_fetch_registers () { int val = -1; supply_register (FPE_REGNUM, &val); - supply_register (INT_REGNUM, &val); + supply_register (INTE_REGNUM, &val); supply_register (FPS_REGNUM, &val); supply_register (EXO_REGNUM, &val); } @@ -1006,7 +1006,7 @@ adapt_fetch_register (regno) /* Store the remote registers from the contents of the block REGS. */ -static int +static void adapt_store_registers () { int i, j; @@ -1063,7 +1063,7 @@ adapt_store_registers () /* Store register REGNO, or all if REGNO == -1. Return errno value. */ -int +void adapt_store_register (regno) int regno; { @@ -1085,7 +1085,6 @@ adapt_store_register (regno) expect_prompt (); } DEXIT("adapt_store_registers()"); - return 0; } /* Get ready to modify the registers array. On machines which store diff --git a/gdb/remote-eb.c b/gdb/remote-eb.c index 778df8649d0..a4124b3ac65 100644 --- a/gdb/remote-eb.c +++ b/gdb/remote-eb.c @@ -718,7 +718,7 @@ eb_fetch_registers () { int val = -1; supply_register (FPE_REGNUM, &val); - supply_register (INT_REGNUM, &val); + supply_register (INTE_REGNUM, &val); supply_register (FPS_REGNUM, &val); supply_register (EXO_REGNUM, &val); } @@ -790,7 +790,7 @@ eb_store_registers () /* Store register REGNO, or all if REGNO == 0. Return errno value. */ -int +void eb_store_register (regno) int regno; { @@ -810,7 +810,6 @@ eb_store_register (regno) registers_changed (); expect_prompt (); } - return 0; } /* Get ready to modify the registers array. On machines which store diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c index 2ca1e37824a..b659815ed42 100644 --- a/gdb/remote-mm.c +++ b/gdb/remote-mm.c @@ -61,7 +61,7 @@ extern int stop_soon_quietly; /* for wait_for_inferior */ static void mm_resume(); static void mm_fetch_registers (); static int fetch_register (); -static int mm_store_registers (); +static void mm_store_registers (); static int store_register (); static int regnum_to_srnum(); static void mm_close (); @@ -793,7 +793,7 @@ int regno; { int val = -1; supply_register (FPE_REGNUM, &val); - supply_register (INT_REGNUM, &val); + supply_register (INTE_REGNUM, &val); supply_register (FPS_REGNUM, &val); supply_register (EXO_REGNUM, &val); } @@ -808,14 +808,16 @@ int regno; * Result is 0 for success, -1 for failure. */ -static int +static void mm_store_registers (regno) int regno; { int result; - if (regno >= 0) - return(store_register(regno)); + if (regno >= 0) { + store_register(regno); + return; + } DENTER("mm_store_registers()"); result = 0; @@ -929,7 +931,7 @@ int regno; registers_changed (); DEXIT("mm_store_registers()"); - return result; + /* FIXME return result; it is ignored by caller. */ } /*************************************************** REMOTE_PREPARE_TO_STORE */ @@ -1506,7 +1508,7 @@ int regno; case FC_REGNUM: return(134); case CR_REGNUM: return(135); case FPE_REGNUM: return(160); - case INT_REGNUM: return(161); + case INTE_REGNUM: return(161); case FPS_REGNUM: return(162); case EXO_REGNUM:return(164); default: diff --git a/gdb/tm-29k.h b/gdb/tm-29k.h index 72e4d9825aa..825cf96f31a 100644 --- a/gdb/tm-29k.h +++ b/gdb/tm-29k.h @@ -150,6 +150,16 @@ CORE_ADDR skip_prologue (); "pc0", "pc1", "pc2", "mmu", "lru", "fpe", "inte", "fps", "exo", "gr1", \ "alu", "ipc", "ipa", "ipb" } +/* + * Converts an sdb register number to an internal gdb register number. + * Currently under epi, gr96->0...gr127->31...lr0->32...lr127->159, or... + * gr64->0...gr95->31, lr0->32...lr127->159. + */ +#define SDB_REG_TO_REGNUM(value) \ + (((value) >= 96 && (value) <= 127) ? ((value) - 96) : \ + ((value) >= 128 && (value) <= 255) ? ((value) - 128 + LR0_REGNUM) : \ + (value)) + /* * Provide the processor register numbers of some registers that are * expected/written in instructions that might change under different