Re: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table

From: Arnaldo Carvalho de Melo
Date: Thu Jan 21 2016 - 10:41:20 EST

Em Thu, Jan 21, 2016 at 12:38:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Jan 21, 2016 at 12:43:04PM +0800, Wangnan (F) escreveu:
> > I think this problem is not introduced by my patch. In fact
> > there's a fundamental problem in get_arch_regstr() that it is
> > impossible to switch sub ISA.
> > Not only x86_64 and x86_32, I think on arm64 we also have this
> > problem when we try to setup uprobes on arm32 code. For me the
> > later problem is more important because there are many legacy arm32
> > applications on Android platform (and I have already seen the buggy
> > unwind result in this case. It is another problem though).
> Humm, and possibly to do something with arm code on a x86 workstation,
> even if just analysis, yeah, I think these functions should take as an
> argument the desired architecture instead of assuming it is the one in
> the machine issuing the commands.
> > So I suggest us to solve this problem first before considering
> > gcc 6 Werror. At least x86_32_regoffset_table and x86_64_regoffset_table

But... I think that the unflexible original code has a bug, one that makes it
not work when using gcc6 :-\

So I think we should make it build in gcc6, using that patch (or does it
have some other problem?) so that at least doing what we can do now can
be done for those using gcc6.

Then fix these shortcomings you detected.

- Arnaldo

> > should both be compiled no matter which ISA we select for perf.
> >
> > Thank you.