From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12012 invoked by alias); 7 Jan 2003 13:59:17 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12004 invoked from network); 7 Jan 2003 13:59:16 -0000 Received: from unknown (63.119.183.65) by 209.249.29.67 with QMTP; 7 Jan 2003 13:59:16 -0000 Received: (qmail 24171 invoked from network); 7 Jan 2003 13:57:32 -0000 Received: from unknown (HELO exchange1.urp.doc.com) (192.168.8.5) by external1 with SMTP; 7 Jan 2003 13:57:32 -0000 X-MIMEOLE: Produced By Microsoft Exchange V6.0.5762.3 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [RFA] Add ObjC recognition to linespec.c [5/5] Date: Tue, 07 Jan 2003 13:59:00 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Adam Fedor" To: "Michael Snyder" Cc: "GDB Patches" X-SW-Source: 2003-01/txt/msg00272.txt.bz2 > -----Original Message----- > From: Michael Snyder [mailto:msnyder@redhat.com] > Sent: Monday, January 06, 2003 3:32 PM > To: Adam Fedor > Cc: GDB Patches > Subject: Re: [RFA] Add ObjC recognition to linespec.c [5/5] >=20 > > >>+ > > >>+ /* Is it an Objective-C selector? */ > > >>+ > > >>+ { > > >>+ struct symtabs_and_lines values; > > >>+ values =3D decode_objc (argptr, funfirstline, NULL, > > >>+ canonical, saved_arg); > > >>+ if (values.sals !=3D NULL) > > >>+ return values; > > >>+ } > > > > > > > > > Was this meant to be an if? It seems to be a naked block. > > > I'd feel better if there was an if around it, eg. is there > > > a simple way to test for a selector name? Do I remember > > > that they begin with a unique prefix such as '@'? > > > > > > > >=20 > > No. Because the user can do things like 'break init' or 'break > > isAnImage', and this will determine that these are really=20 > Objective-C > > methods and not regular C functions. It's really just a way=20 > to keep the > > variable local to where it is really used. >=20 > OK, so if there is a C function init and an objc selector init, > how do we resolve the conflict? Which one wins? In other words, > will this un-protected code (not inside an if) ever obscure a > C function when it shouldn't? >=20 You get presented with a choice: (gdb) break init [0] cancel [1] all [2] -[MyObject init] at testit.m:27 [3] -[NewObject init] at testit.m:13 [4] init at testit.m:33 > So you can choose which init you want.