Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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: Sun, 30 Jan 2005 04:54:00 -0000	[thread overview]
Message-ID: <20050130045359.GC25185@nevyn.them.org> (raw)
In-Reply-To: <41E7969F.3010009@axis.com>

On Fri, Jan 14, 2005 at 10:53:35AM +0100, Orjan Friberg wrote:
> As promised, here is part 2 which contains the actual gdbserver code for 
> CRIS/CRISv32.
> 
> Ok to commit?
> 
> 
> 2005-01-15  Orjan Friberg  <orjanf@axis.com>
> 
> 	* linux-cris-low.c: New file with support for CRIS and CRISv32 
> 	targets.
> 	* Makefile.in (SFILES): Add linux-cris-low.c.
> 	(clean): Add reg-cris-c and reg-crisv32.c.
> 	Add linux-cris-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.

A couple of comments:

- cris and crisv32 appear to have, from point of view of gdbserver, not
much more in common than cris and mips.  How about having
linux-crisv32-low.c instead?  There can be additional file for common
code if it becomes necessary in the future.

> /* We only place breakpoints in empty marker functions, and thread locking
>    is outside of the function.  So rather than importing software 
>    single-step,
>    we can just run until exit.  */
> static CORE_ADDR
> cris_reinsert_addr ()
> {
>   unsigned long pc;
>   collect_register_by_name ("srp", &pc);
>   return pc;
> }

I gather that you don't have PTRACE_SINGLESTEP on cris; not even on
crisv32?

(Ew.  In fact, PTRACE_SINGLESTEP on cris will act as PTRACE_CONT in the
kernel sources I'm looking at.  That's nasty!)

> 
> #ifdef __arch_v32
> void
> cris_write_data_breakpoint (int bp, unsigned long start, unsigned long end)
> {
>   switch (bp)
>     {
>     case 0:
>       supply_register_by_name("s3", &start);
>       supply_register_by_name("s4", &end);
>       break;

What to do about the threaded case?  GDB is having so much trouble
getting it right that I'd like to make sure gdbserver does from the
start.

I guess this can be handled completely in the linux-low wrapper
functions by switching the current thread and setting watchpoints for
each.  I think that is correct for all Linux targets using hardware
watchpoints, because of the nature of Linux threading.


-- 
Daniel Jacobowitz


  reply	other threads:[~2005-01-30  4:54 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 [this message]
2005-02-01 14:31   ` Orjan Friberg
2005-02-14 16:17     ` Orjan Friberg
2005-02-24 20:57     ` Daniel Jacobowitz
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=20050130045359.GC25185@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