Re: [Cgdb-devel] [ 790050 ] segfault in filedlg - patch
Brought to you by:
bobbybrasko,
crouchingturbo
From: Bob R. <bo...@br...> - 2003-08-20 13:41:17
|
Hi Bartosz, Thanks for the patch. I have reproduced the problem you are seeing. I think you are right about saying the patch belongs in TGDB. I will look into fixing TGDB so that it returns TGDB_SOURCES_DENIED the first time, and not just every time after the first time. Also, because of this bug, I found another bug that needs to be fixed. The second time, when you actually do get the message "...No sources available...", you have to hit ESC or 'q' to get out of the file dialog mode, before you can hit any other keys ( CGDB thinks it is in the filedlg ). If the error occurs, I think it should leave you in CGDB's window. So, I'll try to fix these 2 bugs today. By the way, are you working with Robert Lemmen? I know he has done some work for packing CGDB with debian. I don't know exactly what he did, but I know he worked on it a little. His Email is rob...@se... if you want to find out what he is doing. Thanks for the heads up, Bob Rossi On Tue, Aug 19, 2003 at 09:36:56PM +0200, Bartosz Zapalowski wrote: > Hi >=20 > Here's a patch that solves the bug #790050. >=20 > I plan to package cgdb for Debian and have this package sponsored. > Because of that you can expect more patches from me, because I want no > bugs in programs I package, got it ;). >=20 > This patch is rather a quick hack, and not the proper solution. However, > the source code is hard do hack, hence this workaround. >=20 > The proper fix would be to patch tgdb sources. Try the following > *before* applying this patch: > $ cgdb > ESC, o > q > ESC, o >=20 > As you can see, at first you get a blank screen. At a second 'o' command > you get > Error: No sources available! Was program compiled with debug? >=20 > As I figured out, the problem is in annotate-two, which incorrectly > parses gdb output for the first time (or maybe it's gdb bad boy?). >=20 > --=20 > Bartosz Zapalowski > ba...@kl... > diff -ruN cgdb-0.3.4-old/cgdb/src/cgdb.c cgdb-0.3.4-new/cgdb/src/cgdb.c > --- cgdb-0.3.4-old/cgdb/src/cgdb.c 2003-06-24 03:25:35.000000000 +0200 > +++ cgdb-0.3.4-new/cgdb/src/cgdb.c 2003-08-19 21:15:10.000000000 +0200 > @@ -366,6 +366,12 @@ > =20 > if_clear_filedlg(); > =20 > + if (queue_size (q) =3D=3D 0) { > + if_display_message("Error:", 0, =20 > + " No sources available! Was program compiled with debug?"); > + break; > + } > + > while ( queue_size ( q ) > 0 ) { > s =3D queue_pop( q ); > =20 |