From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18818 invoked by alias); 30 Oct 2002 19:59:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18778 invoked from network); 30 Oct 2002 19:59:50 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 30 Oct 2002 19:59:50 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id OAA18765; Wed, 30 Oct 2002 14:57:33 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id OAA15725; Wed, 30 Oct 2002 14:48:55 -0500 Message-ID: <129401c2804e$e25e9910$d8020c0a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" Cc: References: <120101c28037$3ddb3d10$d8020c0a@catdog> <20021030172051.GA27733@nevyn.them.org> <121101c2803a$005145e0$d8020c0a@catdog> <20021030173438.GA8741@nevyn.them.org> <122501c2803c$2e278450$d8020c0a@catdog> <123101c28044$f5386340$d8020c0a@catdog> <20021030190128.GA21129@nevyn.them.org> <128701c28049$34decda0$d8020c0a@catdog> <20021030192736.GA24291@nevyn.them.org> Subject: Re: gnu-v3-abi.c: problems w/ virtual base class Date: Wed, 30 Oct 2002 11:59:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_1291_01C28024.F977A120" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2002-10/txt/msg00215.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_1291_01C28024.F977A120 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-length: 377 > The way this works is: > - We only care if the symbol starts with _Z. Do it in the same > place we check for _Z now, instead of the switch_to_cp_abi call. > > - You just want to call cplus_demangle; be sure to free the result > if it returns non-NULL. > Diff attached. Seems to work quite nicely. Thank you very much. As always, you are most helpful. cheers, Kris ------=_NextPart_000_1291_01C28024.F977A120 Content-Type: application/octet-stream; name="minsym.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="minsym.diff" Content-length: 3074 Index: minsyms.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /product/tools/gdb/gdb/minsyms.c,v=0A= retrieving revision 1.2=0A= diff -c -r1.2 minsyms.c=0A= *** minsyms.c 6 Sep 2002 20:20:43 -0000 1.2=0A= --- minsyms.c 30 Oct 2002 19:52:08 -0000=0A= ***************=0A= *** 952,958 ****=0A= =20=20=0A= /* Try to guess the appropriate C++ ABI by looking at the names=20= =0A= of the minimal symbols in the table. */=0A= ! {=0A= int i;=0A= =20=20=0A= for (i =3D 0; i < mcount; i++)=0A= --- 952,958 ----=0A= =20=20=0A= /* Try to guess the appropriate C++ ABI by looking at the names=20= =0A= of the minimal symbols in the table. */=0A= ! if (!current_cp_abi_equals("gnu-v3")) {=0A= int i;=0A= =20=20=0A= for (i =3D 0; i < mcount; i++)=0A= ***************=0A= *** 960,967 ****=0A= const char *name =3D SYMBOL_NAME (&objfile->msymbols[i]);=0A= if (name[0] =3D=3D '_' && name[1] =3D=3D 'Z')=0A= {=0A= ! switch_to_cp_abi ("gnu-v3");=0A= ! break;=0A= }=0A= }=0A= }=0A= --- 960,971 ----=0A= const char *name =3D SYMBOL_NAME (&objfile->msymbols[i]);=0A= if (name[0] =3D=3D '_' && name[1] =3D=3D 'Z')=0A= {=0A= ! char *demangled;=0A= ! if((demangled =3D cplus_demangle(name, GNU_V3_DEMANGLING)) !=3D NULL){= =0A= ! free(demangled);=0A= ! switch_to_cp_abi ("gnu-v3");=0A= ! break;=0A= ! }=0A= }=0A= }=0A= }=0A= Index: cp-abi.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /product/tools/gdb/gdb/cp-abi.c,v=0A= retrieving revision 1.2=0A= diff -c -r1.2 cp-abi.c=0A= *** cp-abi.c 6 Sep 2002 20:20:42 -0000 1.2=0A= --- cp-abi.c 30 Oct 2002 19:52:08 -0000=0A= ***************=0A= *** 107,109 ****=0A= --- 107,115 ----=0A= return 1;=0A= }=0A= =20=20=0A= + int=0A= + current_cp_abi_equals (const char *short_name)=0A= + {=0A= + return strcmp(current_cp_abi.shortname, short_name) =3D=3D 0;=0A= + }=0A= +=20=0A= Index: cp-abi.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /product/tools/gdb/gdb/cp-abi.h,v=0A= retrieving revision 1.2=0A= diff -c -r1.2 cp-abi.h=0A= *** cp-abi.h 6 Sep 2002 20:20:42 -0000 1.2=0A= --- cp-abi.h 30 Oct 2002 19:52:08 -0000=0A= ***************=0A= *** 168,173 ****=0A= --- 168,174 ----=0A= extern struct cp_abi_ops current_cp_abi;=0A= extern int register_cp_abi (struct cp_abi_ops abi);=0A= extern int switch_to_cp_abi (const char *short_name);=0A= + extern int current_cp_abi_equals (const char *short_name);=0A= =20=20=0A= #endif=0A= =20=20=0A= ------=_NextPart_000_1291_01C28024.F977A120--