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] Multiple process support in gdbserver


Hi Daniel,

I'm finally looking at this very, very useful patch.

I've got a few small comments.

+      if (remote_exec_file == NULL)
+	error (_("Running the default executable on the remote target failed; "

It seems remote_exec_file can never be NULL.  Certainly you wanted to
check for empty string.

In gdbserver/linux-low.c, when you do this,

  free (all_processes.head);
  all_processes.head = all_processes.tail = NULL;

Isn't this leaking every ]all_processes.head, all_processes.tail]
if (all_processes.head != all_processes.tail) ?

shouldn't you be doing something like:

  for_each_inferiors (&all_processes, free_process);
  all_processes.head = all_processes.tail = NULL;

?

In addition to that, this almost works on Windows targets, we just
need to clean up the state when the inferiors are detached or
killed, like you're doing on linux.  If you prefer, I can post a
patch once this goes in.

--
Pedro Alves


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