aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-06-08 05:37:29 +0000
committerDaniel Jacobowitz <drow@false.org>2002-06-08 05:37:29 +0000
commitc5dd6aab56e1ccb77292dccde3e53c7ae6e3cc63 (patch)
tree5448392143c86d3343a24a734449ea99ae52d853 /gas
parentf3c08b7e1630192a2a4bc9ddad4e46cd9e8d8ebc (diff)
downloadgdb-c5dd6aab56e1ccb77292dccde3e53c7ae6e3cc63.zip
gdb-c5dd6aab56e1ccb77292dccde3e53c7ae6e3cc63.tar.gz
gdb-c5dd6aab56e1ccb77292dccde3e53c7ae6e3cc63.tar.bz2
2002-06-08 Daniel Jacobowitz <drow@mvista.com>
Based on patch from Matt Green: * config/obj-elf.h (ECOFF_DEBUGGING): Make configurable. * config/tc-mips.c (s_mips_file): Renamed from s_file. (s_mips_loc): New function. (mips_nonecoff_pseudo_table): Call them. (append_insn): Call dwarf2_emit_insn.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/tc-mips.c45
2 files changed, 46 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2e67cc8..b026fcc 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+2002-06-08 Daniel Jacobowitz <drow@mvista.com>
+
+ Based on patch from Matt Green:
+ * config/obj-elf.h (ECOFF_DEBUGGING): Make configurable.
+ * config/tc-mips.c (s_mips_file): Renamed from s_file.
+ (s_mips_loc): New function.
+ (mips_nonecoff_pseudo_table): Call them.
+ (append_insn): Call dwarf2_emit_insn.
+
2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c (mips_opts): Fix comment, all ASE fields are set
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 2b4ac41..f69be03 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -37,6 +37,7 @@
#include "opcode/mips.h"
#include "itbl-ops.h"
+#include "dwarf2dbg.h"
#ifdef DEBUG
#define DBG(x) printf x
@@ -766,7 +767,8 @@ 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));
-static void s_file 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));
@@ -899,10 +901,10 @@ static const pseudo_typeS mips_nonecoff_pseudo_table[] =
{"end", s_mips_end, 0},
{"endb", s_ignore, 0},
{"ent", s_mips_ent, 0},
- {"file", s_file, 0},
+ {"file", s_mips_file, 0},
{"fmask", s_mips_mask, 'F'},
{"frame", s_mips_frame, 0},
- {"loc", s_ignore, 0},
+ {"loc", s_mips_loc, 0},
{"mask", s_mips_mask, 'R'},
{"verstamp", s_ignore, 0},
{ NULL, NULL, 0 },
@@ -2018,11 +2020,19 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
}
if (! mips_opts.mips16)
- md_number_to_chars (f, ip->insn_opcode, 4);
+ {
+ md_number_to_chars (f, ip->insn_opcode, 4);
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (4);
+#endif
+ }
else if (*reloc_type == BFD_RELOC_MIPS16_JMP)
{
md_number_to_chars (f, ip->insn_opcode >> 16, 2);
md_number_to_chars (f + 2, ip->insn_opcode & 0xffff, 2);
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (4);
+#endif
}
else
{
@@ -2032,6 +2042,9 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
f += 2;
}
md_number_to_chars (f, ip->insn_opcode, 2);
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (ip->use_extend ? 4 : 2);
+#endif
}
/* Update the register mask information. */
@@ -13346,14 +13359,30 @@ get_number ()
}
/* The .file directive; just like the usual .file directive, but there
- is an initial number which is the ECOFF file index. */
+ is an initial number which is the ECOFF file index. In the non-ECOFF
+ case .file implies DWARF-2. */
+
+static void
+s_mips_file (x)
+ int x ATTRIBUTE_UNUSED;
+{
+ if (ECOFF_DEBUGGING)
+ {
+ get_number ();
+ s_app_file (0);
+ }
+ else
+ dwarf2_directive_file (0);
+}
+
+/* The .loc directive, implying DWARF-2. */
static void
-s_file (x)
+s_mips_loc (x)
int x ATTRIBUTE_UNUSED;
{
- get_number ();
- s_app_file (0);
+ if (!ECOFF_DEBUGGING)
+ dwarf2_directive_loc (0);
}
/* The .end directive. */