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/12850] `interrupt' command can hang


http://sourceware.org/bugzilla/show_bug.cgi?id=12850

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pedro at codesourcery dot
                   |                            |com

--- Comment #3 from Pedro Alves <pedro at codesourcery dot com> 2011-06-07 10:09:14 UTC ---
debug gdb with gdb, replace that shell sleep 1s with a much larger sleep,
and ctrl-c after sourcing the test script, and we'll find:

(top-gdb) bt
#0  0x00007ffff74ec754 in __libc_wait (stat_loc=0x7fffffffd6b8) at
../sysdeps/unix/sysv/linux/wait.c:32
#1  0x0000000000607de2 in shell_escape (arg=0x1e2d4e6 "sleep 10000s",
from_tty=0) at ../../src/gdb/cli/cli-cmds.c:753
#2  0x0000000000600ef5 in do_cfunc (c=0x1e25080, args=0x1e2d4e6 "sleep 10000s",
from_tty=0) at ../../src/gdb/cli/cli-decode.c:67
#3  0x0000000000603fbc in cmd_func (cmd=0x1e25080, args=0x1e2d4e6 "sleep
10000s", from_tty=0) at ../../src/gdb/cli/cli-decode.c:1777
During symbol reading, unsupported tag: 'DW_TAG_const_type'.
#4  0x000000000048905d in execute_command (p=0x1e2d4f1 "s", from_tty=0) at
../../src/gdb/top.c:435
#5  0x000000000048934e in command_loop () at ../../src/gdb/top.c:549
#6  0x0000000000488dc7 in read_command_file (stream=0x1e4e0b0) at
../../src/gdb/top.c:327
#7  0x0000000000606e0f in script_from_file (stream=0x1e4e0b0, file=0x1c2f157
"x") at ../../src/gdb/cli/cli-script.c:1619
#8  0x0000000000607992 in source_script_from_stream (stream=0x1e4e0b0,
file=0x1c2f157 "x") at ../../src/gdb/cli/cli-cmds.c:559
#9  0x0000000000607a27 in source_script_with_search (file=0x1c2f157 "x",
from_tty=1, search_path=0) at ../../src/gdb/cli/cli-cmds.c:590
#10 0x0000000000607c1d in source_command (args=0x1c2f157 "x", from_tty=1) at
../../src/gdb/cli/cli-cmds.c:665
#11 0x0000000000600ef5 in do_cfunc (c=0x1e230f0, args=0x1c2f157 "x",
from_tty=1) at ../../src/gdb/cli/cli-decode.c:67
#12 0x0000000000603fbc in cmd_func (cmd=0x1e230f0, args=0x1c2f157 "x",
from_tty=1) at ../../src/gdb/cli/cli-decode.c:1777
#13 0x000000000048905d in execute_command (p=0x1c2f157 "x", from_tty=1) at
../../src/gdb/top.c:435
#14 0x00000000006cd62c in command_handler (command=0x1c2f150 "source x") at
../../src/gdb/event-top.c:499
#15 0x00000000006cdc3b in command_line_handler (rl=0x1e6ca00 "") at
../../src/gdb/event-top.c:704
#16 0x00000000007f3983 in rl_callback_read_char () at
../../src/readline/callback.c:220
#17 0x00000000006ccc05 in rl_callback_read_char_wrapper (client_data=0x0) at
../../src/gdb/event-top.c:177
#18 0x00000000006cd51b in stdin_event_handler (error=0, client_data=0x0) at
../../src/gdb/event-top.c:434
#19 0x00000000006cbba8 in handle_file_event (data=...) at
../../src/gdb/event-loop.c:831
#20 0x00000000006cb074 in process_event () at ../../src/gdb/event-loop.c:402

shell_escape is not async friendly with it's direct call to "wait" :-/
...
  if (pid != -1)
    while ((rc = wait (&status)) != pid && rc != -1)
      ;

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]