This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [python][patch] Add GDB Parameters functionality


On 04/27/2010 06:44 PM, Eli Zaretskii wrote:
 
>> +@item PARAM_STRING
>> +The value is a string.  When the user modifies the string, any escapes
>> +sequences are translated and encoded by @value{GDBN}.
> 
> I asked to say something about this translation, or provide an
> example.

I'm just not sure what to say other than GDB will translate and encode
any escape sequences in the string.  In fact, 'encoded' will probably
just do here without the 'translated' verb - it seems redundant with
the new encoded text. I think that is clearer. How about that with a
cross-reference to encoding (pxref{Character Sets})?

>> +@item PARAM_FILENAME
>> +The value is a filename (a string).  This value is has to be a valid
>> +filename.                                       ^^
> 
> The "is" part is probably redundant.  Also, what does it mean "a valid
> filename"?  Does it have to exist, for example?  If not, what makes a
> file name "invalid"?

I looked a little deeper at this.  There is no validation (I was
initially wrong, apologies). Furthermore, it does not have to be a
valid filename at all -- just a string.  Validation is presumably
offloaded to the Parameter to check.   Anyway, it is a simple
string.  The classification of Parameter type in these cases is purely
to do with how completion works -- if the user chooses to  use
completion.  So 'set foo somefil<tab>' will complete looking for
filenames:

Eg:

(gdb) set logging file ~/log<TAB>
log.txt   log2.txt

Whereas for a Parameter with the type PARAM_BOOLEAN (like set verbose)
it would complete like so:

(gdb) set verbose o<TAB>
off  on  

Now that being said, I'm a little stumped how to explain all of this
within the context of these parameter types.  Do you have any input
here?

Cheers

Phil


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