Re: PATCH: Extend gdb remote protocol for AVX

H.J. Lu
2008-09-18T18:31:44Z

On Thu, Sep 18, 2008 at 11:18 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Thu, 18 Sep 2008 19:47:50 +0200 (CEST)
>> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>>
>> > Date: Thu, 18 Sep 2008 10:27:28 -0700
>> > From: "H.J. Lu" <hongjiu.lu@intel.com>
>> >
>> > Hi,
>> >
>> > Intel AVX extends 128bit XMM registers to 256bit YMM registers. I
>> > am enclosing a propose to add YMM register support in gdb. Since
>> > there is no AVX hardware, we can only implement the remote debug
>> > with AVX emulator.
>> >
>> > This patch extends gdb remote protocol for AVX, based on Daniel's
>> > patch to auto-detect ia32 and x86-64 executables:
>> >
>> > http://sources.redhat.com/ml/gdb-patches/2006-11/msg00056.html
>> >
>> > I tested it by setting x86_sse_unit to avx in gdbserver/i387-fp.c. OK
>> > to install?
>>
>> Let's wait until there is actual hardware.
>
> Hmm, I just noticed that Intel actually makes documentation and a
> simulator available. Unfortunately the simulator download doesn't
> seem to work (as is the "product overview"). Does this simulator
> support GDB's remote protocol, and does it run on an open source
> operating system? If so, it may be reasonable to add GDB support
> soon. I'll need some time to familiarize myself with AVX, review and
> test the diff. I'm travelling next week. Please ping if you haven't
> heard from me on September 30th.
>

AVX SDE runs on various Linux distros. I ran it on 32bit/64bit RHEL 5,
Fedora 8 and Fedora 9. I was told it also ran on other Linux OSes.
AVX SDE does support gdb remote protocol:

From SDE:

[hjl@gnu-6 avx]$ ./sde -debug -- ./64
Application stopped until continued from debugger.
Start GDB, then issue this command at the (gdb) prompt:
target remote :43289

From GDB:

(gdb) target remote :43289
Remote debugging using :43289
0x0000003919000ab0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) b main
Breakpoint 1 at 0x400559: file arg-1.c, line 25.
(gdb) c
Continuing.

Breakpoint 1, main () at arg-1.c:25
25 test (n1, n2, n3);
(gdb) c
Continuing.

Program exited normally.
(gdb)

We are working on AVX SDE to support AVX gdb remote
protocol extension.

Thanks.

--
H.J.