This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Clean up gdb.gdb/selftest.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Wed, 14 Dec 2016 17:39:17 +0000
- Subject: Re: [PATCH] Clean up gdb.gdb/selftest.exp
- Authentication-results: sourceware.org; auth=none
- References: <1481725157-14018-1-git-send-email-yao.qi@linaro.org>
On 12/14/2016 02:19 PM, Yao Qi wrote:
> I recently see the test fails like this,
>
> (gdb) PASS: gdb.gdb/selftest.exp: step over argv initialization
> list^M
> 487 std::vector<struct cmdarg> cmdarg_vec;^M
> (gdb) FAIL: gdb.gdb/selftest.exp: unknown source line (after step over argv initialization)
>
> step^M
> std::vector<cmdarg, std::allocator<cmdarg> >::vector (this=0x7fffffffdc10) at ../../binutils-gdb/gdb/main.c:487^M
> 487 std::vector<struct cmdarg> cmdarg_vec;^M
> (gdb) FAIL: gdb.gdb/selftest.exp: step into xmalloc call
>
> These fails are caused by using std::vector in commit
> f60ee22ea1d62f7004511ec65a3ad76890032d88. selttest.exp should match
> the source code of GDB. This patch adds some new regexp to match
> code using std::vector, and also removes some out of date regexp.
>
> proc "do_steps_and_nexts left us ready to execute an xmalloc call",
> however, there is no xmalloc called, so I also remove these bits.
>
> I am also wondering the value of do_steps_and_nexts, can we just
> remove it completely?
Yeah, I don't see much value either. It's a constant source of
update pain.
I've found the bits of selftest.exp that interact with SIGINT
useful in the past, as that interacts with readline's SIGINT
handler. IIUC, that caught a bug in some local version of my
console work earlier in the year. So I'd prefer to keep those
bits. But I wouldn't miss do_steps_and_nexts for sure.
Thanks,
Pedro Alves