This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Support target specific qSupported


On Wed, Feb 3, 2010 at 6:46 AM, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Wed, Feb 03, 2010 at 06:34:14AM -0800, H.J. Lu wrote:
>> We have our own remote gdb stub, which needs to talk to both old gdb,
>> which only understands SSE g/G packet, and new gdb, which understands
>> AVX g/G packet. Does the target description support negotiation so
>> that old gdb and new remote gdb stub can use SSE g/G packet?
>
> The goal of target descriptions is to not need negotiation.
> Everything is controlled by the target. ?But with older GDBs, because
> x86 did not get target-described register support right away, there's
> a problem.

It is not a trivial to implement target-described register support
for x86. But I think it is a good thing to do.

> I suggest adding something to the GDB-side qSupported packet saying
> that AVX is OK. ?You don't need anything on the stub side of the
> qSupported reply; you just need to reply to qXfer:features.
>

How about this patch? It allows a target to add a field to qSupported.

Thanks.

-- 
H.J.
---
2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>

	* gdbarch.c (gdbarch): Add qsupported.
	(startup_gdbarch): Likewise.
	(gdbarch_alloc): Likewise.
	(verify_gdbarch): Likewise.
	(gdbarch_dump): Likewise.
	(gdbarch_qsupported): New.
	(set_gdbarch_qsupported): Likewise.

	* gdbarch.h (gdbarch_qsupported): New.
	(set_gdbarch_qsupported): Likewise.

	* remote.c (remote_state): Add gdbarch.
	(init_remote_state): Set gdbarch.
	(remote_query_supported): Support gdbarch_qsupported.

Attachment: gdb-qsupported-2.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]