public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Inadvertently run inferior threads
@ 2015-03-12 17:11 Eli Zaretskii
  2015-03-14 13:40 ` Pedro Alves
  0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2015-03-12 17:11 UTC (permalink / raw)
  To: gdb

This happens to me quite a lot when I debug Emacs on Windows and
invoke a command that calls a function in the inferior:

  Breakpoint 3, font_matches_spec (type=4, font=0x88b678, spec=22662725,
      backend=33216, logfont=0x88b860) at w32font.c:1197
  1197                      if (! memq_no_quit (val, support))
  (gdb) p val
  $1 = -7860248
  (gdb) xtype
  Lisp_Symbol
  (gdb) xsymbol
  $2 = (struct Lisp_Symbol *) 0x1913eb0 <dumped_data+3723472>
  "mathematical-bold"
  (gdb) n
  1198                        return 0;
  (gdb) p support
  $3 = 25938803
  (gdb) pp support
  [New Thread 20240.0x1134]
  [New Thread 20240.0x445c]
  (symbol arabic hebrew cyrillic greek phonetic latin)
  (gdb) c
  Continuing.
  Cannot execute this command while the selected thread is running.
  (gdb) info threads
    Id   Target Id         Frame
    6    Thread 20240.0x445c (running)
    5    Thread 20240.0x1134 (running)
    4    Thread 20240.0x24bc (running)
    3    Thread 20240.0x1cb4 (running)
    2    Thread 20240.0xb5c (running)
  * 1    Thread 20240.0x464c (running)

"pp" is in this case the command that invokes an inferior function,
see src/.gdbinit in the Emacs sources for the details.  'support' is a
Lisp object, a list in this case, and "pp" displays it in
human-readable form.  Note that invoking "pp" started 2 new threads in
the inferior, for some reason -- neither the command itself nor the
function it invokes start any threads.  It's Windows itself that
starts them, so it seems.

I only see this on Windows 7, never on XP (didn't try newer versions).

Once this happens, the debugging session seems to be ruined: the only
thing I can do is kill the inferior and quit the debugger.  Because
there doesn't seem to be any way of stopping the threads again, not on
Windows anyway.

Am I the only one who sees this annoying problem?  Does anyone know
how to avoid it, or where to look for fixing it?

TIA

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2015-06-29 15:57 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 17:11 Inadvertently run inferior threads Eli Zaretskii
2015-03-14 13:40 ` Pedro Alves
2015-03-14 14:56   ` Eli Zaretskii
2015-03-14 15:36     ` Pedro Alves
2015-03-14 15:51       ` Pedro Alves
2015-03-14 15:58         ` Pedro Alves
2015-06-10 15:15           ` Eli Zaretskii
2015-03-14 16:06         ` Eli Zaretskii
2015-06-10 15:50         ` Eli Zaretskii
2015-06-11 13:42           ` Eli Zaretskii
2015-06-15 13:18             ` Pedro Alves
2015-06-15 15:27               ` Eli Zaretskii
2015-06-15 15:42                 ` Pedro Alves
2015-06-23  4:07                   ` Doug Evans
2015-06-23 12:19                     ` Pedro Alves
2015-06-23 19:11                       ` Pedro Alves
2015-06-23 19:52                         ` Eli Zaretskii
2015-06-24 14:29                           ` Eli Zaretskii
2015-06-29 15:57                             ` Pedro Alves
2015-06-23 14:58                     ` Eli Zaretskii
2015-06-15 13:01           ` Pedro Alves
2015-06-15 15:14             ` Eli Zaretskii
2015-06-15 15:28               ` Pedro Alves
2015-06-15 17:21                 ` Eli Zaretskii
2015-06-15 17:56                   ` Pedro Alves
2015-06-15 19:07                     ` Eli Zaretskii
2015-06-23 11:51                     ` Pedro Alves
2015-03-14 16:04       ` Eli Zaretskii
2015-03-14 16:15         ` Pedro Alves
2015-03-14 16:17           ` Eli Zaretskii
2015-03-14 16:23             ` Pedro Alves
2015-03-14 17:01               ` Eli Zaretskii
2015-03-14 17:46                 ` Pedro Alves
2015-06-10 15:13     ` Eli Zaretskii
2015-06-15 13:08       ` Pedro Alves
2015-06-15 15:15         ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).