This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Fix gdb.base/remote for embedded targets (HC11)
- To: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Subject: Re: [RFA]: Fix gdb.base/remote for embedded targets (HC11)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 06 Jun 2001 10:46:43 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3B07AFCF.211DC3BF@worldnet.fr>
> Hi!
>
> The gdb.base/remote test fails for 68HC11/68HC12:
>
> - The gdb.base/remote.c defines a data table that is too large to link for
> 68HC11 targets (it requires 48K of data).
>
> - For HC11/HC12, the data section is installed by the crt0. The data section
> has its image in ROM and it is copied to RAM by the startup code. With a
> 48K data table, it requires 96K of memory (48K rom, 48K ram).
>
> After the load, the data table is not initialized. It is initialized when
> we reached the 'main'.
>
> The following patch improves the gdb.base/remote test:
>
> - The remote.c data table is reduced to 1K for 68HC11 (only), and the
> test verifies only the 1K load for 68HC11 (other platforms still use 48K).
>
> - It checks for a new 'gdb,noloaddata' configuration variable and
> runs to the main before verifying the load.
>
> Can you approve this patch?
>
> Thanks,
> Stephane
>
> 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
>
> * gdb.base/remote.c (RANDOM_DATA_SIZE): New define, defaults to 48K
> and defined to 1K for m68hc11.
> (random_data): Reduce table to 1K for embedded platforms (68hc11).
> * gdb.base/remote.exp (remote_data_size): New variable to tell the size
> of the data table; don't test past this size; check for gdb,noloaddata
> and run to the main if it is set (data section installed by crt0).
This problem definitly needs to be fixed. remote.c is currently very
16bit unfriendly. A few thoughts - can your change be simplified slightly:
o
Always run-to-main?
I don't think it would do any
harm to always do this
o
can GDB extract the array size from the target?
See sizeof.exp:get_sizeof()
o
as for remote.c:RANDOM_DATA_SIZE
I can't think of another way of
doing this. Anyone?
Andrew