This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: Apropos patch


Stan Shebs <shebs@apple.com> writes:

> "Daniel Berlin+list.gdb-patches" wrote:
> > 
> > It includes documentation, a test case (which uses a slightly weird
> > regexp so it only finds one thing, and we make sure it only found one
> > thing), and all the apropriate changelog entries.
> 
> You're going to hate this, but now that I see the example in the manual,
> I'm wondering why "prefix:" and "command:" are on separate lines?

No particular reason, i can make it go away if you like, it's simple.

> Why not just imitate the syntax that comes out of the help command -
> 
> 	set symbol-reloading -- <help string>
> 	show symbol-reloading -- <help string>

I thought of this, but the problem is that the help command only
displays the first line, and the match may not be there. If something
wanted to say, highlight the match, or something, it might not have
appeared in the first line, and thus, not in the output.

> 
> Another advantage is that users can then cut-n-paste from the apropos
> output more easily.

> 
> > Let me know if i can check it in, i believe it needs approval from
> > Stan Shebs, and Fernando Nasser.
> 
> Just needs approval from one of us, not both!  I must confess to being
> a bit mystified by the test though - why use "handle" as the match
> string, and do I understand right, you're requiring that it be the
> first output from apropos?

That regexp gets rid of every command with "print" in the name or doc
string, except one. Handle happened to be that one when i got done
removing commands by adding to the regexp, and i figured it should be
available on every single platform (even platforms where signals
basically were ignored when it came to gdb, like BeOS), so why not use
that?
If it come out to be some weird command, i would have changed the regex.
The [^:]+ just makes sure it doesn't catch another command.

It's kinda a crappy test, i'll revise it as soon as some consensus is
reached as to what the output should be like.

> 
> Stan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]