This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Expand psymtabs when needed - testcase
- From: Daniel Jacobowitz <drow at false dot org>
- To: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- Cc: GDB Patches Mailing List <gdb-patches at sourceware dot org>
- Date: Sun, 16 Dec 2007 16:53:52 -0500
- Subject: Re: [patch] Expand psymtabs when needed - testcase
- References: <4755C969.6040001@linux.vnet.ibm.com>
On Tue, Dec 04, 2007 at 07:40:57PM -0200, Carlos Eduardo Seo wrote:
> Is this OK?
Almost, thanks.
> 2007-12-04 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
> Jim Blandy <jimb@codesourcery.com>
>
> * testsuite/gdb.base/expand-psymtabs.c: New testcase
> source file.
> * testsuite/gdb.base/expand-psymtabs.exp: New testcase
> expect file.
Since this goes in testsuite/ChangeLog, don't use the "testsuite/"
prefix in the entry.
> Index: src/gdb/testsuite/gdb.base/expand-psymtabs.c
> ===================================================================
> --- /dev/null
> +++ src/gdb/testsuite/gdb.base/expand-psymtabs.c
> @@ -0,0 +1,22 @@
> +#include <stdio.h>
Every new file should have a copyright notice, even in the testsuite.
Also, please avoid using I/O if you don't need it; that limits which
targets can run the test.
> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_1}" object {debug nowarnings additional_flags=-DFIRST} ] != "" } {
Why nowarnings?
> +# use this to debug:
> +log_user 1
Delete this.
> +gdb_exit
> +gdb_start
> +gdb_reinitialize_dir $srcdir/$subdir
> +gdb_load ${binfile}
> +
> +gdb_test "break 20" "Breakpoint.*" "Expand psymtabs"
Don't use hardcoded line numbers. Look for an example using
gdb_get_line_number instead to find the right line, unless there's
some reason that won't work.
--
Daniel Jacobowitz
CodeSourcery