#include "dwarf2dbg.h"
#include "subsegs.h"
-#include <elf/dwarf2.h>
+#include "elf/dwarf2.h"
/* Since we can't generate the prolog until the body is complete, we
use three different subsegments for .debug_line: one holding the
{
INITIAL_STATE
},
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ NULL,
+ { NULL, 0, 0, 0, 0 },
+ 0,
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
};
int i, last = filenum - 1;
char char0 = file[0];
- if ((unsigned) last >= ls.num_filenames)
+ if (last >= ls.num_filenames)
last = ls.last_filename;
/* do a quick check against the previously used filename: */
segT saved_seg;
if (flag_debug)
- 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);
+ fprintf (stderr, "line: addr %lx file `%s' line %u col %u flags %x\n",
+ (unsigned long) addr, l->filename, l->line, l->column, l->flags);
if (filenum > 0 && !l->filename)
{
- if (filenum >= ls.num_filenames)
+ if (filenum >= (unsigned int) ls.num_filenames)
{
as_warn ("Encountered bad file number in line number debug info!");
return;
any_output = 1;
if (addr < ls.sm.addr)
{
- if (!ls.sm.empty_sequence)
- {
- out_end_sequence ();
- ls.sm.empty_sequence = 1;
- }
+ /* This happens when a new frag got allocated (for whatever
+ reason). Deal with it by generating a reference symbol.
+ Note: no end_sequence needs to be generated because the
+ address did not really decrease (only the reference point
+ changed).
+
+ ??? Perhaps we should directly check for a change of
+ frag_now instead? */
out_set_addr (addr);
ls.sm.addr = addr;
}
{
if (strcmp (str, dp) == 0)
{
- ls.file[i].dir = j;
+ ls.file[i].dir = j + 1;
break;
}
dp += strlen (dp);
"set_column", "negate_stmt", "set_basic_block", "const_add_pc",
"fixed_advance_pc"
};
- int i, j;
+ size_t i;
+ int j;
fprintf (stderr, "Average size: %g bytes/line\n",
total_size / (double) ls.num_line_entries);
void
dwarf2_directive_file (dummy)
- int dummy;
+ int dummy ATTRIBUTE_UNUSED;
{
int len;
void
dwarf2_directive_loc (dummy)
- int dummy;
+ int dummy ATTRIBUTE_UNUSED;
{
ls.any_dwarf2_directives = 1;