This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Does mips gas support dwarf2?
- To: binutils at sourceware dot cygnus dot com
- Subject: Does mips gas support dwarf2?
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Fri, 20 Jul 2001 14:15:33 -0700
Does mips gas support dwarf2 generated by gcc 3.0? I don't think it
does. Does this patch make any senses?
Thanks.
H.J.
----
2001-07-20 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c: Include "dwarf2dbg.h" for ELF.
(s_file): Don't define for ELF.
(mips_nonecoff_pseudo_table): Use dwarf2_directive_file on
"file" and dwarf2_directive_loc on "loc" for ELF.
(s_mips_end): Remove unused variables.
(s_mips_frame): Add ATTRIBUTE_UNUSED.
Index: config/tc-mips.c
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/config/tc-mips.c,v
retrieving revision 1.44
diff -u -p -r1.44 tc-mips.c
--- config/tc-mips.c 2001/07/04 17:20:10 1.44
+++ config/tc-mips.c 2001/07/20 21:08:01
@@ -80,6 +80,7 @@ static int mips_output_flavor () { retur
#include "ecoff.h"
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#include "dwarf2dbg.h"
static char *mips_regmask_frag;
#endif
@@ -698,7 +699,9 @@ static void s_mips_frame PARAMS ((int));
static void s_mips_mask PARAMS ((int));
static void s_mips_stab PARAMS ((int));
static void s_mips_weakext PARAMS ((int));
+#if !defined (OBJ_ELF) && !defined (OBJ_MAYBE_ELF)
static void s_file PARAMS ((int));
+#endif
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));
@@ -797,10 +800,18 @@ static const pseudo_typeS mips_nonecoff_
{"end", s_mips_end, 0},
{"endb", s_ignore, 0},
{"ent", s_mips_ent, 0},
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ {"file", dwarf2_directive_file, 0},
+#else
{"file", s_file, 0},
+#endif
{"fmask", s_mips_mask, 'F'},
{"frame", s_mips_frame, 0},
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ {"loc", dwarf2_directive_loc, 0},
+#else
{"loc", s_ignore, 0},
+#endif
{"mask", s_mips_mask, 'R'},
{"verstamp", s_ignore, 0},
{ NULL, NULL, 0 },
@@ -11776,6 +11787,7 @@ get_number ()
return negative ? -val : val;
}
+#if !defined (OBJ_ELF) && !defined (OBJ_MAYBE_ELF)
/* The .file directive; just like the usual .file directive, but there
is an initial number which is the ECOFF file index. */
@@ -11788,6 +11800,7 @@ s_file (x)
line = get_number ();
s_app_file (0);
}
+#endif
/* The .end directive. */
@@ -11841,9 +11854,7 @@ s_mips_end (x)
{
segT saved_seg = now_seg;
subsegT saved_subseg = now_subseg;
- fragS *saved_frag = frag_now;
valueT dot;
- segT seg;
expressionS exp;
char *fragp;
@@ -11938,7 +11949,7 @@ s_mips_ent (aent)
static void
s_mips_frame (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
#ifdef MIPS_STABS_ELF