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: [PATCH 2/4] de-couple %Stop from notification: gdb


On 08/25/2012 02:59 AM, dje@google.com wrote:
(struct remote_state): Move to remote.h.

What's the reason for moving struct remote_state to remote.h? [I did a simple grep and couldn't find a reason, I could have missing something of course.] Having it live in remote.c means the implementation is "private" to just that file.

I hesitated to move 'struct remote_state' out of remote.c, and agree with you we may keep it private.


The reason I move it out is remote-notif.c:remote_notif_pending_replies uses 'remote_state' in this way,

void
remote_notif_pending_replies (struct notif *np)
{
  struct remote_state *rs = get_remote_state ();
....
....
	  getpkt (&rs->buf, &rs->buf_size, 0);


If we really don't want to expose 'struct remote_state', we can keep it living in remote.c, and move function remote_notif_pending_replies to remote.c accordingly.


--
Yao


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