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 gdb/17051] GDB crash when disconnecting from and reconnecting to gdbserver


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

Doug Evans <xdje42 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xdje42 at gmail dot com

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
A similar failure:

bash2$ gdbserver --multi :1234
bash1$ gdb ~/foo
(gdb) set remote exec-file ~/foo # doesn't work, but it triggers gdbserver to
exit
(gdb) tar ext :1234
(gdb) start
Temporary breakpoint 1 at 0x4007ae: main.
Starting program: /home/dje/foo
Running "~/foo" on the remote target failed

--> gdbserver exits with:
Cannot exec ~/foo: No such file or directory.

Back in gdb:

(gdb) i thr
[New Thread 10659.10659]
Remote connection closed
(gdb) set remote exec-file /home/dje/foo  # fix path (though IWBN to support ~
here)
(gdb) tar ext :1234
Remote debugging using :1234

Breakpoint 1, internal_error (
    file=0x8d5150 "../../binutils-gdb/gdb/thread.c", line=703,
    fmt=0x8d5130 "%s: Assertion `%s' failed.")
    at ../../binutils-gdb/gdb/common/errors.c:54

which is here:

static int
is_thread_state (ptid_t ptid, enum thread_state state)
{
  struct thread_info *tp;

  tp = find_thread_ptid (ptid);
=>gdb_assert (tp);
  return tp->state == state;
}

(top-gdb) bt
#0  internal_error (file=0x8d5150 "../../binutils-gdb/gdb/thread.c",
    line=703, fmt=0x8d5130 "%s: Assertion `%s' failed.")
    at ../../binutils-gdb/gdb/common/errors.c:54
#1  0x0000000000628c40 in is_thread_state (ptid=..., state=THREAD_EXITED)
    at ../../binutils-gdb/gdb/thread.c:703
#2  0x0000000000628cac in is_exited (ptid=...)
    at ../../binutils-gdb/gdb/thread.c:716
#3  0x000000000074d0f4 in has_stack_frames ()
    at ../../binutils-gdb/gdb/frame.c:1516
#4  0x000000000074d1db in deprecated_safe_get_selected_frame ()
    at ../../binutils-gdb/gdb/frame.c:1563
#5  0x0000000000740f43 in check_frame_language_change ()
    at ../../binutils-gdb/gdb/top.c:344
#6  0x00000000007412a3 in execute_command (p=0xd1317c "4", from_tty=1)
    at ../../binutils-gdb/gdb/top.c:485
#7  0x0000000000638988 in command_handler (command=0xd13170 "")
    at ../../binutils-gdb/gdb/event-top.c:432
#8  0x0000000000638f41 in command_line_handler (rl=0x17870f0 "") at
../../binutils-gdb/gdb/event-top.c:629
...

-- 
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]