This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fix for Go32-v2 native woes
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 7 Apr 2010 10:35:48 -0700
- Subject: Re: [RFC] Fix for Go32-v2 native woes
- References: <1242886820451223367@unknownmsgid> <m2g6dc9ffc81004062332i772781edjc1a3ef9d761f12f4@mail.gmail.com>
On Tue, Apr 6, 2010 at 11:32 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Apr 6, 2010 at 7:15 AM, Pierre Muller
> <pierre.muller@ics-cnrs.unistra.fr> wrote:
>> ?In an email to gdb list,
>> I complained about go32 native GDB giving internal errors...
>>
>> ?The problem is that some code in i386-tdep.c is not compatible
>> with a target that supports no SSE registers.
>>
>> ?I finally managed to find a fix, but it is not straightforward:
>> ?I had to add a new xml file in features/i386 directory
>> specific for go32v2 target, that does not read i386-sse.xml.
>> ?I had to adapt the code in i386-tdep.c to support
>> missing feature_vector and to set tdesc to
>> tdesc_i386_go32v2 instead of tdesc_i386 when go32v2
>> osabi was detected.
>>
>> ?This allows me to use CVS GDB on DJGPP again.
>>
>> ?I checked with a testsuite run on gcc-farm that nothing changed
>> for at least that other target (amd64-linux).
>>
>> ?Similar fixes might be required for other 'old'
>> i386 targets that do not support SSE registers.
>>
>> ?Comments welcome as usual!
>>
>> Pierre Muller
>> Pascal language support maintainer for GDB
>>
>>
>>
>> 2010-04-06 ?Pierre Muller ?<muller@ics.u-strasbg.fr>
>>
>> ? ? ? ?* i386-tdep.c: Add include features/i386/i386-go32v2.c.
>> ? ? ? ?(i386_go32_init_abi): Set TDESC field to TDESC_I386_GO32V2.
>> ? ? ? ?(i386_validate_tdesc_p): Do not require FEATURE_VECTOR.
>> ? ? ? ?Adapt code accordingly.
>> ? ? ? ?(i386_gdbarch_init): Set TDESC to TDESC_I386_GO32V2 if
>> ? ? ? ?os abi is GDB_OSABI_GO32V2.
>> ? ? ? ?(_initialize_i386_tdep): Call initialize_tdes_i386_go32v2 function.
>>
>> ? ? ? ?* features/Makefile (WHICH): Add new i386/i386-go32v2 entry.
>> ? ? ? ?* features/i386/i386-go32v2.xml: New file. Without SSE regsiters.
>> ? ? ? ?* features/i386/i386-go32v2.c: New generated file.
>> ? ? ? ?* regformats/i386/i386-go32v2.dat: New generated file.
>>
>
> This patch is incorrect. Linux runs on 32bit x86 processors without SSE.
> I have a patch to support it.
>
Please try hjl/mmx branch at
http://git.kernel.org/?p=devel/gdb/hjl/avx.git;a=summary
You need to return i386_mmx as target description if your
target doesn't support SSE.
Known issue: "gcore" doesn't work for i386 MMX targets and
I have a patch.
--
H.J.