~ubuntu-branches/debian/jessie/gdb/jessie

« back to all changes in this revision

Viewing changes to gdb/gdbserver/spu-low.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2010-03-20 01:21:29 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320012129-t7h25y8zgr8c2369
Tags: 7.1-1
* New upstream release, including:
  - PIE support (Closes: #346409).
  - C++ improvements, including static_cast<> et al, namespace imports,
    and bug fixes in printing virtual base classes.
  - Multi-program debugging.  One GDB can now debug multiple programs
    at the same time.
  - Python scripting improvements, including gdb.parse_and_eval.
  - Updated MIPS Linux signal frame layout (Closes: #570875).
  - No internal error stepping over _dl_debug_state (Closes: #569551).
* Update to Standards-Version: 3.8.4 (no changes required).
* Include more relevant (and smaller) docs in the gdbserver package
  (Closes: #571132).
* Do not duplicate documentation in gdb64, gdb-source, and libgdb-dev.
* Fix crash when switching into TUI mode (Closes: #568489).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Low level interface to SPUs, for the remote server for GDB.
2
 
   Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
2
   Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3
3
 
4
4
   Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
5
5
 
477
477
 
478
478
/* Fetch inferior registers.  */
479
479
static void
480
 
spu_fetch_registers (int regno)
 
480
spu_fetch_registers (struct regcache *regcache, int regno)
481
481
{
482
482
  int fd;
483
483
  CORE_ADDR addr;
488
488
 
489
489
  /* The ID register holds the spufs file handle.  */
490
490
  if (regno == -1 || regno == SPU_ID_REGNUM)
491
 
    supply_register (SPU_ID_REGNUM, (char *)&fd);
 
491
    supply_register (regcache, SPU_ID_REGNUM, (char *)&fd);
492
492
 
493
493
  /* The NPC register is found at ADDR.  */
494
494
  if (regno == -1 || regno == SPU_PC_REGNUM)
495
495
    {
496
496
      char buf[4];
497
497
      if (fetch_ppc_memory (addr, buf, 4) == 0)
498
 
        supply_register (SPU_PC_REGNUM, buf);
 
498
        supply_register (regcache, SPU_PC_REGNUM, buf);
499
499
    }
500
500
 
501
501
  /* The GPRs are found in the "regs" spufs file.  */
508
508
      sprintf (annex, "%d/regs", fd);
509
509
      if (spu_proc_xfer_spu (annex, buf, NULL, 0, sizeof buf) == sizeof buf)
510
510
        for (i = 0; i < SPU_NUM_CORE_REGS; i++)
511
 
          supply_register (i, buf + i*16);
 
511
          supply_register (regcache, i, buf + i*16);
512
512
    }
513
513
}
514
514
 
515
515
/* Store inferior registers.  */
516
516
static void
517
 
spu_store_registers (int regno)
 
517
spu_store_registers (struct regcache *regcache, int regno)
518
518
{
519
519
  int fd;
520
520
  CORE_ADDR addr;
531
531
  if (regno == -1 || regno == SPU_PC_REGNUM)
532
532
    {
533
533
      char buf[4];
534
 
      collect_register (SPU_PC_REGNUM, buf);
 
534
      collect_register (regcache, SPU_PC_REGNUM, buf);
535
535
      store_ppc_memory (addr, buf, 4);
536
536
    }
537
537
 
543
543
      int i;
544
544
 
545
545
      for (i = 0; i < SPU_NUM_CORE_REGS; i++)
546
 
        collect_register (i, buf + i*16);
 
546
        collect_register (regcache, i, buf + i*16);
547
547
 
548
548
      sprintf (annex, "%d/regs", fd);
549
549
      spu_proc_xfer_spu (annex, NULL, buf, 0, sizeof buf);