From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23645 invoked by alias); 5 Oct 2009 03:03:40 -0000 Received: (qmail 23375 invoked by uid 22791); 5 Oct 2009 03:03:39 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Oct 2009 03:03:34 +0000 Received: (qmail 18444 invoked from network); 5 Oct 2009 03:03:33 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Oct 2009 03:03:33 -0000 From: Pedro Alves To: Paul Pluzhnikov Subject: Re: [patch] Allow gdbserver to dynamically lookup libthread_db.so.1 Date: Mon, 05 Oct 2009 03:03:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org, dje@google.com References: <20090902163344.833F476568@localhost> <200910042132.23246.pedro@codesourcery.com> <8ac60eac0910041849q5e95466br6190a355f8192eeb@mail.gmail.com> In-Reply-To: <8ac60eac0910041849q5e95466br6190a355f8192eeb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910050403.28304.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00105.txt.bz2 On Monday 05 October 2009 02:49:19, Paul Pluzhnikov wrote: > >> + =A0struct process_info_private *proc =3D current_process()->private; > > > > Missing space before '()'. =A0There are other instances of this. >=20 > So this is supposed to be: >=20 > struct process_info_private *proc =3D current_process ()->private; >=20 > That A) looks weird=20 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):=20 >=20 > grep current_process thread-db.c > struct process_info_private *proc =3D current_process()->private; > struct process_info_private *proc =3D current_process()->private; > struct process_info_private *proc =3D current_process()->private; > struct process_info *proc =3D 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. --=20 Pedro Alves