From: Ulrich Weigand Date: Fri, 22 Aug 2008 15:32:43 +0000 (+0000) Subject: * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0391f2487cd27e6d11f068c5ac66062ea753a7b0;p=binutils-gdb.git * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles. (info_spu_event_command): Command only supported on SPU architecture. (info_spu_signal_command): Likewise. (info_spu_mailbox_command): Likewise. (info_spu_dma_command): Likewise. (info_spu_proxydma_command): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c12701004be..2e26b268105 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2008-08-22 Ulrich Weigand + + * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles. + (info_spu_event_command): Command only supported on SPU architecture. + (info_spu_signal_command): Likewise. + (info_spu_mailbox_command): Likewise. + (info_spu_dma_command): Likewise. + (info_spu_proxydma_command): Likewise. + 2008-08-22 Ulrich Weigand * infrun.c (adjust_pc_after_break): Do not call get_thread_regcache diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 92cbd3005b3..502fc83cb5d 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -1463,6 +1463,10 @@ spu_overlay_new_objfile (struct objfile *objfile) if (!objfile || objfile_data (objfile, spu_overlay_data) != NULL) return; + /* Consider only SPU objfiles. */ + if (bfd_get_arch (objfile->obfd) != bfd_arch_spu) + return; + /* Check if this objfile has overlays. */ ovly_table = spu_get_overlay_table (objfile); if (!ovly_table) @@ -1497,6 +1501,9 @@ info_spu_event_command (char *args, int from_tty) LONGEST len; int rc, id; + if (gdbarch_bfd_arch_info (get_frame_arch (frame))->arch != bfd_arch_spu) + error (_("\"info spu\" is only supported on the SPU architecture.")); + id = get_frame_register_unsigned (frame, SPU_ID_REGNUM); xsnprintf (annex, sizeof annex, "%d/event_status", id); @@ -1549,6 +1556,9 @@ info_spu_signal_command (char *args, int from_tty) LONGEST len; int rc, id; + if (gdbarch_bfd_arch_info (get_frame_arch (frame))->arch != bfd_arch_spu) + error (_("\"info spu\" is only supported on the SPU architecture.")); + id = get_frame_register_unsigned (frame, SPU_ID_REGNUM); xsnprintf (annex, sizeof annex, "%d/signal1", id); @@ -1665,6 +1675,9 @@ info_spu_mailbox_command (char *args, int from_tty) LONGEST len; int i, id; + if (gdbarch_bfd_arch_info (get_frame_arch (frame))->arch != bfd_arch_spu) + error (_("\"info spu\" is only supported on the SPU architecture.")); + id = get_frame_register_unsigned (frame, SPU_ID_REGNUM); chain = make_cleanup_ui_out_tuple_begin_end (uiout, "SPUInfoMailbox"); @@ -1894,6 +1907,9 @@ info_spu_dma_command (char *args, int from_tty) LONGEST len; int i, id; + if (gdbarch_bfd_arch_info (get_frame_arch (frame))->arch != bfd_arch_spu) + error (_("\"info spu\" is only supported on the SPU architecture.")); + id = get_frame_register_unsigned (frame, SPU_ID_REGNUM); xsnprintf (annex, sizeof annex, "%d/dma_info", id); @@ -1963,6 +1979,9 @@ info_spu_proxydma_command (char *args, int from_tty) LONGEST len; int i, id; + if (gdbarch_bfd_arch_info (get_frame_arch (frame))->arch != bfd_arch_spu) + error (_("\"info spu\" is only supported on the SPU architecture.")); + id = get_frame_register_unsigned (frame, SPU_ID_REGNUM); xsnprintf (annex, sizeof annex, "%d/proxydma_info", id);