Summary: | Stepping from python interface broken? | ||
---|---|---|---|
Product: | gdb | Reporter: | Tejas Belagod <belagod> |
Component: | python | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | Hsiangkai, qiyao, tromey |
Priority: | P2 | ||
Version: | 8.0.1 | ||
Target Milestone: | --- | ||
Host: | x86_64-linux | Target: | |
Build: | x86_64-linux | Last reconfirmed: |
Description
Tejas Belagod
2017-07-01 10:22:49 UTC
Currently, current_ui->prompt_state will keep PROMPTED value under python interface. Synchronous commands will behave like asynchronous commands and GDB will raise an exception while checking thread state before executing synchronouse commands in ensure_not_running(). Initialize current_ui->prompt_state to PROMPT_NEEDED in execute_gdb_command() to ensure synchronous commands will complete before next command under python interface. I have prepared a patch for this bug. However, I am not sure is it reasonable to change prompt_state in execute_gdb_command() or not. Any comments? --- gdb/python/python.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb/python/python.c b/gdb/python/python.c index c53e10f..49b5eff 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -589,6 +589,7 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) struct interp *interp; scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0); + current_ui->prompt_state = PROMPT_NEEDED; scoped_restore save_uiout = make_scoped_restore (¤t_uiout); -- (In reply to Hsiangkai Wang from comment #2) > I have prepared a patch for this bug. However, I am not sure is it > reasonable to change prompt_state in execute_gdb_command() or not. Any > comments? gdb-patches@sourceware.org is the right place to discuss patches, so post your patch there. You can ask something you are not sure about there. (In reply to Yao Qi from comment #3) > (In reply to Hsiangkai Wang from comment #2) > > I have prepared a patch for this bug. However, I am not sure is it > > reasonable to change prompt_state in execute_gdb_command() or not. Any > > comments? > > gdb-patches@sourceware.org is the right place to discuss patches, so post > your patch there. You can ask something you are not sure about there. Thanks for your reminding. I have sent a patch to gdb-patches@sourceware.org for review. https://patchwork.sourceware.org/patch/22595/ Did this patch ever go in? If not could you send a "ping" follow-up to the list? |