mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
* read.h (include_dirs): Declare.
(include_dir_count,include_dir_maxlen): Declare.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 30 11:02:35 1998 Doug Evans <devans@canuck.cygnus.com>
|
||||||
|
|
||||||
|
* read.h (include_dirs): Declare.
|
||||||
|
(include_dir_count,include_dir_maxlen): Declare.
|
||||||
|
|
||||||
Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com>
|
Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* listing.c (buffer_line): If we can't open the file, set at_end.
|
* listing.c (buffer_line): If we can't open the file, set at_end.
|
||||||
|
81
gas/read.c
81
gas/read.c
@ -1,5 +1,5 @@
|
|||||||
/* read.c - read a source file -
|
/* read.c - read a source file -
|
||||||
Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 1997
|
Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -165,12 +165,12 @@ static char *old_buffer; /* JF a hack */
|
|||||||
static char *old_input;
|
static char *old_input;
|
||||||
static char *old_limit;
|
static char *old_limit;
|
||||||
|
|
||||||
/* Variables for handling include file directory list. */
|
/* Variables for handling include file directory table. */
|
||||||
|
|
||||||
char **include_dirs; /* List of pointers to directories to
|
char **include_dirs; /* Table of pointers to directories to
|
||||||
search for .include's */
|
search for .include's */
|
||||||
int include_dir_count; /* How many are in the list */
|
int include_dir_count; /* How many are in the table */
|
||||||
int include_dir_maxlen = 1;/* Length of longest in list */
|
int include_dir_maxlen = 1;/* Length of longest in table */
|
||||||
|
|
||||||
#ifndef WORKING_DOT_WORD
|
#ifndef WORKING_DOT_WORD
|
||||||
struct broken_word *broken_words;
|
struct broken_word *broken_words;
|
||||||
@ -197,6 +197,15 @@ symbolS *mri_common_symbol;
|
|||||||
may be needed. */
|
may be needed. */
|
||||||
static int mri_pending_align;
|
static int mri_pending_align;
|
||||||
|
|
||||||
|
#ifndef NO_LISTING
|
||||||
|
#ifdef OBJ_ELF
|
||||||
|
/* This variable is set to be non-zero if the next string we see might
|
||||||
|
be the name of the source file in DWARF debugging information. See
|
||||||
|
the comment in emit_expr for the format we look for. */
|
||||||
|
static int dwarf_file_string;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static void cons_worker PARAMS ((int, int));
|
static void cons_worker PARAMS ((int, int));
|
||||||
static int scrub_from_string PARAMS ((char **));
|
static int scrub_from_string PARAMS ((char **));
|
||||||
static void do_align PARAMS ((int, char *, int, int));
|
static void do_align PARAMS ((int, char *, int, int));
|
||||||
@ -3263,6 +3272,45 @@ emit_expr (exp, nbytes)
|
|||||||
else
|
else
|
||||||
dwarf_line = -1;
|
dwarf_line = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When gcc emits DWARF 1 debugging pseudo-ops, a file name will
|
||||||
|
appear as a 2 byte TAG_compile_unit (0x11) followed by a 2 byte
|
||||||
|
AT_sibling (0x12) followed by a four byte address of the sibling
|
||||||
|
followed by a 2 byte AT_name (0x38) followed by the name of the
|
||||||
|
file. We look for that case here. */
|
||||||
|
{
|
||||||
|
static int dwarf_file = 0;
|
||||||
|
|
||||||
|
if (strcmp (segment_name (now_seg), ".debug") != 0)
|
||||||
|
dwarf_file = 0;
|
||||||
|
else if (dwarf_file == 0
|
||||||
|
&& nbytes == 2
|
||||||
|
&& exp->X_op == O_constant
|
||||||
|
&& exp->X_add_number == 0x11)
|
||||||
|
dwarf_file = 1;
|
||||||
|
else if (dwarf_file == 1
|
||||||
|
&& nbytes == 2
|
||||||
|
&& exp->X_op == O_constant
|
||||||
|
&& exp->X_add_number == 0x12)
|
||||||
|
dwarf_file = 2;
|
||||||
|
else if (dwarf_file == 2
|
||||||
|
&& nbytes == 4)
|
||||||
|
dwarf_file = 3;
|
||||||
|
else if (dwarf_file == 3
|
||||||
|
&& nbytes == 2
|
||||||
|
&& exp->X_op == O_constant
|
||||||
|
&& exp->X_add_number == 0x38)
|
||||||
|
dwarf_file = 4;
|
||||||
|
else
|
||||||
|
dwarf_file = 0;
|
||||||
|
|
||||||
|
/* The variable dwarf_file_string tells stringer that the string
|
||||||
|
may be the name of the source file. */
|
||||||
|
if (dwarf_file == 4)
|
||||||
|
dwarf_file_string = 1;
|
||||||
|
else
|
||||||
|
dwarf_file_string = 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4328,11 +4376,14 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
|
|||||||
#ifndef NO_LISTING
|
#ifndef NO_LISTING
|
||||||
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
||||||
/* In ELF, when gcc is emitting DWARF 1 debugging output, it
|
/* In ELF, when gcc is emitting DWARF 1 debugging output, it
|
||||||
will emit .string with a filename in the .debug_sfnames
|
will emit .string with a filename in the .debug section
|
||||||
section to indicate a file name. I don't know if this
|
after a sequence of constants. See the comment in
|
||||||
will work for compilers other than gcc, and I don't know
|
emit_expr for the sequence. emit_expr will set
|
||||||
if it will work for DWARF 2. */
|
dwarf_file_string to non-zero if this string might be a
|
||||||
if (strcmp (segment_name (now_seg), ".debug_sfnames") == 0)
|
source file name. */
|
||||||
|
if (strcmp (segment_name (now_seg), ".debug") != 0)
|
||||||
|
dwarf_file_string = 0;
|
||||||
|
else if (dwarf_file_string)
|
||||||
{
|
{
|
||||||
c = input_line_pointer[-1];
|
c = input_line_pointer[-1];
|
||||||
input_line_pointer[-1] = '\0';
|
input_line_pointer[-1] = '\0';
|
||||||
@ -4699,7 +4750,15 @@ s_include (arg)
|
|||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
if (! flag_m68k_mri)
|
if (! flag_m68k_mri)
|
||||||
filename = demand_copy_string (&i);
|
{
|
||||||
|
filename = demand_copy_string (&i);
|
||||||
|
if (filename == NULL)
|
||||||
|
{
|
||||||
|
/* demand_copy_string has already printed an error and
|
||||||
|
called ignore_rest_of_line. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SKIP_WHITESPACE ();
|
SKIP_WHITESPACE ();
|
||||||
|
Reference in New Issue
Block a user