Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Add mips_software_single_step
Date: Thu, 05 Jul 2001 15:50:00 -0000	[thread overview]
Message-ID: <3B44EF32.8010009@cygnus.com> (raw)
In-Reply-To: <20010705150511.A27593@nevyn.them.org>

> On Thu, Jul 05, 2001 at 05:50:14PM -0400, Andrew Cagney wrote:
> 
>> > This function's pretty straightforward; the Linux port uses it.  Ok to
>> > commit?
> 
>> 
>> 
>> How does the linux port use it?  As a tweek to the multi-arch vector or 
>> as a macro/function?  If the former then it should be static, if the 
>> latter than a declaration in mips-tdep.h or tm-mips.h (?) is needed.
> 
> 
> As a macro:
> 
> #define SOFTWARE_SINGLE_STEP_P() 1
> extern void mips_software_single_step (unsigned int, int);
> #define SOFTWARE_SINGLE_STEP(sig,bp_p) mips_software_single_step (sig, bp_p)


The macro definition appearing in config/mips/tm-linux.h but the 
function declaration appearing in config/mips/tm-mips.h?  The function 
declaration is in tm-mips.h so that mips-tdep.c always sees it.


> I'm sensing that this belongs in the multi-arch vector, though.  I'll
> change that.


For the moment the above is ok.


> The question this raises is how to do it.  I'd rather do it in
> mips-linux-tdep.c than mips-tdep.c, and mips-tdep shouldn't know we're
> compiling for a Linux target (it already does, via MIPS_DEFAULT_ABI,
> but I'll address that in a bit).  How can I modify the gdbarch vector
> in a second place?


You're on the right track but (as I wrote):

> The wart?  So far multi-arch has concentrated on problems like:
> 
>     MIPS2 embedded
>     MIPS3 embedded
> 
> but has avoided cases such as:
> 
>     Linux/MIPS native and remote
>     MIPS embedded
>     *BSD/MIPS remote
> 
> i.e. OS as well as ISA/ABI as a variant.  For nm.h to be reduced to

> just _native_ interface support, multi-arch will need to be extended

> to include this.


We're getting into the relm of theory :-)  No one has so far tried to do 
this.  (Well, ok I think Eli is setting himself up for the challenge on 
IRIX.)

The multi-arch notes suggest:

	o	call generic code to create
		a multi-arch vector as per
		ABI/ISA:

		mips-linux-tdep.c calls
		mips-tdep.c:create_gdbarch_object()

	o	refine the created object
		to be OS specific.

The gap in all this is the bit of logic that decides what (mip-tdep.c or 
mips-linux-tdep.c) should create the multi-arch vector.


>> The function is almost ok.  It just needs to be updated to meet GDB's 
>> current coding conventions (ISO-C, indentation).
> 
> 
> Right.  I'll do that too.
> 
> 
>> With regard to the linux code, you should probably look over 
>> http://sources.redhat.com/gdb/ari/ and check any new code for potential 
>> regressions or errors.  Just remember to ignore any of the warnings :-)
> 
> 
> I think I'm OK on most of those; I'll go over it again later.


If you think you're ok then that is more than sufficient.

	Andrew




  reply	other threads:[~2001-07-05 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-04 11:56 Daniel Jacobowitz
2001-07-05 14:50 ` Andrew Cagney
2001-07-05 15:05   ` Daniel Jacobowitz
2001-07-05 15:50     ` Andrew Cagney [this message]
2001-07-05 16:10       ` Daniel Jacobowitz
2001-07-05 16:24         ` Andrew Cagney
2001-07-05 16:31           ` Daniel Jacobowitz

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=3B44EF32.8010009@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=dmj+@andrew.cmu.edu \
    --cc=gdb-patches@sources.redhat.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