Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: expand-symtabs.exp
       [not found] <200801271528.m0RFSMo6032355@brahms.sibelius.xs4all.nl>
@ 2008-01-27 18:08 ` Jim Blandy
  2008-01-27 22:27   ` expand-symtabs.exp Mark Kettenis
  2008-01-28  4:18   ` expand-symtabs.exp Jim Blandy
  0 siblings, 2 replies; 5+ messages in thread
From: Jim Blandy @ 2008-01-27 18:08 UTC (permalink / raw)
  To: gdb-patches


> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: expand-symtabs.exp
  2008-01-27 18:08 ` expand-symtabs.exp Jim Blandy
@ 2008-01-27 22:27   ` 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
  1 sibling, 2 replies; 5+ messages in thread
From: Mark Kettenis @ 2008-01-27 22:27 UTC (permalink / raw)
  To: jimb; +Cc: gdb-patches

> From: Jim Blandy <jimb@codesourcery.com>
> Date: Sun, 27 Jan 2008 09:21:18 -0800
> 
> > 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.

Ah thank Jim.  That helps a lot.  So I assume Daniels suggestion of
giving the function a real body won't defeat the purpose of the test.
I'll see if I can come up with something that works with GCC 3.3.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: expand-symtabs.exp
  2008-01-27 18:08 ` expand-symtabs.exp Jim Blandy
  2008-01-27 22:27   ` expand-symtabs.exp Mark Kettenis
@ 2008-01-28  4:18   ` Jim Blandy
  1 sibling, 0 replies; 5+ messages in thread
From: Jim Blandy @ 2008-01-28  4:18 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

"Dependings"?

gdb/testsuite/ChangeLog:
2008-01-27  Jim Blandy  <jimb@codesourcery.com>

	* gdb.base/expand-psymtabs.exp: Doc fix to the doc fix.

Index: gdb/testsuite/gdb.base/expand-psymtabs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/expand-psymtabs.exp,v
retrieving revision 1.3
diff -u -r1.3 expand-psymtabs.exp
--- gdb/testsuite/gdb.base/expand-psymtabs.exp	27 Jan 2008 17:19:06 -0000	1.3
+++ gdb/testsuite/gdb.base/expand-psymtabs.exp	27 Jan 2008 22:24:19 -0000
@@ -26,7 +26,7 @@
 # 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
+# number, which full symtab we need depends on the line number in
 # question.
 #
 # This test is meant to verify that, even with lazy partial symtab


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: expand-symtabs.exp
  2008-01-27 22:27   ` expand-symtabs.exp Mark Kettenis
@ 2008-01-28 17:19     ` Carlos Eduardo Seo
  2008-01-28 20:00     ` expand-symtabs.exp Jim Blandy
  1 sibling, 0 replies; 5+ messages in thread
From: Carlos Eduardo Seo @ 2008-01-28 17:19 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: jimb, gdb-patches



Mark Kettenis wrote:
> So I assume Daniels suggestion of giving the function a real body won't defeat the purpose of the test.


I guess not. IMHO, Daniel's patch is OK.


-- 
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: expand-symtabs.exp
  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     ` Jim Blandy
  1 sibling, 0 replies; 5+ messages in thread
From: Jim Blandy @ 2008-01-28 20:00 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: jimb, gdb-patches

On Jan 27, 2008 1:28 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> Ah thank Jim.  That helps a lot.  So I assume Daniels suggestion of
> giving the function a real body won't defeat the purpose of the test.

I don't see why it would.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-28 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200801271528.m0RFSMo6032355@brahms.sibelius.xs4all.nl>
2008-01-27 18:08 ` expand-symtabs.exp Jim Blandy
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox