This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Expand psymtabs when needed - testcase


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]