From: Jim Blandy <jimb@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: expand-symtabs.exp
Date: Sun, 27 Jan 2008 18:08:00 -0000 [thread overview]
Message-ID: <m3ve5fb2wh.fsf@codesourcery.com> (raw)
In-Reply-To: <200801271528.m0RFSMo6032355@brahms.sibelius.xs4all.nl>
> 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 <jimb@codesourcery.com>
* 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
next parent reply other threads:[~2008-01-27 17:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200801271528.m0RFSMo6032355@brahms.sibelius.xs4all.nl>
2008-01-27 18:08 ` Jim Blandy [this message]
2008-01-27 22:27 ` expand-symtabs.exp Mark Kettenis
2008-01-28 17:19 ` expand-symtabs.exp Carlos Eduardo Seo
2008-01-28 20:00 ` expand-symtabs.exp Jim Blandy
2008-01-28 4:18 ` expand-symtabs.exp Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3ve5fb2wh.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox