From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15544 invoked by alias); 10 Nov 2011 08:05:56 -0000 Received: (qmail 15535 invoked by uid 22791); 10 Nov 2011 08:05:55 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 08:05:40 +0000 Received: by qadc11 with SMTP id c11so2654722qad.0 for ; Thu, 10 Nov 2011 00:05:40 -0800 (PST) Received: by 10.224.215.73 with SMTP id hd9mr4800269qab.94.1320908916150; Wed, 09 Nov 2011 23:08:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.215.73 with SMTP id hd9mr4800264qab.94.1320908916067; Wed, 09 Nov 2011 23:08:36 -0800 (PST) Received: by 10.224.6.76 with HTTP; Wed, 9 Nov 2011 23:08:36 -0800 (PST) In-Reply-To: <20111028020913.GA4765@host1.jankratochvil.net> References: <20111027215551.97B0C246191@ruffy.mtv.corp.google.com> <20111028020913.GA4765@host1.jankratochvil.net> Date: Thu, 10 Nov 2011 08:05:00 -0000 Message-ID: Subject: Re: [patch] document that check_typedef can throw an exception From: Doug Evans To: Jan Kratochvil Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2011-11/txt/msg00268.txt.bz2 On Thu, Oct 27, 2011 at 7:09 PM, Jan Kratochvil wrote: > On Thu, 27 Oct 2011 23:55:51 +0200, Doug Evans wrote: > [...] >> =A0 =A0 =A0 * gdbtypes.c (check_typedef): Document that this function can >> =A0 =A0 =A0 throw an exception. > [...] >> + =A0 NOTE: Lookup of types for opaque types can throw some errors during >> + =A0 invalid symbol files. =A0Thus this function can throw an exception. > > Always by expanding opaque types: > > Either lookup_symbol_aux_quick: > =A0 =A0 =A0 =A0error (_("\ > =A0 =A0 =A0 =A0Internal: %s symbol `%s' found in %s psymtab but not in sy= mtab.\n\ > which is not completely correct but it was commonly happenning and it sti= ll > may happen. > > Or just RETURN_QUIT from new CUs being expanded > ...->dwarf2_compute_name->c_print_type->... (there some QUIT; statements). I committed this. 2011-11-09 Doug Evans * gdbtypes.c (check_typedef): Document that this function can throw an exception. Index: gdbtypes.c =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 RCS file: /cvs/src/src/gdb/gdbtypes.c,v retrieving revision 1.220 diff -u -p -r1.220 gdbtypes.c --- gdbtypes.c 14 Oct 2011 20:22:17 -0000 1.220 +++ gdbtypes.c 10 Nov 2011 06:53:09 -0000 @@ -1454,6 +1454,10 @@ stub_noname_complaint (void) not been computed and we're either in the middle of reading symbols, or there was no name for the typedef in the debug info. + NOTE: Lookup of opaque types can throw errors for invalid symbol files. + QUITs in the symbol reading code can also throw. + Thus this function can throw an exception. + If TYPE is a TYPE_CODE_TYPEDEF, its length is updated to the length of the target type.