From: Daniel Jacobowitz <drow@false.org>
To: Orjan Friberg <orjan.friberg@axis.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [gdbserver/rfa] CRIS/CRISv32 gdbserver support (part 2)
Date: Thu, 24 Feb 2005 20:57:00 -0000 [thread overview]
Message-ID: <20050224204906.GC11751@nevyn.them.org> (raw)
In-Reply-To: <41FF9274.7030700@axis.com>
On Tue, Feb 01, 2005 at 03:30:12PM +0100, Orjan Friberg wrote:
> For CRISv32, there might be an additional problem lurking in the shadows:
> we treat the watchpoint registers as global (i.e., only one process at a
> time can use them, and thus they are not saved/restored on context switches
> etc).
As I wrote in my other message, that's a pretty serious bug.
> Anyway, is this something you want resolved before I commit the
> CRIS/CRISv32 support? (Here's an updated ChangeLog entry and updated
> patches if not.)
Let's go ahead. The patch is mostly OK, but I have a last question or
two...
> 2005-02-01 Orjan Friberg <orjanf@axis.com>
>
> * linux-cris-low.c: New file with support for CRIS.
> * linux-crisv32-low.c: Ditto for CRISv32.
> * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
> (clean): Add reg-cris.c and reg-crisv32.c.
> Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
> reg-crisv32.o, and reg-crisv32.c to make rules.
> * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
> recognized targets.
>
> --
> Orjan Friberg
> Axis Communications
>
> static const unsigned long cris_breakpoint = 0xe938;
> #define cris_breakpoint_len 2
>
> static int
> cris_breakpoint_at (CORE_ADDR where)
> {
> unsigned long insn;
>
> (*the_target->read_memory) (where, (char *) &insn, 4);
> if (insn == cris_breakpoint)
> return 1;
>
> /* If necessary, recognize more trap instructions here. GDB only uses the
> one. */
> return 0;
> }
If the breakpoint length is two, why are you reading and testing four
bytes?
> void
> cris_write_data_breakpoint (int bp, unsigned long start, unsigned long end)
Please make new functions static where possible, which is pretty much
everywhere.
> int
> cris_stopped_by_watchpoint ()
And use prototypes - that's not a prototype, because of the missing
(void).
> struct regset_info target_regsets[] = {
> { PTRACE_GETREGS, PTRACE_SETREGS, sizeof (elf_gregset_t),
> GENERAL_REGS, cris_fill_gregset, cris_store_gregset },
> { 0, 0, -1, -1, NULL, NULL }
> };
Does the regset cover everything that that regmap covers, including
debug registers? The current support for both PEEKUSER and regsets is
purely for compatibility; it doesn't support getting some registers
from one and some from another. So if all crisv32 kernels support
PTRACE_GETREGS, your regmap is never getting used.
I have code around here somewhere to support targets that need both,
but it's gross.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-02-24 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-14 9:54 Orjan Friberg
2005-01-30 4:54 ` Daniel Jacobowitz
2005-02-01 14:31 ` Orjan Friberg
2005-02-14 16:17 ` Orjan Friberg
2005-02-24 20:57 ` Daniel Jacobowitz [this message]
2005-05-12 13:03 ` Orjan Friberg
2005-05-12 13:11 ` Orjan Friberg
2005-05-12 13:21 ` Daniel Jacobowitz
2005-05-12 13:13 ` Daniel Jacobowitz
2005-05-12 14:59 ` Orjan Friberg
2005-05-18 1:55 ` Daniel Jacobowitz
2005-05-23 12:35 ` Orjan Friberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050224204906.GC11751@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=orjan.friberg@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox