[m-rev.] diff: fix failure of debugger/declarative/browse_arg

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Jun 7 10:44:38 AEST 2006


On Tue, Jun 06, 2006 at 06:08:56PM +1000, Julien Fischer wrote:
> 
> On Tue, 6 Jun 2006, Julien Fischer wrote:
> 
> > This has already been reviewed by Ian in person.
> >
> > Estimated hours taken: 5
> > Branches: main, release
> >
> > Fix a bug that was causing debugger/declarative/browse_arg to fail.  The
> > problem was that the default format command in the the declarative debugger
> > was setting format for the browser rather than for the print command.
> >
> > browser/browser_info.m:
> > 	If a format command with no options is issued at the dd> prompt make
> > 	sure we update the correct set of params.  The existing code was
> > 	written in such a way that it would _always_ update the params for the
> > 	browser regardless of where the format command was invoked.
> >
> > borwser/declarative_user.m:
> > 	The default format command at the dd> prompt should change the
> > 	settings for the print command, not the browser.
> >
> > browser/RESERVED_MACRO_NAMES:
> > 	s/polution/pollution/
> >
> > tests/debugger/declarative/browse_arg.exp:
> > 	Update the expected output for this test case to match the current
> > 	input.
> >
> 
> Actually, while this fixes the problem with browse_arg I don't think it's
> entirely correct.  According to the user's guide issuing the format command
> without any arguments should change the state of the three configuration
> parameters (for print *, print var and browse var).  Presumably that should be
> the case regardless of where the command is issued (at the mdb>, dd> or
> browser> prompt).
> 
> However the actual code in the debugger seems to treat things a different way.
> Furthermore the documentation in browser_info.m (which is probably out of
> date) says that if we are in the browser then the format command should only
> affect the state of those commands within the browser.
> 
> Can someone confirm that the the behaviour described in the user's guide
> (and my interpretation of it) is the intended behaviour?
> 

The various pretty printers and their format options seems to have grown
organically and without a common intended consistant behaviour. 
I'm not sure having different format options for print, print-all and
the browser makes a whole lot of sense, especially in the context of the
declarative debugger.  I'd be happy to have only one pretty printer
active at any time which applies to print, print-all and the browser.
This would make things a whole lot simpler.

Is there a problem with this?

Note that since you can now create mdb scripts there's nothing stopping
you from creating scripts to pretty print different types of objects any
way you want (that reminds me I think I still have to commit that diff -
I haven't committed it yet because of conflicts due to the
reorganisation of mercury_trace_internal.c).

Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list