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: [RFC] Add login to remote protocol


> Date: Fri, 09 Apr 2010 15:27:45 -0700
> From: Stan Shebs <stan@codesourcery.com>
> 
> + @item set remote username @var{username}
> + @itemx show remote username
> + Set the username to be sent to targets that require a login.  The
> + username is an arbitary string.
> + 
> + @item set remote password @var{password}
> + @itemx show remote password
> + Set the password to be sent to targets that require a login.  The
> + password is an arbitary string. At present it is stored as cleartext.
> + 

Two comments:

  . This needs @cindex entries for "remote username" and "remote
    password".

  . Wouldn't it be better to have just one command for both?

A related question: once a non-empty password was specified, how to
reset it back to empty?

> +           If the target requires a login (@samp{MustAuth} feature),
> + then if this packet is not supplied soon after connection, then the
> + target may choose to return errors to all subsequent packets and/or
> + disconnect.

Too many "then"s.  I would simply remove the second one.

> + @value{GDBN} must send an authorization packet @samp{qAuth} and the
> + username/password pair must be accepted, otherwise the target will
> + return an error and refuse to continue with the session.      ^^^^

Probably "may" instead of "will" is more appropriate, since we don't
actually know what the target does without the credentials.

> +   remote_username = xstrdup ("");
> +   add_setshow_string_noescape_cmd ("username", class_files,
> + 				   &remote_username, _("\
> + Set the remote username"), _("\
> + Show the remote username"), NULL, NULL, NULL,
> + 				   &remote_set_cmdlist, &remote_show_cmdlist);
> + 
> +   remote_password = xstrdup ("");
> +   add_setshow_string_noescape_cmd ("password", class_files,
> + 				   &remote_password, _("\
> + Set the remote password"), _("\
> + Show the remote password"), NULL, NULL, NULL,
> + 				   &remote_set_cmdlist, &remote_show_cmdlist);
> + 

Please consider adding some explanatory text to the doc strings.

Also, we will need a NEWS entry for this new feature.


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