This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [testsuite patch] Skip py-unwind.exp on x86_64 -m32
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 18 Jul 2016 11:04:27 +0100
- Subject: Re: [testsuite patch] Skip py-unwind.exp on x86_64 -m32
- Authentication-results: sourceware.org; auth=none
- References: <20160717143003.GA12147@host1.jankratochvil.net>
On Sun, Jul 17, 2016 at 3:30 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi,
>
> (gdb) source /home/jkratoch/redhat/gdb-clean/gdb/testsuite/outputs/gdb.python/py-unwind/py-unwind.py^M
> Python script imported^M
> Python Exception <type 'exceptions.ValueError'> Bad register: ^M
> (gdb) FAIL: gdb.python/py-unwind.exp: import python scripts
>
> class TestUnwinder(Unwinder):
> AMD64_RBP = 6
> AMD64_RSP = 7
> AMD64_RIP = 16
>
> This was already discussed here:
> Re: [testsuite patch] Fix gdb.btrace/tailcall-only.exp errors on x86_64-m32
> https://sourceware.org/ml/gdb-patches/2016-04/msg00222.html
> Message-ID: <20160411195537.GA22299@host1.jankratochvil.net>
> but no GDB maintainer gave an answer how to run testsuite in cross-arch mode.
>
>
This problem is slightly different from "how to run testsuite in cross-arch
mode", IMO.
py-unwind.py defines a unwinder, in an arch-specific way. It has nothing
wrong.
However, py-unwind.py should be more portable, which means, it should
define unwdiner for each arch it supports, and py-unwind.exp or py-unwind.py
chooses the right python unwinder according to the arch. IOW, we need to
define a python unwinder for i386, and use it when arch is i386.
--
Yao (齐尧)