From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: DJBARROW@de.ibm.com Cc: gdb-patches@sourceware.cygnus.com, s390-patches@gnu.org, schwidefsky@de.ibm.com, ARENZ@de.ibm.com Subject: Re: New gdb 31 & 64 bit patches for S/390 Date: Wed, 04 Jul 2001 21:02:00 -0000 Message-id: <3B43DB38.5040702@cygnus.com> References: X-SW-Source: 2001-07/msg00071.html 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