summaryrefslogtreecommitdiffstats
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2003-11-21 13:28:35 +0000
committerKazu Hirata <kazu@codesourcery.com>2003-11-21 13:28:35 +0000
commita2e224686a3a8de934930c0be2160f87c9b86e76 (patch)
tree1069029743836ae18db1ed33eee65e90de91f355 /gas/dwarf2dbg.c
parent73ee5e4c0ff04c02e128f721fa63468cc687c14e (diff)
downloadppe42-binutils-a2e224686a3a8de934930c0be2160f87c9b86e76.tar.gz
ppe42-binutils-a2e224686a3a8de934930c0be2160f87c9b86e76.zip
* depend.c: Convert to ISO-C.
* dwarf2dbg.c: Likewise. * dwarf2dbg.h: Likewise.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c164
1 files changed, 59 insertions, 105 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index d1b3cf8034..8a232c5733 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -156,40 +156,38 @@ static struct dwarf2_line_info current;
/* The size of an address on the target. */
static unsigned int sizeof_address;
-static struct line_subseg *get_line_subseg PARAMS ((segT, subsegT));
-static unsigned int get_filenum PARAMS ((const char *, unsigned int));
-static struct frag *first_frag_for_seg PARAMS ((segT));
-static struct frag *last_frag_for_seg PARAMS ((segT));
-static void out_byte PARAMS ((int));
-static void out_opcode PARAMS ((int));
-static void out_two PARAMS ((int));
-static void out_four PARAMS ((int));
-static void out_abbrev PARAMS ((int, int));
-static void out_uleb128 PARAMS ((addressT));
-static offsetT get_frag_fix PARAMS ((fragS *));
-static void out_set_addr PARAMS ((segT, fragS *, addressT));
-static int size_inc_line_addr PARAMS ((int, addressT));
-static void emit_inc_line_addr PARAMS ((int, addressT, char *, int));
-static void out_inc_line_addr PARAMS ((int, addressT));
-static void relax_inc_line_addr PARAMS ((int, segT, fragS *, addressT,
- fragS *, addressT));
-static void process_entries PARAMS ((segT, struct line_entry *));
-static void out_file_list PARAMS ((void));
-static void out_debug_line PARAMS ((segT));
-static void out_debug_aranges PARAMS ((segT, segT));
-static void out_debug_abbrev PARAMS ((segT));
-static void out_debug_info PARAMS ((segT, segT, segT));
+static struct line_subseg *get_line_subseg (segT, subsegT);
+static unsigned int get_filenum (const char *, unsigned int);
+static struct frag *first_frag_for_seg (segT);
+static struct frag *last_frag_for_seg (segT);
+static void out_byte (int);
+static void out_opcode (int);
+static void out_two (int);
+static void out_four (int);
+static void out_abbrev (int, int);
+static void out_uleb128 (addressT);
+static offsetT get_frag_fix (fragS *);
+static void out_set_addr (segT, fragS *, addressT);
+static int size_inc_line_addr (int, addressT);
+static void emit_inc_line_addr (int, addressT, char *, int);
+static void out_inc_line_addr (int, addressT);
+static void relax_inc_line_addr (int, segT, fragS *, addressT,
+ fragS *, addressT);
+static void process_entries (segT, struct line_entry *);
+static void out_file_list (void);
+static void out_debug_line (segT);
+static void out_debug_aranges (segT, segT);
+static void out_debug_abbrev (segT);
+static void out_debug_info (segT, segT, segT);
#ifndef TC_DWARF2_EMIT_OFFSET
# define TC_DWARF2_EMIT_OFFSET generic_dwarf2_emit_offset
-static void generic_dwarf2_emit_offset PARAMS ((symbolS *, unsigned int));
+static void generic_dwarf2_emit_offset (symbolS *, unsigned int);
/* Create an offset to .dwarf2_*. */
static void
-generic_dwarf2_emit_offset (symbol, size)
- symbolS *symbol;
- unsigned int size;
+generic_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
{
expressionS expr;
@@ -203,9 +201,7 @@ generic_dwarf2_emit_offset (symbol, size)
/* Find or create an entry for SEG+SUBSEG in ALL_SEGS. */
static struct line_subseg *
-get_line_subseg (seg, subseg)
- segT seg;
- subsegT subseg;
+get_line_subseg (segT seg, subsegT subseg)
{
static segT last_seg;
static subsegT last_subseg;
@@ -254,9 +250,7 @@ get_line_subseg (seg, subseg)
/* Record an entry for LOC ocurring at OFS within the current fragment. */
void
-dwarf2_gen_line_info (ofs, loc)
- addressT ofs;
- struct dwarf2_line_info *loc;
+dwarf2_gen_line_info (addressT ofs, struct dwarf2_line_info *loc)
{
struct line_subseg *ss;
struct line_entry *e;
@@ -290,8 +284,7 @@ dwarf2_gen_line_info (ofs, loc)
}
void
-dwarf2_where (line)
- struct dwarf2_line_info *line;
+dwarf2_where (struct dwarf2_line_info *line)
{
if (debug_type == DEBUG_DWARF2)
{
@@ -311,8 +304,7 @@ dwarf2_where (line)
for, emit a line statement appropriately. */
void
-dwarf2_emit_insn (size)
- int size;
+dwarf2_emit_insn (int size)
{
struct dwarf2_line_info loc;
@@ -343,9 +335,7 @@ dwarf2_emit_insn (size)
empty one. */
static unsigned int
-get_filenum (filename, num)
- const char *filename;
- unsigned int num;
+get_filenum (const char *filename, unsigned int num)
{
static unsigned int last_used, last_used_dir_len;
const char *file;
@@ -444,8 +434,7 @@ get_filenum (filename, num)
If an entry is added to the file table, return a pointer to the filename. */
char *
-dwarf2_directive_file (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dwarf2_directive_file (int dummy ATTRIBUTE_UNUSED)
{
offsetT num;
char *filename;
@@ -481,8 +470,7 @@ dwarf2_directive_file (dummy)
}
void
-dwarf2_directive_loc (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
{
offsetT filenum, line, column;
@@ -534,8 +522,7 @@ dwarf2_directive_loc (dummy)
}
static struct frag *
-first_frag_for_seg (seg)
- segT seg;
+first_frag_for_seg (segT seg)
{
frchainS *f, *first = NULL;
@@ -548,8 +535,7 @@ first_frag_for_seg (seg)
}
static struct frag *
-last_frag_for_seg (seg)
- segT seg;
+last_frag_for_seg (segT seg)
{
frchainS *f, *last = NULL;
@@ -564,8 +550,7 @@ last_frag_for_seg (seg)
/* Emit a single byte into the current segment. */
static inline void
-out_byte (byte)
- int byte;
+out_byte (int byte)
{
FRAG_APPEND_1_CHAR (byte);
}
@@ -573,8 +558,7 @@ out_byte (byte)
/* Emit a statement program opcode into the current segment. */
static inline void
-out_opcode (opc)
- int opc;
+out_opcode (int opc)
{
out_byte (opc);
}
@@ -582,8 +566,7 @@ out_opcode (opc)
/* Emit a two-byte word into the current segment. */
static inline void
-out_two (data)
- int data;
+out_two (int data)
{
md_number_to_chars (frag_more (2), data, 2);
}
@@ -591,8 +574,7 @@ out_two (data)
/* Emit a four byte word into the current segment. */
static inline void
-out_four (data)
- int data;
+out_four (int data)
{
md_number_to_chars (frag_more (4), data, 4);
}
@@ -600,8 +582,7 @@ out_four (data)
/* Emit an unsigned "little-endian base 128" number. */
static void
-out_uleb128 (value)
- addressT value;
+out_uleb128 (addressT value)
{
output_leb128 (frag_more (sizeof_leb128 (value, 0)), value, 0);
}
@@ -609,8 +590,7 @@ out_uleb128 (value)
/* Emit a tuple for .debug_abbrev. */
static inline void
-out_abbrev (name, form)
- int name, form;
+out_abbrev (int name, int form)
{
out_uleb128 (name);
out_uleb128 (form);
@@ -619,8 +599,7 @@ out_abbrev (name, form)
/* Get the size of a fragment. */
static offsetT
-get_frag_fix (frag)
- fragS *frag;
+get_frag_fix (fragS *frag)
{
frchainS *fr;
@@ -640,10 +619,7 @@ get_frag_fix (frag)
/* Set an absolute address (may result in a relocation entry). */
static void
-out_set_addr (seg, frag, ofs)
- segT seg;
- fragS *frag;
- addressT ofs;
+out_set_addr (segT seg, fragS *frag, addressT ofs)
{
expressionS expr;
symbolS *sym;
@@ -661,7 +637,7 @@ out_set_addr (seg, frag, ofs)
}
#if DWARF2_LINE_MIN_INSN_LENGTH > 1
-static void scale_addr_delta PARAMS ((addressT *));
+static void scale_addr_delta (addressT *);
static void
scale_addr_delta (addr_delta)
@@ -688,9 +664,7 @@ scale_addr_delta (addr_delta)
exactly the expected number of bytes. */
static int
-size_inc_line_addr (line_delta, addr_delta)
- int line_delta;
- addressT addr_delta;
+size_inc_line_addr (int line_delta, addressT addr_delta)
{
unsigned int tmp, opcode;
int len = 0;
@@ -749,11 +723,7 @@ size_inc_line_addr (line_delta, addr_delta)
}
static void
-emit_inc_line_addr (line_delta, addr_delta, p, len)
- int line_delta;
- addressT addr_delta;
- char *p;
- int len;
+emit_inc_line_addr (int line_delta, addressT addr_delta, char *p, int len)
{
unsigned int tmp, opcode;
int need_copy = 0;
@@ -844,9 +814,7 @@ emit_inc_line_addr (line_delta, addr_delta, p, len)
/* Handy routine to combine calls to the above two routines. */
static void
-out_inc_line_addr (line_delta, addr_delta)
- int line_delta;
- addressT addr_delta;
+out_inc_line_addr (int line_delta, addressT addr_delta)
{
int len = size_inc_line_addr (line_delta, addr_delta);
emit_inc_line_addr (line_delta, addr_delta, frag_more (len), len);
@@ -856,11 +824,9 @@ out_inc_line_addr (line_delta, addr_delta)
increments between fragments of the target segment. */
static void
-relax_inc_line_addr (line_delta, seg, to_frag, to_ofs, from_frag, from_ofs)
- int line_delta;
- segT seg;
- fragS *to_frag, *from_frag;
- addressT to_ofs, from_ofs;
+relax_inc_line_addr (int line_delta, segT seg,
+ fragS *to_frag, addressT to_ofs,
+ fragS *from_frag, addressT from_ofs)
{
symbolS *to_sym, *from_sym;
expressionS expr;
@@ -887,8 +853,7 @@ relax_inc_line_addr (line_delta, seg, to_frag, to_ofs, from_frag, from_ofs)
the relaxation loop. We set fr_subtype to the expected length. */
int
-dwarf2dbg_estimate_size_before_relax (frag)
- fragS *frag;
+dwarf2dbg_estimate_size_before_relax (fragS *frag)
{
offsetT addr_delta;
int size;
@@ -906,8 +871,7 @@ dwarf2dbg_estimate_size_before_relax (frag)
of the frag. This returns the change in frag length. */
int
-dwarf2dbg_relax_frag (frag)
- fragS *frag;
+dwarf2dbg_relax_frag (fragS *frag)
{
int old_size, new_size;
@@ -922,8 +886,7 @@ dwarf2dbg_relax_frag (frag)
fr_subtype will be the desired length of the frag. */
void
-dwarf2dbg_convert_frag (frag)
- fragS *frag;
+dwarf2dbg_convert_frag (fragS *frag)
{
offsetT addr_diff;
@@ -947,9 +910,7 @@ dwarf2dbg_convert_frag (frag)
beginning at E, for segment SEG. */
static void
-process_entries (seg, e)
- segT seg;
- struct line_entry *e;
+process_entries (segT seg, struct line_entry *e)
{
unsigned filenum = 1;
unsigned line = 1;
@@ -1041,7 +1002,7 @@ process_entries (seg, e)
/* Emit the directory and file tables for .debug_line. */
static void
-out_file_list ()
+out_file_list (void)
{
size_t size;
char *cp;
@@ -1083,8 +1044,7 @@ out_file_list ()
/* Emit the collected .debug_line data. */
static void
-out_debug_line (line_seg)
- segT line_seg;
+out_debug_line (segT line_seg)
{
expressionS expr;
symbolS *line_start;
@@ -1172,9 +1132,7 @@ out_debug_line (line_seg)
/* Emit data for .debug_aranges. */
static void
-out_debug_aranges (aranges_seg, info_seg)
- segT aranges_seg;
- segT info_seg;
+out_debug_aranges (segT aranges_seg, segT info_seg)
{
unsigned int addr_size = sizeof_address;
addressT size, skip;
@@ -1250,8 +1208,7 @@ out_debug_aranges (aranges_seg, info_seg)
sync with out_debug_info below. */
static void
-out_debug_abbrev (abbrev_seg)
- segT abbrev_seg;
+out_debug_abbrev (segT abbrev_seg)
{
subseg_set (abbrev_seg, 0);
@@ -1277,10 +1234,7 @@ out_debug_abbrev (abbrev_seg)
/* Emit a description of this compilation unit for .debug_info. */
static void
-out_debug_info (info_seg, abbrev_seg, line_seg)
- segT info_seg;
- segT abbrev_seg;
- segT line_seg;
+out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg)
{
char producer[128];
char *comp_dir;
@@ -1397,7 +1351,7 @@ out_debug_info (info_seg, abbrev_seg, line_seg)
}
void
-dwarf2_finish ()
+dwarf2_finish (void)
{
segT line_seg;
struct line_seg *s;
OpenPOWER on IntegriCloud