aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coffbfd.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-05-27 19:29:38 +0000
committerIan Lance Taylor <ian@airs.com>1993-05-27 19:29:38 +0000
commit9a7d824a261ba7785702c5a3b5bc6bf3a3b12213 (patch)
treeb6939d9264356d6aef256ddd19a347630a42c2a3 /gas/config/obj-coffbfd.c
parentd34094e8e0bd8749e890a012c218923656d53774 (diff)
downloadgdb-9a7d824a261ba7785702c5a3b5bc6bf3a3b12213.zip
gdb-9a7d824a261ba7785702c5a3b5bc6bf3a3b12213.tar.gz
gdb-9a7d824a261ba7785702c5a3b5bc6bf3a3b12213.tar.bz2
* app.c (do_scrub_begin): Let line_comment_chars override
comment_chars. (do_scrub_next_char): If a line comment character is not at the start of a line, treat it as a comment character if it is one. For a CPP line comment use pseudo-op .appline rather than .line. * input-scrub.c (logical_input_line): Make int rather than unsigned. (input_scrub_push, input_scrub_begin): Initialize logical_input_line to -1 rather than 0. (bump_line_counters): Increment logical_input_line. (new_logical_line): If line_number is -2, decrement logical_input_line. (as_where): Use logical_input_line even if it is 0. * read.h (s_app_file prototype): Now takes an int argument. * read.c (potable): Make .appfile call s_app_file with 1. New .appline pseudo-op calls s_app_line. (s_app_file): If .appfile, call new_logical_line with -2 to account for newline inserted by do_scrub_next_char. If listing, call listing_source_file. (s_app_line): New function to handle fake pseudo-op .appline. * config/obj-coff.c (obj_pseudo_table): Make .appline call obj_coff_ln. (obj_coff_ln): Added argument to indicate whether .appline. * config/obj-coffbfd.c (obj_pseudo_table): Make .appline call obj_coff_ln. (obj_coff_ln): Added argument to indicate whether .appline. * config/tc-mips.c (s_file): Pass argument to s_app_file.
Diffstat (limited to 'gas/config/obj-coffbfd.c')
-rw-r--r--gas/config/obj-coffbfd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gas/config/obj-coffbfd.c b/gas/config/obj-coffbfd.c
index 36e9fdc..d5282fa 100644
--- a/gas/config/obj-coffbfd.c
+++ b/gas/config/obj-coffbfd.c
@@ -142,7 +142,7 @@ static void EXFUN( obj_coff_bss,(void));
static void EXFUN( obj_coff_ident,(void));
static void EXFUN (obj_coff_endef, (void));
static void EXFUN (obj_coff_line, (void));
-static void EXFUN (obj_coff_ln, (void));
+static void EXFUN (obj_coff_ln, (int));
static void EXFUN (obj_coff_scl, (void));
static void EXFUN (obj_coff_size, (void));
static void EXFUN (obj_coff_tag, (void));
@@ -163,6 +163,7 @@ const pseudo_typeS obj_pseudo_table[] =
{"endef", obj_coff_endef, 0},
{"line", obj_coff_line, 0},
{"ln", obj_coff_ln, 0},
+ {"appline", obj_coff_ln, 1},
{"scl", obj_coff_scl, 0},
{"size", obj_coff_size, 0},
{"tag", obj_coff_tag, 0},
@@ -776,11 +777,12 @@ stack_top (st)
*/
static void
-obj_coff_ln ()
+obj_coff_ln (appline)
+ int appline;
{
int l;
- if (def_symbol_in_progress != NULL)
+ if (! appline && def_symbol_in_progress != NULL)
{
as_warn (".ln pseudo-op inside .def/.endef: ignored.");
demand_empty_rest_of_line ();
@@ -797,7 +799,9 @@ obj_coff_ln ()
if (listing)
{
- listing_source_line (l + line_base - 1);
+ if (! appline)
+ l += line_base - 1;
+ listing_source_line (l);
}
}
@@ -1095,7 +1099,7 @@ obj_coff_line ()
if (def_symbol_in_progress == NULL)
{
- obj_coff_ln ();
+ obj_coff_ln (0);
return;
} /* if it looks like a stabs style line */