Re: [PATCH, doc RFA] Remove support for "target m32rsdi" and "target mips/pmon/ddb/rockhopper/lsi"

Maciej W. Rozycki
2016-05-03T14:57:48Z

On Mon, 2 May 2016, Pedro Alves wrote:

> > NB it looks to me `mips_r3041_reg_names' is now dead. We just *might*
> > consider rewiring it like `mips_tx39_reg_names', but that would require
> > defining another BFD machine type and I doubt anybody cares about the
> > R3041 anymore (cf. the relevant comment you've just removed). So if you
> > care to remove it too, then I'll appreciate it and a change to do so is
> > preapproved.
> >
> > Given that the variable is static I wonder why it hasn't triggered a
> > compilation error in the build actually.
>
> That's because gdb doesn't use -Wunused presently.

Hmm, I thought it was implied by -Wall. Perhaps we should add it then?
Releases are built without -Werror so the end users will be safe either
way, and it'll make us easier to avoid code pollution.

> I never managed to come back to this, and looks like we won't need to.
> Trevor sent a patch that removes mips_r3041_reg_names among a ton
> of other unused variables, here:
>
> https://sourceware.org/ml/gdb-patches/2016-04/msg00664.html

Great! As it happens, I made a patch to remove `mips_r3041_reg_names' on
Friday, but didn't get to actually pushing it -- and we had a bank holiday
yesterday.

I'll give Trevor's change precedence then as a more general clean-up,
although I'd like to review the MIPS part, as not all variables removed
from mips-tdep.c are actually "trivially unused" (those would be lone
declarations, possibly with initialisers). Especially the heuristic
unwinder bits look highly suspicious to me, where the variable is updated
as the analysis proceeds. It could be that these variables can indeed go,
but perhaps something is missing that should be there.

I'll try to get this done by the end of tomorrow.

Maciej