OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [or32-tdep.c] - Diff between revs 531 and 565

Show entire file | Details | Blame | View Log

Rev 531 Rev 565
Line 98... Line 98...
#include "frame.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "frame-base.h"
#include "dwarf2-frame.h"
#include "dwarf2-frame.h"
#include "trad-frame.h"
#include "trad-frame.h"
 
#include "regset.h"
 
 
#include <inttypes.h>
#include <inttypes.h>
 
 
 
 


Line 464... Line 465...
        {
        {
          ULONGEST        tmp_lo;
          ULONGEST        tmp_lo;
          ULONGEST        tmp_hi;
          ULONGEST        tmp_hi;
          ULONGEST        tmp;
          ULONGEST        tmp;
 
 
          /* JPB: This seems back to front, but it is definitely this way
 
             round for double results. */
 
          regcache_cooked_read_unsigned (regcache, OR32_RV_REGNUM    , &tmp_hi);
          regcache_cooked_read_unsigned (regcache, OR32_RV_REGNUM    , &tmp_hi);
          regcache_cooked_read_unsigned (regcache, OR32_RV_REGNUM + 1, &tmp_lo);
          regcache_cooked_read_unsigned (regcache, OR32_RV_REGNUM + 1, &tmp_lo);
          tmp = (tmp_hi << (bpw * 8)) | tmp_lo;
          tmp = (tmp_hi << (bpw * 8)) | tmp_lo;
 
 
          store_unsigned_integer (readbuf, rv_size, byte_order, tmp);
          store_unsigned_integer (readbuf, rv_size, byte_order, tmp);
Line 1155... Line 1154...
        {
        {
          /* Big scalars use two registers, but need NOT be pair aligned. This
          /* Big scalars use two registers, but need NOT be pair aligned. This
             code breaks if we can have quad-word scalars (e.g. long
             code breaks if we can have quad-word scalars (e.g. long
             double). */
             double). */
 
 
          /* JPB 16-Apr-11: This appears currently not to be true. Big scalars
 
             get aligned in pairs r3/r4, r5/r6 and r7/r8. Temporarily
 
             patched. */
 
          if (0 != ((argreg - OR32_FIRST_ARG_REGNUM) % 2))
 
            {
 
              argreg++;
 
            }
 
 
 
          if (argreg <= (OR32_LAST_ARG_REGNUM - 1))
          if (argreg <= (OR32_LAST_ARG_REGNUM - 1))
            {
            {
              ULONGEST regval = extract_unsigned_integer (val, len, byte_order);
              ULONGEST regval = extract_unsigned_integer (val, len, byte_order);
 
 
              unsigned int  bits_per_word = bpw * 8;
              unsigned int  bits_per_word = bpw * 8;
Line 1738... Line 1729...
}       /* or32_frame_base_sniffer () */
}       /* or32_frame_base_sniffer () */
#endif
#endif
 
 
 
 
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
 
/*!Return information needed to handle a core file.
 
 
 
   We put together a regset structure that tells the system how to transfer
 
   registers to and from a core file image.
 
 
 
   @param[in] gdbarch    The GDB architecture we are using.
 
   @param[in] sect_name  The name of the section being considered.
 
   @param[in] sect_size  The size of the section being considered.
 
 
 
   @return  A regset structure for the section, or NULL if none is available. */
 
/* -------------------------------------------------------------------------- */
 
static const struct regset *
 
or32_regset_from_core_section (struct gdbarch *gdbarch,
 
                               const char     *sect_name,
 
                               size_t          sect_size)
 
{
 
  printf ("sect_name \"%s\", sect_size %d\n", sect_name, sect_size);
 
  return NULL;
 
 
 
}       /* or32_regset_from_core_section () */
 
 
 
 
 
/* -------------------------------------------------------------------------- */
/*!Architecture initialization for OpenRISC 1000
/*!Architecture initialization for OpenRISC 1000
 
 
   Looks for a candidate architecture in the list of architectures supplied
   Looks for a candidate architecture in the list of architectures supplied
   using the info supplied. If none match, create a new architecture.
   using the info supplied. If none match, create a new architecture.
 
 
Line 1850... Line 1864...
     otherwise use our own sniffer. */
     otherwise use our own sniffer. */
  frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
  frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
  frame_base_append_sniffer (gdbarch, or32_frame_base_sniffer);
  frame_base_append_sniffer (gdbarch, or32_frame_base_sniffer);
#endif
#endif
 
 
 
  /* Handle core files */
 
  set_gdbarch_regset_from_core_section (gdbarch, or32_regset_from_core_section);
 
 
  /* Frame unwinders. Use DWARF debug info if available, otherwise use our
  /* Frame unwinders. Use DWARF debug info if available, otherwise use our
     own unwinder. */
     own unwinder. */
  dwarf2_append_unwinders (gdbarch);
  dwarf2_append_unwinders (gdbarch);
  frame_unwind_append_unwinder (gdbarch, &or32_frame_unwind);
  frame_unwind_append_unwinder (gdbarch, &or32_frame_unwind);
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.