From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11482 invoked by alias); 8 Aug 2002 00:42:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11475 invoked from network); 8 Aug 2002 00:42:33 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 8 Aug 2002 00:42:33 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA16873; Wed, 7 Aug 2002 17:40:26 -0700 (PDT) Message-ID: <3D51BA0F.9A825A12@redhat.com> Date: Wed, 07 Aug 2002 17:42:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com, cagney@redhat.com Subject: [RFC] mips gdb fails to detect o32 Content-Type: multipart/mixed; boundary="------------5629C092813F27EA567DAD2B" X-SW-Source: 2002-08/txt/msg00174.txt.bz2 This is a multi-part message in MIME format. --------------5629C092813F27EA567DAD2B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 513 Well, I just discovered that gdb is failing to detect the o32 abi when debugging the output of the native Irix compiler. This patch seems to help. The idea here is, if it's not n32, then if it is MIPS_ARCH_2, then it must be o32. However, I've no idea if that's right -- I just know it works so far as I've been able to test it. Unfortunately, I haven't been able to test it against EABI, and I haven't been able to test it against gcc, because gcc doesn't generate o32. So... anybody have any better ideas? --------------5629C092813F27EA567DAD2B Content-Type: text/plain; charset=us-ascii; name="patch3.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch3.diff" Content-length: 696 2002-08-07 Michael Snyder * mips-tdep.c (mips_gdbarch_init): Detect 032. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.92 diff -p -r1.92 mips-tdep.c *** mips-tdep.c 8 Aug 2002 00:26:51 -0000 1.92 --- mips-tdep.c 8 Aug 2002 00:33:15 -0000 *************** mips_gdbarch_init (struct gdbarch_info i *** 4412,4417 **** --- 4412,4419 ---- default: if ((elf_flags & EF_MIPS_ABI2)) mips_abi = MIPS_ABI_N32; + else if ((elf_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2) + mips_abi = MIPS_ABI_O32; else mips_abi = MIPS_ABI_UNKNOWN; break; --------------5629C092813F27EA567DAD2B--