Re: [PATCH] bug in showing/setting remake options

"R. Bernstein" <[email protected]>
Newsgroups gmane.comp.debugging.ddd.general
Message-ID <[email protected]>
Peter Wainwright writes:
 > On Fri, 2009-01-30 at 07:00 -0500, R. Bernstein wrote:
 > > I just discovered a bug in rc2 in trying to show/set remake options.
 > > (Also athere was small bug in remake, but that's been fixed in the git
 > > source now.)
 > > 
 > > Attached is a proposed patch which contains 3 hunks. 
 > 
 > Something strange.  When I apply this patch to rc2, the scrollbar in the
 > settings dialog disappears (and therefore only the first few settings
 > are visible).  This affects all inferior debuggers.  Can you replicate
 > this?

Yes I can. 

I don't understand why but the final "defensive measure" change seems
to have cause this. Rather than figure out why, I've removed that from
the following patch (applied off of rc2 rather than off of the last
patch).

Sorry, for the trouble. Thanks for double checking.


 > 
 > Peter
 > 
 > > 
 > > The first hunk tells ddd that multi-line remake's "set xx" output
 > > doesn't show subcommands like it does in gdb.
 > > 
 > > The second hunk silences a gcc warning about operator precedence more
 > > explicit. Not strictly needed.
 > > 
 > > The final changes are sort of a defensive measure against the kind of
 > > looping that just occurred - a limit (75) is put on the maximum number
 > > of button settings.
 > > 
 > > Andrew: if you want me to apply direcly to SVN let me know. Or
 > > modify/amend as appropriate.
 > > 
 > > _______________________________________________
 > > ddd mailing list
 > > [email protected]
 > > http://lists.gnu.org/mailman/listinfo/ddd
 >

_______________________________________________
ddd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ddd
ddd-settings-2.C.patch (application/octet-stream, 828 B)
Index: ddd/settings.C
===================================================================
--- ddd/settings.C	(revision 7173)
+++ ddd/settings.C	(working copy)
@@ -1634,7 +1634,7 @@
 		}
 
 		value = cached_gdb_question(show_command);
-		if (is_set && value.freq('\n') > 1)
+		if (is_set && value.freq('\n') > 1 && type != MAKE)
 		{
 		    // Generic command - list `set' subcommands
 		    add_settings(form, row, max_width,
@@ -2246,7 +2246,7 @@
 	// Make entry insensitive if part of initialization commands.
 	string init = app_data.gdb_init_commands;
 	int idx = init.index(set_command);
-	bool insensitive = (idx == 0 || idx > 0 && init[idx - 1] == '\n');
+	bool insensitive = (idx == 0 || (idx > 0 && init[idx - 1] == '\n'));
 
 	// Make entry insensitive if one of Perl taboos
 	if (!insensitive && gdb->type() == PERL)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.