Re: PATCH: 6/6 [2nd try]: Add AVX support (gdbserver changes)

Daniel Jacobowitz
2010-03-28T16:40:55Z

On Sun, Mar 28, 2010 at 07:55:44AM +0000, Pedro Alves wrote:
> This (and the gdbarch_qsupported mechanism) worries me multi-arch
> design wise. There's a bootstrapping problem here. GDB sends qSupported
> to the target before knowing the target's target description. The target
> sends the target description based on qSupported.
> As is, things only work correctly, when GDB already somehow knows the
> arch is some sort of x86 _before_ connecting to the target. That's
> usually true if you give GDB a binary, but may not be true in some
> use cases.

You're right. I forgot about this; the design won't work.

Would "xmlRegisters=arm,x86" be a better solution?

If so, the way to implement that is to have a registration function.
i386-tdep.c:_initialize_i386_tdep can call a function in remote.c
to add "x86" to the list of xmlRegisters architectures.

--
Daniel Jacobowitz
CodeSourcery