This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Allow gdbserver to dynamically lookup libthread_db.so.1
On Monday 05 October 2009 02:49:19, Paul Pluzhnikov wrote:
> >> + ?struct process_info_private *proc = current_process()->private;
> >
> > Missing space before '()'. ?There are other instances of this.
>
> So this is supposed to be:
>
> struct process_info_private *proc = current_process ()->private;
>
> That A) looks weird
Subjective matter of taste. That's why we have code formatting
standards ;-). It's a function call. The standard
says put space there. Try grepping for "()->" in gdb's codebase.
It perhaps looks weird because it's not pretty to dereference
a pointer returned by a function. To me, it has that
but-it-could-be-NULL! feeling.
> and B) contradicts current usage (before the patch):
>
> grep current_process thread-db.c
> struct process_info_private *proc = current_process()->private;
> struct process_info_private *proc = current_process()->private;
> struct process_info_private *proc = current_process()->private;
> struct process_info *proc = current_process ();
Probably a typo followed by copy-paste, and I'm probably to blame
for those. It there are any after your patch goes in, I'll take
care of fixing them.
--
Pedro Alves