Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: AM33/2.0 support for mn10300-elf
Date: Sat, 02 Aug 2003 14:26:00 -0000	[thread overview]
Message-ID: <3F2BC9F5.5040100@redhat.com> (raw)
In-Reply-To: <or65mb13hy.fsf@free.redhat.lsd.ic.unicamp.br>

Sigh, separate SIM and GDB patches might have been easier.

For the simulator, two refinements:

+void fpu_disabled_exception     PARAMS ((SIM_DESC, sim_cpu *, 
address_word));
The code needs to use strict ISO C.  It might be easier to just convert 
everything.

+  store_word (addr + 4, data.high);
+}
  #endif  /* not WITH_COMMON */

The MN10300 switched to sim/common long ago, the #if !WITH_COMMON code 
should be deleted.

they can both be considered pretty "obvious".

Other than that, its approved.

--

> +/* Fetch, and possibly build, an appropriate link_map_offsets structure
> +   for mn10300 linux targets using the struct offsets defined in <link.h>.
> +   Note, however, that link.h is not actually referred to in this file.
> +   Instead, the relevant structs offsets were obtained from examining
> +   link.h.  (We can't refer to link.h from this file because the host
> +   system won't necessarily have it, or if it does, the structs which
> +   it defines will refer to the host system, not the target.)  */
> +
> +struct link_map_offsets *
> +mn10300_linux_svr4_fetch_link_map_offsets (void)
> +{

This really belongs in mn10300-linux-tdep.c.  I also suspect that stuff 
is also missing from the patch (tm-mn10300.h?), as the function doesn't 
appear to be called?  Does this need an ABI sniffer (see osabi.[sh])?

> +  if (AM33_MODE == 2)

I'm guessing this is a macro that relies on global state.  New code 
instead accesses everything via parameters.  Here, something like:

	fi->arch->tdep->am33_mode

which, in GDB, is written as:

	gdbarch_tdep (get_frame_arch (fi))->am33_mode.

> +      get_frame_saved_regs (fi)[LAR_REGNUM]    = get_frame_base (fi) + offset + 4;

See: http://sources.redhat.com/gdb/current/ari/
The method get_frame_saved_regs() is obsolete.  Changes should be 
decreasing, not increasing that function's usage count :-/  The new code 
will need to be written in a way that avoids this method.  The best way 
of doing this is to convert it to convert that section of the code to 
the new unwind mechanism.

>      15, 16, 17, 18, 19, 20, 21, 22
> +    , 32, 33, 34, 35, 36, 37, 38, 39
> +    , 40, 41, 42, 43, 44, 45, 46, 47

GNU coding style?


+  set_gdbarch_fp0_regnum (gdbarch, 32);

Is this needed?  Adding a field to the am33's tdep struct would be 
better.  FP0_REGNUM is almost, but not quite deprecated.

sorry,
Andrew


  parent reply	other threads:[~2003-08-02 14:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-10  3:10 Alexandre Oliva
2003-07-10  3:31 ` Alexandre Oliva
2003-07-10  4:59   ` Alexandre Oliva
2003-07-16 16:05     ` [Bug-dejagnu] " Rob Savoye
2003-07-22 20:02       ` Alexandre Oliva
2003-07-10  4:57 ` Alexandre Oliva
2003-08-02 14:26 ` Andrew Cagney [this message]
2004-06-21 13:59   ` Alexandre Oliva
2004-06-25 21:41     ` Andrew Cagney
2004-06-26 22:00     ` Alexandre Oliva
2004-06-26 22:00   ` Alexandre Oliva
2004-06-26 22:18   ` Alexandre Oliva

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=3F2BC9F5.5040100@redhat.com \
    --to=ac131313@redhat.com \
    --cc=aoliva@redhat.com \
    --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