(dwarf2_gen_line_info): Kill unused variables.
(dwarf2_finish): Likewise.
(dwarf2_where): Likewise.
(dwarf2_directive_file): If we've only got a string,
hand off to s_app_file.
* ecoff.c: Move the include of ecoff.h.
* symbols.h (S_IS_FUNCTION): Prototype.
* read.c (LEX_HASH): Supply a default.
(lex_type): Use it.
(s_globl): Update `c' after skipping whitespace.
* read.h (LEX_END_NAME, is_name_ender): New.
* expr.c (get_symbol_end): Respect it.
+1999-06-05 Richard Henderson <rth@cygnus.com>
+
+ * dwarf2dbg.c (*): Convert to K&R + prototypes.
+ (dwarf2_gen_line_info): Kill unused variables.
+ (dwarf2_finish): Likewise.
+ (dwarf2_where): Likewise.
+ (dwarf2_directive_file): If we've only got a string,
+ hand off to s_app_file.
+ * ecoff.c: Move the include of ecoff.h.
+ * symbols.h (S_IS_FUNCTION): Prototype.
+
+ * read.c (LEX_HASH): Supply a default.
+ (lex_type): Use it.
+ (s_globl): Update `c' after skipping whitespace.
+ * read.h (LEX_END_NAME, is_name_ender): New.
+ * expr.c (get_symbol_end): Respect it.
+
1999-06-04 Mark Klein <mklein@dis.com>
* config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol
},
};
+
+/* Function prototypes: */
+static void out_uleb128 PARAMS ((bfd_vma));
+static void out_sleb128 PARAMS ((bfd_signed_vma));
+static void gen_addr_line PARAMS ((int, bfd_vma));
+static void reset_state_machine PARAMS ((void));
+static void out_set_addr PARAMS ((bfd_vma));
+static void out_end_sequence PARAMS ((void));
+static int get_filenum PARAMS ((int, char *));
+static void gen_dir_list PARAMS ((void));
+static void gen_file_list PARAMS ((void));
+static void print_stats PARAMS ((unsigned long));
+
+
#define out_byte(byte) FRAG_APPEND_1_CHAR(byte)
#define out_opcode(opc) (out_byte ((opc)), ++ls.opcode_hist[(opc) & 0xff])
/* Output an unsigned "little-endian base 128" number. */
static void
-out_uleb128 (bfd_vma value)
+out_uleb128 (value)
+ bfd_vma value;
{
unsigned char byte, more = 0x80;
/* Output a signed "little-endian base 128" number. */
static void
-out_sleb128 (bfd_signed_vma value)
+out_sleb128 (value)
+ bfd_signed_vma value;
{
unsigned char byte, more = 0x80;
Note that the line skip is signed, whereas the address skip is
unsigned. */
static void
-gen_addr_line (int line_delta, bfd_vma addr_delta)
+gen_addr_line (line_delta, addr_delta)
+ int line_delta;
+ bfd_vma addr_delta;
{
unsigned int tmp, opcode;
}
static void
-reset_state_machine (void)
+reset_state_machine ()
{
static const struct dwarf2_sm initial_state = { INITIAL_STATE };
/* Set an absolute address (may results in a relocation entry): */
static void
-out_set_addr (bfd_vma addr)
+out_set_addr (addr)
+ bfd_vma addr;
{
subsegT saved_subseg;
segT saved_seg;
/* Emit DW_LNS_end_sequence and reset state machine. Does not
preserve the current segment/sub-segment! */
static void
-out_end_sequence (void)
+out_end_sequence ()
{
bfd_vma addr, delta;
precedence. If the filename cannot be found, it is added to the
filetable the filenumber for the new entry is returned. */
static int
-get_filenum (int filenum, char *file)
+get_filenum (filenum, file)
+ int filenum;
+ char *file;
{
int i, last = filenum - 1;
char char0 = file[0];
}
void
-dwarf2_gen_line_info (bfd_vma addr, struct dwarf2_line_info *l)
+dwarf2_gen_line_info (addr, l)
+ bfd_vma addr;
+ struct dwarf2_line_info *l;
{
unsigned int filenum = l->filenum;
unsigned int any_output = 0;
subsegT saved_subseg;
segT saved_seg;
- char *frag;
if (flag_debug)
- fprintf (stderr, "line: addr %llx file `%s' line %u col %u flags %lx\n",
+ fprintf (stderr, "line: addr %llx file `%s' line %u col %u flags %x\n",
(long long) addr, l->filename, l->line, l->column, l->flags);
if (filenum > 0 && !l->filename)
}
static void
-gen_dir_list (void)
+gen_dir_list ()
{
char *str, *slash, *dir_list, *dp, *cp;
int i, j, num_dirs;
}
static void
-gen_file_list (void)
+gen_file_list ()
{
size_t size;
char *cp;
out_byte (0); /* terminate filename list */
}
-void
-print_stats (unsigned long total_size)
+static void
+print_stats (total_size)
+ unsigned long total_size;
{
static const char *opc_name[] =
{
}
void
-dwarf2_finish (void)
+dwarf2_finish ()
{
- bfd_vma addr, body_size, total_size, prolog_size;
- subsegT saved_subseg, line_prolog;
+ bfd_vma body_size, total_size, prolog_size;
+ subsegT saved_subseg;
segT saved_seg;
char *cp;
}
void
-dwarf2_directive_file (int dummy)
+dwarf2_directive_file (dummy)
+ int dummy;
{
int len;
+ /* Continue to accept a bare string and pass it off. */
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '"')
+ {
+ s_app_file (0);
+ return;
+ }
+
ls.any_dwarf2_directives = 1;
if (debug_type == DEBUG_NONE)
}
void
-dwarf2_directive_loc (int dummy)
+dwarf2_directive_loc (dummy)
+ int dummy;
{
ls.any_dwarf2_directives = 1;
}
void
-dwarf2_where (struct dwarf2_line_info *line)
+dwarf2_where (line)
+ struct dwarf2_line_info *line;
{
if (ls.any_dwarf2_directives)
*line = ls.current;
else
{
- char *filename;
-
as_where (&line->filename, &line->line);
line->filenum = 0;
line->column = 0;
ECOFF debugging information (e.g., MIPS ECOFF, MIPS ELF, Alpha
ECOFF). */
+#include "ecoff.h"
+
#ifdef ECOFF_DEBUGGING
#include "coff/internal.h"
#include "coff/symconst.h"
-#include "ecoff.h"
#include "aout/stab_gnu.h"
#include <ctype.h>
/* We accept \001 in a name in case this is being called with a
constructed string. */
if (is_name_beginner (c = *input_line_pointer++) || c == '\001')
- while (is_part_of_name (c = *input_line_pointer++)
- || c == '\001')
- ;
+ {
+ while (is_part_of_name (c = *input_line_pointer++)
+ || c == '\001')
+ ;
+ if (is_name_ender (c))
+ c = *input_line_pointer++;
+ }
*--input_line_pointer = 0;
return (c);
}
#define LEX_QM 0
#endif
+#ifndef LEX_HASH
+#define LEX_HASH 0
+#endif
+
#ifndef LEX_DOLLAR
/* The a29k assembler does not permits labels to start with $. */
#define LEX_DOLLAR 3
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ[\]^_ */
- 0, 0, 0, 0, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
+ 0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, LEX_QM, /* 0123456789:;<=>? */
LEX_AT, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* @ABCDEFGHIJKLMNO */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, 0, 3, /* PQRSTUVWXYZ[\]^_ */
name = input_line_pointer;
c = get_symbol_end ();
symbolP = symbol_find_or_make (name);
+ S_SET_EXTERNAL (symbolP);
+
*input_line_pointer = c;
SKIP_WHITESPACE ();
- S_SET_EXTERNAL (symbolP);
+ c = *input_line_pointer;
if (c == ',')
{
input_line_pointer++;
#define LEX_NAME (1) /* may continue a name */
#define LEX_BEGIN_NAME (2) /* may begin a name */
+#define LEX_END_NAME (4) /* ends a name */
#define is_name_beginner(c) \
( lex_type[(unsigned char) (c)] & LEX_BEGIN_NAME )
#define is_part_of_name(c) \
( lex_type[(unsigned char) (c)] & LEX_NAME )
+#define is_name_ender(c) \
+ ( lex_type[(unsigned char) (c)] & LEX_END_NAME )
#ifndef is_a_char
#define CHAR_MASK (0xff)
extern void S_SET_VALUE PARAMS ((symbolS *, valueT));
#ifdef BFD_ASSEMBLER
+extern int S_IS_FUNCTION PARAMS ((symbolS *));
extern int S_IS_EXTERNAL PARAMS ((symbolS *));
extern int S_IS_WEAK PARAMS ((symbolS *));
extern int S_IS_COMMON PARAMS ((symbolS *));