From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10004 invoked by alias); 22 Jul 2012 19:33:09 -0000 Received: (qmail 9996 invoked by uid 22791); 22 Jul 2012 19:33:08 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Jul 2012 19:32:55 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3WgGFd4rJLz4KK6K; Sun, 22 Jul 2012 21:32:53 +0200 (CEST) X-Auth-Info: iMKHBssZbsotIquGcxpXFRa7aqJjAsjkftxrnrBgJiU= Received: from igel.home (ppp-93-104-154-252.dynamic.mnet-online.de [93.104.154.252]) by mail.mnet-online.de (Postfix) with ESMTPA id 3WgGFd1zPlzbbts; Sun, 22 Jul 2012 21:32:53 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 89133CA2A4; Sun, 22 Jul 2012 21:32:52 +0200 (CEST) From: Andreas Schwab To: Keith Seitz Cc: Tom Tromey , "gdb-patches\@sourceware.org ml" Subject: Re: [RFA 1/2] Linespec rewrite (update 2) References: <4F70F8F7.503@redhat.com> <87zkb0wj1x.fsf@fleche.redhat.com> <4F74B583.6090008@redhat.com> <87obrertls.fsf@fleche.redhat.com> <4F75D859.1010907@redhat.com> <87r4waqc38.fsf@fleche.redhat.com> <20120330170913.GT2701@adacore.com> <87fwcqq8gl.fsf@fleche.redhat.com> <4F75F5F5.8070105@redhat.com> <4F7B8610.9070302@redhat.com> X-Yow: --Hello, POLICE? I"ve got ABBOTT & COSTELLO here on suspicion of HIGHWAY ROBBERY!! Date: Sun, 22 Jul 2012 19:33:00 -0000 In-Reply-To: <4F7B8610.9070302@redhat.com> (Keith Seitz's message of "Tue, 03 Apr 2012 16:21:52 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-07/txt/msg00434.txt.bz2 Keith Seitz writes: > + for (i = 0; VEC_iterate (symbolp, ls->labels.label_symbols, i, sym); ++i) > + { > + symbol_to_sal (&sal, state->funfirstline, sym); > + add_sal_to_sals (state, &sals, &sal, > + SYMBOL_NATURAL_NAME (sym)); If symbol_to_sal returns 0 then sal is uninitialized. > + } > + } > + else if (ls->function_symbols != NULL || ls->minimal_symbols != NULL) > + { > + /* We have just a bunch of functions and/or methods. */ > + int i; > + struct symtab_and_line sal; > + struct symbol *sym; > + minsym_and_objfile_d *elem; > + struct program_space *pspace; > + > + if (ls->function_symbols != NULL) > + { > + /* Sort symbols so that symbols with the same program space are next > + to each other. */ > + qsort (VEC_address (symbolp, ls->function_symbols), > + VEC_length (symbolp, ls->function_symbols), > + sizeof (symbolp), compare_symbols); > + > + for (i = 0; VEC_iterate (symbolp, ls->function_symbols, i, sym); ++i) > + { > + pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym)); > + set_current_program_space (pspace); > + symbol_to_sal (&sal, state->funfirstline, sym); > + if (maybe_add_address (state->addr_set, pspace, sal.pc)) > + add_sal_to_sals (state, &sals, &sal, SYMBOL_NATURAL_NAME (sym)); Likewise. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."