This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Lazily and dynamically create i386-linux target descriptions
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 26 Jul 2017 10:12:10 -0400
- Subject: [binutils-gdb] Lazily and dynamically create i386-linux target descriptions
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT ea03d0d3c32b22aeddfeb139a4a515f7e5961347 ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: ea03d0d3c32b22aeddfeb139a4a515f7e5961347
Lazily and dynamically create i386-linux target descriptions
Instead of using pre-generated target descriptions, this patch
changes GDB to lazily and dynamically create target descriptions
according to the target hardware capability (xcr0 in i386).
This support any combination of target features.
Some reg in target description has "regnum" attribute, so its register
number is got from the attribute value instead from sequential allocation.
<reg name="xmm0" bitsize="128" type="vec128" regnum="32"/>
when target description is created, it should match the regnum, so this
patch adds a new field m_next_regnum to track it, if attribute number is
greater than the m_next_regnum, print the code to set register number
explicitly.
gdb:
2017-07-26 Yao Qi <yao.qi@linaro.org>
* i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
Include features/i386/32bit-*.c.
(i386_linux_read_description): Generate target description if it
doesn't exist.
(_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
functions.
* features/i386/32bit-linux.c: Re-generated.
* features/i386/32bit-sse.c: Likewise.
* target-descriptions.c (print_c_feature::visit): Print code to
set register number if needed.
(print_c_feature) <m_next_regnum>: New field.