This is the mail archive of the gdb-prs@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]

[Bug mi/23820] New: No one handle "current_ui->prompt_state = PROMPT_NEEDED"


https://sourceware.org/bugzilla/show_bug.cgi?id=23820

            Bug ID: 23820
           Summary: No one handle "current_ui->prompt_state =
                    PROMPT_NEEDED"
           Product: gdb
           Version: 8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: lijiang1489 at 163 dot com
  Target Milestone: ---

There is a case that when debugging a program using gdb mi, if a command  got
an error and throw_error back to function"start_event_loop", the error message
has been displayed, but prompt "(gdb)" is not displayed.

Actually, command line can get input now,"(gdb)" is displayed when the next
command done. But this state is not right, some IDEs can not get the state of
program now.

A way to reproducing this case:
resources:
1. an a.out with debug-info
2. a gdb_debug with debug-info
3. a gdbserver
4. a gdb

step:
1. run gdbserver :112233 a.out
2. gdb --args ./gdb_debug a.out --inter mi
   b remote_wait (or remote_target::wait)
   run
3. come to gdb_debug:
   tar rem:112233
4. come to gdb:
   continue
5. come to gdb_debug:
   singlestep
6. come to gdb:
   b readchar (or remote_target::readchar)
   continue
7. ps -A | grep gdbserver
   kill -9 pid_of_gdbserver
8. come to gdb:
   break event-loop.c:380 (380 for gdb8.2, in function "start_event_loop",
after "CATCH" operation, where function async_enable_stdin() wrote.)
   continue

Result:
when gdb_debug back to "start_event_loop, event-loop.c:380", you can remove all
breakpoints, and come to gdb doing continue:
At this time, connection for gdbserver is lost, gdb_debug print the correspond
message too, but prompt "(gdb)" is not outputed event if
“current_ui->prompt_state = PROMPT_NEEDED” has been written in function
“start_event_loop”.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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