This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Correct gdbserver register packets
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 1 Dec 2002 20:15:00 -0500
- Subject: Re: [RFC] Correct gdbserver register packets
- References: <5.0.2.1.2.20021126162728.02a31e50@ics.u-strasbg.fr>
On Tue, Nov 26, 2002 at 06:27:36PM +0100, Pierre Muller wrote:
> Currently the cvs sources of gdbserver
> for m68k linux have a problem.
>
> The problem comes from the fact that the
> register packet is build from the data in regformats
> directory. But the m68k cpu file contains two
> registers that are apparently not accessible
> (or at least not fetched by current gdb).
>
> This causes connection to remote server to
> stay stucked affect
> that warning.
> reading register 29: Input/output error
>
> My patch is a liitle bit more genral because I
> read that there are similar problems for other configuration.
>
> The main idea is to add a new function
> int
> register_present( int regno)
>
> that by default allways returns one but
> that can be implmented by the target that do
> no supply all the regsiters
> that are in the regformats dir.
>
> The final patches can be separated probably, but I would first like to
> get comments on the general direction.
I don't think there's a point yet. Eventually, once we have a way to
express it properly in the remote protocol, we can handle returning
not-available for registers. For now all we should need is:
> ChangeLog entry
>
> 2002-11-26 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * linux-m68k-low.c (m68k_regmap): Add missing -1.
> Index: linux-m68k-low.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbserver/linux-m68k-low.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 linux-m68k-low.c
> --- linux-m68k-low.c 9 Apr 2002 22:44:43 -0000 1.3
> +++ linux-m68k-low.c 26 Nov 2002 15:26:47 -0000
> @@ -45,24 +45,36 @@ static int m68k_regmap[] =
> #ifdef PT_FP0
> PT_FP0 * 4, PT_FP1 * 4, PT_FP2 * 4, PT_FP3 * 4,
> PT_FP4 * 4, PT_FP5 * 4, PT_FP6 * 4, PT_FP7 * 4,
> - PT_FPCR * 4, PT_FPSR * 4, PT_FPIAR * 4
> + PT_FPCR * 4, PT_FPSR * 4, PT_FPIAR * 4,
> #else
> 21 * 4, 24 * 4, 27 * 4, 30 * 4, 33 * 4, 36 * 4,
> - 39 * 4, 42 * 4, 45 * 4, 46 * 4, 47 * 4
> + 39 * 4, 42 * 4, 45 * 4, 46 * 4, 47 * 4,
> #endif
> + -1, -1
> };
>
Or else Andreas's patch to decrease the number of registers. Hmm,
probably doing it Andreas's way is better. I'll take care of this in
the morning.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer