This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Replicate src dir in build dir
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 4 Oct 2017 12:41:12 +0100
- Subject: Re: [RFC] Replicate src dir in build dir
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 02F3EC2D0D2C
- References: <1505832159-23038-1-git-send-email-yao.qi@linaro.org> <0aca31f3-4604-5630-baba-0584bb9d5c65@redhat.com> <86y3p99uy3.fsf@gmail.com> <06499c43-88b6-06cd-b3d8-4964bbd3b58e@redhat.com> <86a81djoln.fsf@gmail.com> <33e5939d-b8c1-ae61-4910-7492f85fdba8@redhat.com>
On 10/03/2017 09:02 PM, Pedro Alves wrote:
> On 09/29/2017 08:23 PM, Yao Qi wrote:
>
>> >
>> > I tested this patch by build gdb for each different target triplets
>> > respectively,
>> >
>> > aarch64-elf aarch64-rtems aarch64-freebsd aarch64-linux alpha-elf
>> > alpha-linux alpha-netbsd alpha-openbsd arm-elf arm-wince-pe arm-linux
>> > arm-netbsd arm-symbianelf avr cris-elf frv-elf h8300-elf i386-elf
>> > i386-darwin i386-dicos i386-freebsd i386-netbsdelf i386-openbsd
>> > i386-nto i386-solaris i386-linux i386-gnu i386-cygwin i386-mingw32
>> > i386-go32 ia64-linux-gnu ia64-vms lm32-elf m32c-elf m32r-elf m32r-linux
>> > m68hc11-elf m68k-elf m68k-linux m68k-netbsd m68k-openbsd m88k-openbsd
>> > mep-elf microblaze-xilinx-elf microblaze-linux-gnu mips-elf moxie-elf
>> > ms1-elf nios2-elf nios2-linux-gnu hppa-elf hppa-linux hppa-netbsd
>> > hppa-openbsd powerpc-eabi powerpc-freebsd powerpc-netbsd powerpc-openbsd
>> > powerpc-linux powerpc-lynx178 rl78-elf rx-elf s390-linux-gnu score-elf
>> > sh-elf sh-linux sh-openbsd sh64-elf sh64-linux sh64-openbsd sparc64-linux
>> > sparc-linux sparc-freebsd sparc64-freebsd sparc-netbsd sparc64-netbsd
>> > sparc-openbsd sparc64-openbsd spu-elf tic6x-elf tic6x-uclinux v850-elf
>> > vax-netbsd vax-openbsd x86_64-linux-gnu x86_64-darwin x86_64-dicos
>> > x86_64-elf x86_64-freebsd x86_64-mingw32 x86_64-netbsd x86_64-openbsd
>> > x86_64-rtems xstormy16-elf xtensa-elf xtensa-linux
> OOC, this wasn't with gdb/gdb_buildall.sh, was it?
>
BTW, I was thinking how you don't really need to build gdb to test this.
All you need is to make sure that gdb_target_obs is the same list of
objects before and after the patch. So you could drop this script
in gdb/ , and call it for each for the triplets above, before and
after the patch, and diff the output.
~~~
$ cat test-configure.tgt
set -e
targ=$1
if [ $targ == "" ]; then
echo "no target specified"
exit 1
fi
source ./configure.tgt
echo "target: $targ"
objs=$(echo $gdb_target_obs | sort -u)
echo "gdb_target_obs: $objs"
~~~
$ ./test-configure.tgt i686-unknown-linux-gnu
target: i686-unknown-linux-gnu
gdb_target_obs: i386-tdep.o i386.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o
That's going to be way faster...
Might be worth it to add something like this to the tree.
Thanks,
Pedro Alves