Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eric Christopher <echristo@redhat.com>
To: "H . J . Lu" <hjl@lucon.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
	binutils@sources.redhat.com, GDB <gdb@sources.redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: PATCH: Use stabs for Linux/mips (Re: binutils is broken on ELF/MIPS)
Date: Mon, 03 Jun 2002 17:50:00 -0000	[thread overview]
Message-ID: <1023151695.7834.33.camel@ghostwheel.cygnus.com> (raw)
In-Reply-To: <20020603165101.A2466@lucon.org>


> I tried a dirty, quick change enclosed. I still can't use gdb 5.2 to
> debug gcc 3.1.1 on Linux/mipsel. I don't think it is a good idea to
> make gcc 3.1.1 generate unusable debug info by default.. 
> 

Definitely not a huge fan of that patch. I have another one from Matt
Green (attached) that I'm not ecstatic about either, but also seems to
work. The correct answer is to make dwarf-2 work under mips. It may
require some reworking though.

-eric

-- 
I will not carve gods

        * config/obj-elf.h (ECOFF_DEBUGGING): Define as a tested of
        debug_type being DEBUG_ECOFF, in the non MIPS_STABS_ELF case.
        * config/tc-mips.c (mips_nonecoff_pseudo_table): Point "file" at
        s_mips_file() and "loc" at s_mips_loc().
        (s_file): Delete.
        (s_mips_file, s_mips_loc): New functions for ".file" and ".loc"
support.


Index: gas/config/obj-elf.h
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.h,v
retrieving revision 1.15
diff -p -r1.15 obj-elf.h
*** gas/config/obj-elf.h        8 Aug 2001 13:11:58 -0000       1.15
--- gas/config/obj-elf.h        28 May 2002 18:08:22 -0000
*************** extern int alpha_flag_mdebug;
*** 51,57 ****
  #ifdef MIPS_STABS_ELF
  #define ECOFF_DEBUGGING 0
  #else
! #define ECOFF_DEBUGGING 1
  #endif /* MIPS_STABS_ELF */
  #endif /* TC_MIPS */
  
--- 51,57 ----
  #ifdef MIPS_STABS_ELF
  #define ECOFF_DEBUGGING 0
  #else
! #define ECOFF_DEBUGGING (debug_type == DEBUG_ECOFF)
  #endif /* MIPS_STABS_ELF */
  #endif /* TC_MIPS */
  
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.115
diff -p -r1.115 tc-mips.c
*** gas/config/tc-mips.c        4 Apr 2002 07:43:11 -0000       1.115
--- gas/config/tc-mips.c        28 May 2002 18:08:54 -0000
*************** static void s_mips_frame PARAMS ((int));
*** 749,755 ****
  static void s_mips_mask PARAMS ((int));
  static void s_mips_stab PARAMS ((int));
  static void s_mips_weakext PARAMS ((int));
! static void s_file PARAMS ((int));
  static int mips16_extended_frag PARAMS ((fragS *, asection *, long));
  static const char *mips_isa_to_str PARAMS ((int));
  static const char *mips_cpu_to_str PARAMS ((int));
--- 749,756 ----
  static void s_mips_mask PARAMS ((int));
  static void s_mips_stab PARAMS ((int));
  static void s_mips_weakext PARAMS ((int));
! static void s_mips_file PARAMS ((int));
! static void s_mips_loc PARAMS ((int));
  static int mips16_extended_frag PARAMS ((fragS *, asection *, long));
  static const char *mips_isa_to_str PARAMS ((int));
  static const char *mips_cpu_to_str PARAMS ((int));
*************** static const pseudo_typeS mips_nonecoff_
*** 882,891 ****
    {"end", s_mips_end, 0},
    {"endb", s_ignore, 0},
    {"ent", s_mips_ent, 0},
!   {"file", s_file, 0},
    {"fmask", s_mips_mask, 'F'},
    {"frame", s_mips_frame, 0},
!   {"loc", s_ignore, 0},
    {"mask", s_mips_mask, 'R'},
    {"verstamp", s_ignore, 0},
    { NULL, NULL, 0 },
--- 883,892 ----
    {"end", s_mips_end, 0},
    {"endb", s_ignore, 0},
    {"ent", s_mips_ent, 0},
!   {"file", s_mips_file, 0},
    {"fmask", s_mips_mask, 'F'},
    {"frame", s_mips_frame, 0},
!   {"loc", s_mips_loc, 0},
    {"mask", s_mips_mask, 'R'},
    {"verstamp", s_ignore, 0},
    { NULL, NULL, 0 },
*************** get_number ()
*** 12938,12948 ****
     is an initial number which is the ECOFF file index.  */
  
  static void
! s_file (x)
       int x ATTRIBUTE_UNUSED;
  {
!   get_number ();
!   s_app_file (0);
  }
  
  /* The .end directive.  */
--- 12939,12968 ----
     is an initial number which is the ECOFF file index.  */
  
  static void
! s_mips_file (x)
       int x ATTRIBUTE_UNUSED;
  {
!   if (ECOFF_DEBUGGING)
!     {
!       get_number ();
!       s_app_file (0);
!     }
!   else if (debug_type == DEBUG_DWARF2)
!     {
!       dwarf2_directive_file (0);
!     }
! }
! 
! /* The .loc directive, ignored for everything but DWARF2.  */
! 
! static void
! s_mips_loc (x)
!      int x ATTRIBUTE_UNUSED;
! {
!   if (debug_type == DEBUG_DWARF2)
!     {
!       dwarf2_directive_loc (0);
!     }
  }
  
  /* The .end directive.  */


  parent reply	other threads:[~2002-06-04  0:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-02 14:36 Does gdb 5.2 support gcc 3.1.1 on Linux/mips? H . J . Lu
2002-06-02 18:00 ` Daniel Jacobowitz
2002-06-02 19:43   ` H . J . Lu
2002-06-02 22:01     ` Daniel Jacobowitz
2002-06-02 22:05       ` H . J . Lu
2002-06-02 22:09         ` Daniel Jacobowitz
2002-06-02 22:42           ` H . J . Lu
2002-06-02 23:03             ` H . J . Lu
2002-06-02 23:10               ` H . J . Lu
2002-06-03  4:22                 ` Daniel Berlin
2002-06-03  7:18                 ` Daniel Jacobowitz
2002-06-03  8:55                   ` DW_CFA_def_cfa_offset_sf bug? (Re: Does gdb 5.2 support gcc 3.1.1 on Linux/mips?) H . J . Lu
     [not found]                   ` <20020603092959.A27426@lucon.org>
     [not found]                     ` <20020603104131.A28590@lucon.org>
     [not found]                       ` <20020603115703.A29881@lucon.org>
     [not found]                         ` <20020604003246.C20867@sunsite.ms.mff.cuni.cz>
     [not found]                           ` <20020603153716.A1294@lucon.org>
2002-06-03 16:25                             ` PATCH: Use stabs for Linux/mips (Re: binutils is broken on ELF/MIPS) H . J . Lu
2002-06-03 16:41                               ` Daniel Jacobowitz
2002-06-03 16:51                                 ` H . J . Lu
2002-06-03 17:43                                   ` Richard Henderson
2002-06-03 19:52                                     ` Doug Evans
2002-06-03 19:54                                       ` H . J . Lu
2002-06-03 20:36                                         ` Richard Henderson
2002-06-03 17:50                                   ` Eric Christopher [this message]
2002-06-03 18:03                                     ` H . J . Lu
2002-06-03 18:29                                       ` Eric Christopher
2002-06-03 19:47                                         ` H . J . Lu
2002-06-03 18:40                                       ` Daniel Jacobowitz
2002-06-03 19:51                                         ` H . J . Lu
2002-06-03 20:23                                           ` Daniel Jacobowitz
2002-06-03 20:28                                             ` H . J . Lu
2002-06-04 13:18                                         ` Eric Christopher
2002-06-02 23:30       ` Does gdb 5.2 support gcc 3.1.1 on Linux/mips? Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1023151695.7834.33.camel@ghostwheel.cygnus.com \
    --to=echristo@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=hjl@lucon.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox