aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorKung Hsu <kung@cygnus>1994-07-08 19:38:18 +0000
committerKung Hsu <kung@cygnus>1994-07-08 19:38:18 +0000
commitdaad3bbf95c29995c3ed516fe0da0f627eff8c72 (patch)
tree2bc3cc6e86d80ad33e9dedce72d1c6227f133825 /gas/read.c
parent6f89cd429cdb276e9da1473f485a75a001a3c9b1 (diff)
downloadgdb-daad3bbf95c29995c3ed516fe0da0f627eff8c72.zip
gdb-daad3bbf95c29995c3ed516fe0da0f627eff8c72.tar.gz
gdb-daad3bbf95c29995c3ed516fe0da0f627eff8c72.tar.bz2
Modified Files:
read.c read.h ecoff.c ecoff.h ChangeLog * read.c (read_a_source_file): generate line stabs for asm file. * read.h: add extern generate_asm_line_stab. * ecoff.h : add prototype for ecoff_generate_asm_line_stab(). * ecoff.c (add_file): if there's no filename provided, set switch to generate line stabs for .s file. * ecoff.c (add_procedure): add stabs symbol for .ent directive. * ecoff.c (generate_ecoff_stab): creates an artificial stabs. * ecoff.c (generate_asm_line_stab): generate a artifitial label for each line and generate a stabn for the line.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gas/read.c b/gas/read.c
index 2aaeae0..ce5dfe1 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -60,6 +60,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
char *input_line_pointer; /*->next char of source file to parse. */
+int generate_asm_line_stab = 0; /* flag to generate line stab for .s file */
+
#if BITS_PER_CHAR != 8
/* The following table is indexed by[(char)] and will break if
a char does not have exactly 256 states (hopefully 0:255!)! */
@@ -544,6 +546,16 @@ read_a_source_file (name)
c = *input_line_pointer;
*input_line_pointer = '\0';
+#ifdef OBJ_GENERATE_ASM_LINE_STAB
+ if (generate_asm_line_stab)
+ {
+ int lineno;
+ char *s;
+ as_where (&s, &lineno);
+ OBJ_GENERATE_ASM_LINE_STAB (lineno);
+ }
+#endif
+
md_assemble (s); /* Assemble 1 instruction. */
*input_line_pointer++ = c;
@@ -1503,13 +1515,12 @@ pseudo_set (symbolP)
symbolS *symbolP;
{
expressionS exp;
-#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
+#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
int ext;
#endif /* OBJ_AOUT or OBJ_BOUT */
know (symbolP); /* NULL pointer is logic error. */
-#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
- /* @@ Fix this right for BFD. */
+#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
ext = S_IS_EXTERNAL (symbolP);
#endif /* OBJ_AOUT or OBJ_BOUT */
@@ -1542,8 +1553,7 @@ pseudo_set (symbolP)
/* Fall through. */
case O_constant:
S_SET_SEGMENT (symbolP, absolute_section);
-#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
- /* @@ Fix this right for BFD. */
+#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
if (ext)
S_SET_EXTERNAL (symbolP);
else
@@ -1565,8 +1575,7 @@ pseudo_set (symbolP)
else
{
S_SET_SEGMENT (symbolP, S_GET_SEGMENT (exp.X_add_symbol));
-#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
- /* @@ Fix this right for BFD! */
+#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
if (ext)
S_SET_EXTERNAL (symbolP);
else