This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] Add a 'starti' command.
- From: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at freebsd dot org>, Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 15 Nov 2017 20:23:41 +0000
- Subject: Re: [PATCH v3] Add a 'starti' command.
- Authentication-results: sourceware.org; auth=none
- References: <20170911220803.73819-1-jhb@FreeBSD.org> <86inerwm8t.fsf@gmail.com> <1615021.krJEU3LQPO@ralph.baldwin.cx>
On 11/15/2017 08:11 PM, John Baldwin wrote:
> On Friday, November 03, 2017 01:00:18 PM Yao Qi wrote:
>> John Baldwin <jhb@FreeBSD.org> writes:
>>
>>> +# Continue to the start of main(). The constructor should have run so
>>> +# 'x' should be 1.
>>> +
>>> +gdb_breakpoint main
>>> +gdb_test_sequence "continue" "" {
>>> + "\\$2 = 1"
>>> + ".*Breakpoint .*main \\(\\) at .*starti.c.*"
>>
>> Here is a test failure, captured by buildbot,
>> https://sourceware.org/ml/gdb-testers/2017-q3/msg04381.html
>>
>> (gdb) gdb_expect_list pattern: /\$2 = 1/
>> continue^M
>> Continuing.^M
>> $2 = 1^M
>> gdb_expect_list pattern: /.*Breakpoint .*main \(\) at .*starti.c.*/
>> ^M
>> Breakpoint 1, Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: ^M
>> main () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.base/starti.c:29^M
>> 29 return 0;^M
>> (gdb) gdb_expect_list pattern: //
>> FAIL: gdb.base/starti.exp: continue (pattern 3 + sentinel) (timeout)
>>
>> Can you take a look?
>
> Hmm, so it seems the python exception adds a newline which throws the regex
> match off as 'main \(\)' is now on a second line. The 'start.exp' test
> only looks for the 'main' bit and not the preceding 'Breakpoint', so
> something like this instead?
But is the Python exception expected? From Yao's earlier paste:
(gdb) gdb_expect_list pattern: /\$2 = 1/
continue^M
Continuing.^M
$2 = 1^M
gdb_expect_list pattern: /.*Breakpoint .*main \(\) at .*starti.c.*/
^M
Breakpoint 1, Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: ^M
main () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.base/starti.c:29^M
29 return 0;^M
(gdb) gdb_expect_list pattern: //
FAIL: gdb.base/starti.exp: continue (pattern 3 + sentinel) (timeout)
"Installation error" looks quite odd to me. Why did that happen?
Thanks,
Pedro Alves