This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Compute the function length instead of hard coding it
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 25 Apr 2014 11:37:45 +0100
- Subject: Re: [PATCH] Compute the function length instead of hard coding it
- Authentication-results: sourceware.org; auth=none
- References: <1398343381-24249-1-git-send-email-yao at codesourcery dot com> <535919EB dot 3050409 at redhat dot com> <5359BB87 dot 7080905 at codesourcery dot com>
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