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 v2 2/2] mi-out: Implement mi redirection using a stack.


Hi Adrian,

On 08/05/2014 02:55 PM, Adrian Sendroiu wrote:
>> It's better to use $bpnum instead of hardcoding 2, as otherwise if someone adds a
>> test that adds another breakpoint before this, this test stops being
>> effective, silently.
> 
> done
> 
>>> +    mi_gdb_test "-exec-continue" ".*"
>>
>> This should use mi_send_resuming_command/mi_expect_stop
>> or mi_execute_to, so that the test works when the whole MI
>> testsuite is run in async mode.
> 
> done. Although I ran into another problem here, because mi_expect_stop expects a
> message that looks like *stopped + prompt, while in my case it was something like
> *stopped + =breakpoint-modified + prompt. I solved this by doing an even simpler
> test case: just executing two python commands nested inside one another, like
> "python gdb.execute('python gdb.execute(...".
> 
> 
>> I think that we can avoid this duplication by renaming
>> skip_python_tests, adding it a prompt_re parameter, and
>> using that instead of $gdb_prompt.  Something like:
>>
>> proc skip_python_tests {} {
>>    skip_python_tests_prompt "$gdb_prompt $"
>> }
>>
>> proc mi_skip_python_tests {
>>    skip_python_tests_prompt "$mi_gdb_prompt$"
>> }
>>
>> Did you try that?
> 
> done
> 

Thanks.

I'm getting these with this patch:

Running /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-logging.exp ...
PASS: gdb.mi/mi-logging.exp: breakpoint at main
PASS: gdb.mi/mi-logging.exp: mi runto main
PASS: gdb.mi/mi-logging.exp: logging on
PASS: gdb.mi/mi-logging.exp: logged step
PASS: gdb.mi/mi-logging.exp: logged next
ERROR: Got interactive prompt.
UNRESOLVED: gdb.mi/mi-logging.exp: logging off
PASS: gdb.mi/mi-logging.exp: Log file contents
ERROR: Got interactive prompt.
UNRESOLVED: gdb.mi/mi-logging.exp: redirect logging on
ERROR: Got interactive prompt.
UNRESOLVED: gdb.mi/mi-logging.exp: redirect logging off
FAIL: gdb.mi/mi-logging.exp: Redirect log file contents
FAIL: gdb.mi/mi-logging.exp: verify python support (GDB internal error)
ERROR: Could not resync from internal error (timeout)
UNRESOLVED: gdb.mi/mi-logging.exp: check if python 3 (got interactive prompt)
ERROR: tcl error sourcing /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-logging.exp.
ERROR: can't read "gdb_py_is_py3k": no such variable
    while executing
...


gdb.log shows:

Expecting: ^(-gdb-set logging off[
]+)?(.*[
]+[(]gdb[)]
[ ]*)
-gdb-set logging off
^done~"/home/pedro/gdb/mygit/src/gdb/mi/mi-out.c:398: internal-error: VEC_ui_filep_last: Assertion `last' failed.\nA problem internal to GDB has been detected,\nfurther deb
ugging may prove unreliable.\nQuit this debugging session? "
~"(y or n) "
ERROR: Got interactive prompt.
UNRESOLVED: gdb.mi/mi-logging.exp: logging off
PASS: gdb.mi/mi-logging.exp: Log file contents
Expecting: ^(-gdb-set logging redirect on[
]+)?(.*[
]+[(]gdb[)]
[ ]*)

Any idea what went wrong ?
Thanks,
Pedro Alves


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