This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] New GDB target iq2000
On Sat, Mar 05, 2005 at 09:17:45PM +0100, Mark Kettenis wrote:
> Date: Sat, 5 Mar 2005 14:37:39 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> > That suggestion has been made more than once in the past; I don't
> > really consider this viable for architectures where instructions
> > aren't fixed length.
>
> Could you explain why that particular property makes a difference?
>
> Makes it difficult to ignore instructions; GDB has to know the length
> of them in order to skip them.
Trivial, even in the existing framework - ask the disassembler. A
complete GDB port may not have a simulator, let alone my hypothetical
uber-simulator, but it will definitely have a disassembler.
> > Anyway, I think most problems are caused because we are trying to use
> > the same code for two distinct cases: (a) getting an upper limit for
> > the prologue end and (b) getting a lower limit for the prologue end.
> > Combining (a) and (b) results in having to determine the end of the
> > prologue exactly, which is much harder.
>
> Just checking, but first-line breakpoints should go at the lower limit
> and scanning until the upper limit - is that right?
>
> Yup. Although the lower-limit for first-line breakpoints may cause
> bogus parameter values to be printed. I consider that less a problem
> than my program unexpectedly running to completion though. The
> problem is that some people tend to think differently and we never
> reached consensus about it.
Well, it makes sense to me. It's clear that the FRV and submitted
iq2000 ports have different heuristics for these two cases; it would be
good to cover both of them in common code.
--
Daniel Jacobowitz
CodeSourcery, LLC