This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] Add a 'starti' command.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]