Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Side by Side Diff: gdb/spu-multiarch.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/spu-linux-nat.c ('k') | gdb/spu-tdep.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Cell SPU GNU/Linux multi-architecture debugging support. 1 /* Cell SPU GNU/Linux multi-architecture debugging support.
2 Copyright (C) 2009-2012 Free Software Foundation, Inc. 2 Copyright (C) 2009-2012 Free Software Foundation, Inc.
3 3
4 Contributed by Ulrich Weigand <uweigand@de.ibm.com>. 4 Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
5 5
6 This file is part of GDB. 6 This file is part of GDB.
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or 10 the Free Software Foundation; either version 3 of the License, or
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 /* If the PPU thread is currently stopped on a spu_run system call, 54 /* If the PPU thread is currently stopped on a spu_run system call,
55 return to FD and ADDR the file handle and NPC parameter address 55 return to FD and ADDR the file handle and NPC parameter address
56 used with the system call. Return non-zero if successful. */ 56 used with the system call. Return non-zero if successful. */
57 static int 57 static int
58 parse_spufs_run (ptid_t ptid, int *fd, CORE_ADDR *addr) 58 parse_spufs_run (ptid_t ptid, int *fd, CORE_ADDR *addr)
59 { 59 {
60 enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch); 60 enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
61 struct gdbarch_tdep *tdep; 61 struct gdbarch_tdep *tdep;
62 struct regcache *regcache; 62 struct regcache *regcache;
63 char buf[4]; 63 char buf[4];
64 CORE_ADDR pc;
65 ULONGEST regval; 64 ULONGEST regval;
66 65
67 /* If we're not on PPU, there's nothing to detect. */ 66 /* If we're not on PPU, there's nothing to detect. */
68 if (gdbarch_bfd_arch_info (target_gdbarch)->arch != bfd_arch_powerpc) 67 if (gdbarch_bfd_arch_info (target_gdbarch)->arch != bfd_arch_powerpc)
69 return 0; 68 return 0;
70 69
71 /* Get PPU-side registers. */ 70 /* Get PPU-side registers. */
72 regcache = get_thread_arch_regcache (ptid, target_gdbarch); 71 regcache = get_thread_arch_regcache (ptid, target_gdbarch);
73 tdep = gdbarch_tdep (target_gdbarch); 72 tdep = gdbarch_tdep (target_gdbarch);
74 73
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 spu_ops.to_fetch_registers = spu_fetch_registers; 393 spu_ops.to_fetch_registers = spu_fetch_registers;
395 spu_ops.to_store_registers = spu_store_registers; 394 spu_ops.to_store_registers = spu_store_registers;
396 spu_ops.to_xfer_partial = spu_xfer_partial; 395 spu_ops.to_xfer_partial = spu_xfer_partial;
397 spu_ops.to_search_memory = spu_search_memory; 396 spu_ops.to_search_memory = spu_search_memory;
398 spu_ops.to_region_ok_for_hw_watchpoint = spu_region_ok_for_hw_watchpoint; 397 spu_ops.to_region_ok_for_hw_watchpoint = spu_region_ok_for_hw_watchpoint;
399 spu_ops.to_thread_architecture = spu_thread_architecture; 398 spu_ops.to_thread_architecture = spu_thread_architecture;
400 spu_ops.to_stratum = arch_stratum; 399 spu_ops.to_stratum = arch_stratum;
401 spu_ops.to_magic = OPS_MAGIC; 400 spu_ops.to_magic = OPS_MAGIC;
402 } 401 }
403 402
403 /* -Wmissing-prototypes */
404 extern initialize_file_ftype _initialize_spu_multiarch;
405
404 void 406 void
405 _initialize_spu_multiarch (void) 407 _initialize_spu_multiarch (void)
406 { 408 {
407 /* Install ourselves on the target stack. */ 409 /* Install ourselves on the target stack. */
408 init_spu_ops (); 410 init_spu_ops ();
409 add_target (&spu_ops); 411 add_target (&spu_ops);
410 412
411 /* Install observers to watch for SPU objects. */ 413 /* Install observers to watch for SPU objects. */
412 observer_attach_inferior_created (spu_multiarch_inferior_created); 414 observer_attach_inferior_created (spu_multiarch_inferior_created);
413 observer_attach_solib_loaded (spu_multiarch_solib_loaded); 415 observer_attach_solib_loaded (spu_multiarch_solib_loaded);
414 observer_attach_solib_unloaded (spu_multiarch_solib_unloaded); 416 observer_attach_solib_unloaded (spu_multiarch_solib_unloaded);
415 } 417 }
416 418
OLDNEW
« no previous file with comments | « gdb/spu-linux-nat.c ('k') | gdb/spu-tdep.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698