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] Compute the function length instead of hard coding it


On 04/25/2014 02:33 AM, Yao Qi wrote:

> 	* gdb.dwarf2/dwz.exp: Compile main.c to object.  Restart GDB
> 	and compute the length of function main.  Save it in
> 	$main_length.
> 	(Dwarf::assemble): Use $main_length instead of hard-coded 10.
> 	(top-level): Use gdb_compile to compile objects into
> 	executable and restart GDB.  Remove invocation to
> 	prepare_for_testing.

OK, with ...

> +# Start GDB and load object file, compute the function length which is
> +# needed in the Dwarf Assembler below.
> +
> +gdb_exit
> +gdb_start
> +gdb_reinitialize_dir $srcdir/$subdir
> +gdb_load ${binfile}1.o

I think this instead should work:

 clean_restart ${testfile}1.o

-- 
Pedro Alves


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