* [HEADS-UP] gdb segfault
@ 2004-05-08 3:18 Michael Snyder
[not found] ` <40A0272D.5080702@gnu.org>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Snyder @ 2004-05-08 3:18 UTC (permalink / raw)
To: gdb-patches
Hey yo --
gdb is seg-faulting immediately whenever its run with --noasync.
I have an old build from the beginning of March that doesn't
do it (nor do even older ones), so it's probably a change
from between then and now.
It crashes in display_gdb_prompt, as called from
tui_command_loop. Here's a backtrace.
#0 0x40106d33 in strlen () from /lib/tls/libc.so.6
#1 0x08114c6a in display_gdb_prompt (new_prompt=0x0)
at /home/msnyder/src/gdb/event-top.c:280
#2 0x080bf1f5 in tui_command_loop (data=0x0)
at /home/msnyder/src/gdb/tui/tui-interp.c:140
#3 0x0811168a in current_interp_command_loop ()
at /home/msnyder/src/gdb/interps.c:277
#4 0x0807aafb in captured_command_loop (data=0x0)
at /home/msnyder/src/gdb/main.c:97
#5 0x080801d9 in do_catch_errors (uiout=0x830b0c0, data=0xbfffbe18)
at /home/msnyder/src/gdb/top.c:524
#6 0x0807ffdc in catcher (func=0x80801bd <do_catch_errors>,
func_uiout=0x830b0c0, func_args=0xbfffbe18, func_val=0xbfffbe24,
func_caught=0xbfffbe20, errstring=0x822cc48 "", gdberrmsg=0x0, mask=6)
at /home/msnyder/src/gdb/top.c:431
#7 0x08080214 in catch_errors (func=0x807aaf0 <captured_command_loop>,
func_args=0x0, errstring=0x822cc48 "", mask=6)
at /home/msnyder/src/gdb/top.c:536
#8 0x0807b918 in captured_main (data=0xbfffc140)
at /home/msnyder/src/gdb/main.c:805
#9 0x080801d9 in do_catch_errors (uiout=0x82b8220, data=0xbfffc0f8)
at /home/msnyder/src/gdb/top.c:524
#10 0x0807ffdc in catcher (func=0x80801bd <do_catch_errors>,
func_uiout=0x82b8220, func_args=0xbfffc0f8, func_val=0xbfffc104,
func_caught=0xbfffc100, errstring=0x822cc48 "", gdberrmsg=0x0, mask=6)
at /home/msnyder/src/gdb/top.c:431
#11 0x08080214 in catch_errors (func=0x807ab2e <captured_main>,
func_args=0xbfffc140, errstring=0x822cc48 "", mask=6)
at /home/msnyder/src/gdb/top.c:536
#12 0x0807b942 in gdb_main (args=0xbfffc140)
at /home/msnyder/src/gdb/main.c:814
#13 0x0807aae9 in main (argc=2, argv=0xbfffc1e4)
at /home/msnyder/src/gdb/gdb.c:35
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [HEADS-UP] gdb segfault
[not found] ` <40A0272D.5080702@gnu.org>
@ 2004-06-01 16:08 ` Elena Zannoni
2004-06-01 17:41 ` Michael Snyder
0 siblings, 1 reply; 6+ messages in thread
From: Elena Zannoni @ 2004-06-01 16:08 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Michael Snyder, gdb-patches
Andrew Cagney writes:
> > Hey yo --
> >
> > gdb is seg-faulting immediately whenever its run with --noasync.
> > I have an old build from the beginning of March that doesn't
> > do it (nor do even older ones), so it's probably a change
> > from between then and now.
> >
> > It crashes in display_gdb_prompt, as called from
> > tui_command_loop. Here's a backtrace.
>
> Sounds like it's time to delete --noasync ....
>
>
I think so, yes.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [HEADS-UP] gdb segfault
2004-06-01 16:08 ` Elena Zannoni
@ 2004-06-01 17:41 ` Michael Snyder
2004-06-10 16:22 ` Andrew Cagney
0 siblings, 1 reply; 6+ messages in thread
From: Michael Snyder @ 2004-06-01 17:41 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Andrew Cagney, gdb-patches
Elena Zannoni wrote:
> Andrew Cagney writes:
> > > Hey yo --
> > >
> > > gdb is seg-faulting immediately whenever its run with --noasync.
> > > I have an old build from the beginning of March that doesn't
> > > do it (nor do even older ones), so it's probably a change
> > > from between then and now.
> > >
> > > It crashes in display_gdb_prompt, as called from
> > > tui_command_loop. Here's a backtrace.
> >
> > Sounds like it's time to delete --noasync ....
>
> I think so, yes.
It bothers me that ^C doesn't work with async, and I can't fall back
to noasync to make it work. I think async should work (wrt. ^C, at
least), before we delete noasync.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [HEADS-UP] gdb segfault
2004-06-01 17:41 ` Michael Snyder
@ 2004-06-10 16:22 ` Andrew Cagney
2004-06-11 14:42 ` Eli Zaretskii
2004-07-17 3:24 ` Andrew Cagney
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cagney @ 2004-06-10 16:22 UTC (permalink / raw)
To: Michael Snyder, Elena Zannoni, Eli Zaretskii; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
> Elena Zannoni wrote:
>
>> Andrew Cagney writes:
>> > > Hey yo --
>> > > > > gdb is seg-faulting immediately whenever its run with --noasync.
>> > > I have an old build from the beginning of March that doesn't
>> > > do it (nor do even older ones), so it's probably a change
>> > > from between then and now.
>> > > > > It crashes in display_gdb_prompt, as called from
>> > > tui_command_loop. Here's a backtrace. > > Sounds like it's time to delete --noasync ....
>>
>> I think so, yes.
>
>
> It bothers me that ^C doesn't work with async, and I can't fall back
> to noasync to make it work. I think async should work (wrt. ^C, at
> least), before we delete noasync.
Hmm, ^C with noasync doesn't work either, it dumps core ;-)
Lets all take responsibility for this problem and see through the proper
fix:
http://sources.redhat.com/ml/gdb-patches/2004-05/msg00320.html
http://sources.redhat.com/ml/gdb-patches/2004-02/msg00530.html
I've attached is the first of two initial steps - disable the broken
async code ready for its removal. Then we can fix QUIT.
Eli, Elena?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4409 bytes --]
Index: doc/ChangeLog
2004-06-10 Andrew Cagney <cagney@gnu.org>
* gdb.texinfo (Mode Options): Delete documentation on "-async" and
"-noasync".
2004-06-10 Andrew Cagney <cagney@gnu.org>
* defs.h (event_loop_p): Replace variable declaration with macro,
always 1.
* main.c (captured_main): Delete options "-async" and "-noasync".
(event_loop_p): Delete variable.
* NEWS: Mention that "-async" and "-noasync" were removed.
Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.151
diff -p -u -r1.151 NEWS
--- NEWS 26 May 2004 06:32:01 -0000 1.151
+++ NEWS 10 Jun 2004 16:18:01 -0000
@@ -3,6 +3,11 @@
*** Changes since GDB 6.1:
+* "-async" and "-noasync" options removed.
+
+Support for the broken "-noasync" option has been removed (it caused
+GDB to dump core).
+
* New ``start'' command.
This command runs the program until the begining of the main procedure.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.146
diff -p -u -r1.146 defs.h
--- defs.h 8 May 2004 23:02:10 -0000 1.146
+++ defs.h 10 Jun 2004 16:18:01 -0000
@@ -1216,8 +1216,11 @@ struct target_waitstatus;
struct cmd_list_element;
/* Should the asynchronous variant of the interpreter (using the
- event-loop) be enabled? */
-extern int event_loop_p;
+ event-loop) be enabled? */
+/* NOTE: cagney/2004-06-10: GDB changed to always uses the event-loop.
+ A follow-on cleanup is to eliminate references to
+ "event_loop_p". */
+#define event_loop_p 1
extern void (*deprecated_init_ui_hook) (char *argv0);
extern void (*deprecated_command_loop_hook) (void);
Index: main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.41
diff -p -u -r1.41 main.c
--- main.c 21 Apr 2004 23:52:20 -0000 1.41
+++ main.c 10 Jun 2004 16:18:01 -0000
@@ -49,12 +49,6 @@ int display_time;
int display_space;
-/* Whether this is the async version or not. The async version is
- invoked on the command line with the -nw --async options. In this
- version, the usual command_loop is substituted by and event loop which
- processes UI events asynchronously. */
-int event_loop_p = 1;
-
/* The selected interpreter. This will be used as a set command
variable, so it should always be malloc'ed - since
do_setshow_command will free it. */
@@ -253,8 +247,6 @@ captured_main (void *data)
};
static struct option long_options[] =
{
- {"async", no_argument, &event_loop_p, 1},
- {"noasync", no_argument, &event_loop_p, 0},
#if defined(TUI)
{"tui", no_argument, 0, OPT_TUI},
#endif
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.204
diff -p -u -r1.204 gdb.texinfo
--- doc/gdb.texinfo 24 May 2004 23:53:58 -0000 1.204
+++ doc/gdb.texinfo 10 Jun 2004 16:18:02 -0000
@@ -1065,30 +1065,6 @@ that control @value{GDBN}, and level 2 h
The annotation mechanism has largely been superseeded by @sc{gdb/mi}
(@pxref{GDB/MI}).
-@item -async
-@cindex @code{--async}
-Use the asynchronous event loop for the command-line interface.
-@value{GDBN} processes all events, such as user keyboard input, via a
-special event loop. This allows @value{GDBN} to accept and process user
-commands in parallel with the debugged process being
-run@footnote{@value{GDBN} built with @sc{djgpp} tools for
-MS-DOS/MS-Windows supports this mode of operation, but the event loop is
-suspended when the debuggee runs.}, so you don't need to wait for
-control to return to @value{GDBN} before you type the next command.
-(@emph{Note:} as of version 5.1, the target side of the asynchronous
-operation is not yet in place, so @samp{-async} does not work fully
-yet.)
-@c FIXME: when the target side of the event loop is done, the above NOTE
-@c should be removed.
-
-When the standard input is connected to a terminal device, @value{GDBN}
-uses the asynchronous event loop by default, unless disabled by the
-@samp{-noasync} option.
-
-@item -noasync
-@cindex @code{--noasync}
-Disable the asynchronous event loop for the command-line interface.
-
@item --args
@cindex @code{--args}
Change interpretation of command line so that arguments following the
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [HEADS-UP] gdb segfault
2004-06-10 16:22 ` Andrew Cagney
@ 2004-06-11 14:42 ` Eli Zaretskii
2004-07-17 3:24 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2004-06-11 14:42 UTC (permalink / raw)
To: Andrew Cagney; +Cc: msnyder, ezannoni, gdb-patches
> Date: Thu, 10 Jun 2004 12:21:48 -0400
> From: Andrew Cagney <cagney@gnu.org>
>
> I've attached is the first of two initial steps - disable the broken
> async code ready for its removal. Then we can fix QUIT.
>
> Eli, Elena?
Okay with me.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [HEADS-UP] gdb segfault
2004-06-10 16:22 ` Andrew Cagney
2004-06-11 14:42 ` Eli Zaretskii
@ 2004-07-17 3:24 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2004-07-17 3:24 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Michael Snyder, Elena Zannoni, Eli Zaretskii, gdb-patches
> Index: doc/ChangeLog
> 2004-06-10 Andrew Cagney <cagney@gnu.org>
>
> * gdb.texinfo (Mode Options): Delete documentation on "-async" and
> "-noasync".
>
> 2004-06-10 Andrew Cagney <cagney@gnu.org>
>
> * defs.h (event_loop_p): Replace variable declaration with macro,
> always 1.
> * main.c (captured_main): Delete options "-async" and "-noasync".
> (event_loop_p): Delete variable.
> * NEWS: Mention that "-async" and "-noasync" were removed.
Oops, dropped. I've now checked this in (mainline and 6.2). Oked by
Eli on, and Elena off list.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-07-17 3:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-08 3:18 [HEADS-UP] gdb segfault Michael Snyder
[not found] ` <40A0272D.5080702@gnu.org>
2004-06-01 16:08 ` Elena Zannoni
2004-06-01 17:41 ` Michael Snyder
2004-06-10 16:22 ` Andrew Cagney
2004-06-11 14:42 ` Eli Zaretskii
2004-07-17 3:24 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox