This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/8] Call print_insn_mep in mep_gdb_print_insn


On 2017-01-10 07:26, Yao Qi wrote:
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 68b0c4b..7d04983 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -1273,6 +1273,7 @@ mep_gdb_print_insn (bfd_vma pc, disassemble_info * info)
 {
   struct obj_section * s = find_pc_section (pc);

+  info->arch = bfd_arch_mep;
   if (s)
     {
       /* The libopcodes disassembly code uses the section to find the
@@ -1280,12 +1281,9 @@ mep_gdb_print_insn (bfd_vma pc, disassemble_info * info)
          the me_module index, and the me_module index to select the
          right instructions to print.  */
       info->section = s->the_bfd_section;
-      info->arch = bfd_arch_mep;
-
-      return print_insn_mep (pc, info);
     }
-
-  return 0;
+
+  return print_insn_mep (pc, info);
 }

 

Does the comment above mep_gdb_print_insn need to be changed?

/* The mep disassembler needs to know about the section in order to
   work correctly.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]