From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3036 invoked by alias); 27 Jan 2008 17:22:01 -0000 Received: (qmail 3026 invoked by uid 22791); 27 Jan 2008 17:22:00 -0000 X-Spam-Check-By: sourceware.org Received: from dm-mail01.mozilla.org (HELO dm-mail01.mozilla.org) (63.245.208.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 27 Jan 2008 17:21:21 +0000 Received: from mozilla.com (c-76-27-210-184.hsd1.or.comcast.net [76.27.210.184]) (Authenticated sender: jblandy@mozilla.com) by dm-mail01.mozilla.org (Postfix) with ESMTP id E35546A99D6; Sun, 27 Jan 2008 09:21:17 -0800 (PST) To: gdb-patches@sourceware.org Subject: Re: expand-symtabs.exp References: <200801271528.m0RFSMo6032355@brahms.sibelius.xs4all.nl> From: Jim Blandy Date: Sun, 27 Jan 2008 18:08:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-01/txt/msg00634.txt.bz2 > Carlos, Jim, what is this test supposed to check? It makes absolutely > no sense to me. I've committed the patch below, which hopefully provides more detail. Ideally, the test would actually run GDB twice, setting a breakpoint in foo the first time and in main the second, to avoid being sensitive to the order in which GDB sees the partial symtabs. gdb/testsuite/ChangeLog: 2008-01-27 Jim Blandy * gdb.base/expand-psymtabs.exp: Doc fix. diff -r 37542ef56b07 gdb/testsuite/gdb.base/expand-psymtabs.exp --- a/gdb/testsuite/gdb.base/expand-psymtabs.exp Sun Jan 27 09:17:01 2008 -0800 +++ b/gdb/testsuite/gdb.base/expand-psymtabs.exp Sun Jan 27 09:18:18 2008 -0800 @@ -20,7 +20,18 @@ if $tracelevel then { strace $tracelevel } -# Test expanding partial symtabs when needed. +# It's possible to have a program that contains two compilation units +# for the same source file name, that have code at different lines. +# For example, in this test, we compile expand-psymtabs.c twice with +# different preprocessor symbols #defined; the first .o only has +# 'main' at some earlier source lines, while the second .o only has +# 'foo' at later source lines. So when setting breakpoints by line +# number, which full symtab we need dependings on the line number in +# question. +# +# This test is meant to verify that, even with lazy partial symtab +# reading in effect, GDB can set breakpoints by line number +# successfully in either compilation unit. set testfile expand-psymtabs set srcfile ${testfile}.c