This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: New gdb 31 & 64 bit patches for S/390
- To: DJBARROW at de dot ibm dot com
- Subject: Re: New gdb 31 & 64 bit patches for S/390
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 04 Jul 2001 23:12:56 -0400
- Cc: gdb-patches at sourceware dot cygnus dot com, s390-patches at gnu dot org,schwidefsky at de dot ibm dot com, ARENZ at de dot ibm dot com
- References: <C1256A00.006F3FCE.00@d12mta09.de.ibm.com>
Hello,
I'm trying to understand the code:
+void
+_initialize_s390_tdep ()
+{
+ const bfd_arch_info_type *s390_arch_ptr =
+ bfd_lookup_arch (bfd_arch_s390, 0);
+
+#if GDB_MULTI_ARCH
+ /* Hook us into the gdbarch mechanism. */
+ register_gdbarch_init (bfd_arch_s390, s390_gdbarch_init);
+#endif
+ if (!tm_print_insn) /* Someone may have already set it */
+ tm_print_insn = gdb_print_insn_s390;
+ if (s390_arch_ptr)
+ tm_print_insn_info.mach = s390_arch_ptr->mach;
+ else
+ internal_error (__FILE__, __LINE__,
+ "_initialize_s390_tdep: bfd_lookup_arch failed for ....
+}
but don't understand the reason for the call to bfd_lookup_arch().
printcmd.c:print_insn() will set the ->mach to the target architectures
machine regardless of the above.
Andrew