aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-06-14 14:08:54 +0000
committerDaniel Jacobowitz <drow@false.org>2002-06-14 14:08:54 +0000
commitecb4347adecd566f59016dea61f1b9425ae83b43 (patch)
tree44e06f14de787547086a83751a668153bca0dc7c /gas/dwarf2dbg.c
parenta8295218014a96b8e6eae80bf73a407a6e3324b0 (diff)
downloadgdb-ecb4347adecd566f59016dea61f1b9425ae83b43.zip
gdb-ecb4347adecd566f59016dea61f1b9425ae83b43.tar.gz
gdb-ecb4347adecd566f59016dea61f1b9425ae83b43.tar.bz2
2002-06-14 H.J. Lu <hjl@gnu.org>
Daniel Jacobowitz <drow@mvista.com> * dwarf2dbg.h (dwarf2_directive_file): Return char *. * dwarf2dbg.c (dwarf2_directive_file): Return filename. * config/tc-mips.c (s_mips_file): Call s_app_file_string and new_logical_line for the first .file directive. * read.c (s_app_file_string): New function. (s_app_file): Call it. * read.h (s_app_file_string): Add declaration. 2002-06-14 Daniel Jacobowitz <drow@mvista.com> * configure.in: Remove MIPS_STABS_ELF. * configure: Regenerated. * config.in: Regenerated. * config/obj-elf.h (ECOFF_DEBUGGING): Define to mips_flag_mdebug for MIPS targets. * config/tc-mips.c (mips_pseudo_table): Remove #ifdef around ".extern". (pdr_seg): Declare unconditionally. (md_begin): Always generate .pdr unless ECOFF_DEBUGGING or not ELF. (s_mips_end): Likewise. Generate stabs function markers. (s_mips_ent): Generate stabs function markers. (s_mips_frame): Always generate .pdr unless ECOFF_DEBUGGING or not ELF. (s_mips_mask): Likewise. (mips_flag_mdebug): New. (md_longopts): Add "mdebug" and "no-mdebug". (md_parse_options): Add OPTION_MDEBUG and OPTION_NO_MDEBUG. (mips_after_parse_args): Set mips_flag_mdebug. * doc/as.texinfo: Add "-mdebug" and "-no-mdebug" for MIPS. 2002-06-14 Daniel Jacobowitz <drow@mvista.com> * gas/mips/lineno.d: Use --gstabs. * gas/mips/mips.exp (lineno.s): Remove XFAIL.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 94d9f79..b27652c 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -344,9 +344,13 @@ get_filenum (filename)
return i;
}
-/* Handle the .file directive. */
+/* Handle two forms of .file directive:
+ - Pass .file "source.c" to s_app_file
+ - Handle .file 1 "source.c" by adding an entry to the DWARF-2 file table
-void
+ If an entry is added to the file table, return a pointer to the filename. */
+
+char *
dwarf2_directive_file (dummy)
int dummy ATTRIBUTE_UNUSED;
{
@@ -359,7 +363,7 @@ dwarf2_directive_file (dummy)
if (*input_line_pointer == '"')
{
s_app_file (0);
- return;
+ return NULL;
}
num = get_absolute_expression ();
@@ -369,13 +373,13 @@ dwarf2_directive_file (dummy)
if (num < 1)
{
as_bad (_("file number less than one"));
- return;
+ return NULL;
}
if (num < (int) files_in_use && files[num].filename != 0)
{
as_bad (_("file number %ld already allocated"), (long) num);
- return;
+ return NULL;
}
if (num >= (int) files_allocated)
@@ -393,6 +397,8 @@ dwarf2_directive_file (dummy)
files[num].filename = filename;
files[num].dir = 0;
files_in_use = num + 1;
+
+ return filename;
}
void