This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/6] Get start and end address of main in dwz.exp
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 4 Nov 2014 14:51:12 -0800
- Subject: Re: [PATCH 3/6] Get start and end address of main in dwz.exp
- Authentication-results: sourceware.org; auth=none
- References: <1414195968-3333-1-git-send-email-yao at codesourcery dot com> <1414195968-3333-4-git-send-email-yao at codesourcery dot com>
Yao Qi writes:
> On arm-none-eabi target thumb mode, I see the following fail,
>
> p the_int^M
> $2 = 99^M
> (gdb) FAIL: gdb.dwarf2/dwz.exp: p the_int
>
> and on powerpc64 target, we even can't get function main from object
> file,
>
> disassemble main^M
> No function contains specified address.^M
> (gdb) FAIL: gdb.dwarf2/dwz.exp: disassemble main
>
> This patch is to use MACRO_AT_func attribute to get the main's start
> address and end address correctly, and also remove some code dwz.exp
> getting main's length. This patch fixes fails on both thumb mode and
> powerpc64 target.
>
> PASS: gdb.dwarf2/dwz.exp: p other_int
> PASS: gdb.dwarf2/dwz.exp: p the_int
>
> gdb/testsuite:
>
> 2014-10-24 Yao Qi <yao@codesourcery.com>
>
> * gdb.dwarf2/dwz.exp: Remove the code to compile main.c to
> object and get function length.
> (Dwarf::assemble): Replace name, low_pc and high_pc attributes
> with MACRO_AT_func.
> (top-level): Replace gdb_compile and clean_restart with
> prepare_for_testing.
> * gdb.dwarf2/main.c (main): Add label main_label.
LGTM