This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] MIPS/GDB: Fix the handling of MIPS16 thunks
- From: Pedro Alves <palves at redhat dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Fri, 20 Apr 2012 15:15:58 +0100
- Subject: Re: [RFA] MIPS/GDB: Fix the handling of MIPS16 thunks
- References: <alpine.DEB.1.10.1204052320140.19835@tp.orcam.me.uk>
Hi Maciej,
Some minor issues I noticed while browsing the patch.
On 04/10/2012 11:20 PM, Maciej W. Rozycki wrote:
> + /* macro/2005-03-31: This hack skips over MIPS16 call thunks as
Eh, that long? Might want to update that date to the check in date,
or drop it. Otherwise it's just useless, IMO.
> +
> +static int mips_is_stub_suffix (const char *suffix, int zero)
Function name at column 0.
> +
> +static int mips_is_stub_mode (const char *mode)
> +{
Ditto.
> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.arch/mips16-thunks-sin.c
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.arch/mips16-thunks-sin.c 2012-04-05 21:42:24.995424172 +0100
> @@ -0,0 +1,38 @@
> +#include <math.h>
> +
I've noticed the tests miss copyright headers.
> +gdb_breakpoint inmain
> +gdb_run_cmd
> +gdb_expect 30 {
> + -re "Breakpoint 1.*inmain .*$gdb_prompt $" {
> + send_gdb "finish\n"
> + gdb_expect {
> + -re "Value returned is \\\$\[0-9\]+ = 0\[^0-9\].*$gdb_prompt $" {
Can we use gdb_test_multiple (catching internal errors etc., and dropping
the default cases) ? (other instances)
> +# Single-step through the function that is at the head of function list
> +# FUNCS until a different function (frame) is reached. Before each step
> +# check the backtrace against FUNCS. ID is used for reporting, to tell
> +# apart different calls to this procedure for the same function. If
> +# successful, then return the name of the function we have stopped in.
> +proc step_through { id funcs } {
Not sure it'd be useful here, but note the new with_test_prefix routine,
which we now use as a convenient way to make sure there are no
duplicate messages in gdb.sum (, as in
<http://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_messages_are_unique>).
--
Pedro Alves