do \
{ \
if (offset > 1 \
- && string[0] != 0 \
- && string[1] == ':') \
+ && string[0] != 0 \
+ && string[1] == ':') \
string [offset] = '\\'; \
else \
string [offset] = '/'; \
*line = current;
}
-/* A hook to allow the target backend to inform the line number state
+/* A hook to allow the target backend to inform the line number state
machine of isa changes when assembler debug info is enabled. */
void
{
struct dwarf2_line_info loc;
- if (dwarf2_loc_directive_seen)
- {
- /* Use the last location established by a .loc directive, not
- the value returned by dwarf2_where(). That calls as_where()
- which will return either the logical input file name (foo.c)
- or the physical input file name (foo.s) and not the file name
- specified in the most recent .loc directive (eg foo.h). */
- loc = current;
- }
- else if (debug_type != DEBUG_DWARF2)
+ if (!dwarf2_loc_directive_seen && debug_type != DEBUG_DWARF2)
return;
- else
- dwarf2_where (&loc);
+
+ dwarf2_where (&loc);
dwarf2_gen_line_info (frag_now_fix () - size, &loc);
dwarf2_consume_line_info ();
{
/* Unless we generate DWARF2 debugging information for each
assembler line, we only emit one line symbol for one LOC. */
- if (debug_type != DEBUG_DWARF2)
- dwarf2_loc_directive_seen = FALSE;
+ dwarf2_loc_directive_seen = FALSE;
current.flags &= ~(DWARF2_FLAG_BASIC_BLOCK
| DWARF2_FLAG_PROLOGUE_END
return;
if (!(bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE))
return;
-
- if (debug_type == DEBUG_DWARF2)
- dwarf2_where (&loc);
- else
- loc = current;
+ if (files_in_use == 0 && debug_type != DEBUG_DWARF2)
+ return;
+
+ dwarf2_where (&loc);
loc.flags |= DWARF2_FLAG_BASIC_BLOCK;
- dwarf2_consume_line_info ();
dwarf2_gen_line_info_1 (label, &loc);
+ dwarf2_consume_line_info ();
}
/* Get a .debug_line file number for FILENAME. If NUM is nonzero,
}
else if (strcmp (p, "isa") == 0)
{
- *input_line_pointer = c;
+ *input_line_pointer = c;
value = get_absolute_expression ();
if (value >= 0)
current.isa = value;
else
{
as_bad (_("unknown .loc sub-directive `%s'"), p);
- *input_line_pointer = c;
+ *input_line_pointer = c;
return;
}
subseg_set (ranges_seg, 0);
/* Base Address Entry. */
- for (i = 0; i < addr_size; i++)
+ for (i = 0; i < addr_size; i++)
out_byte (0xff);
- for (i = 0; i < addr_size; i++)
+ for (i = 0; i < addr_size; i++)
out_byte (0);
/* Range List Entry. */
}
/* End of Range Entry. */
- for (i = 0; i < addr_size; i++)
+ for (i = 0; i < addr_size; i++)
out_byte (0);
- for (i = 0; i < addr_size; i++)
+ for (i = 0; i < addr_size; i++)
out_byte (0);
}
on the command line, so assume files[1] is the main input file.
We're not supposed to get called unless at least one line number
entry was emitted, so this should always be defined. */
- if (!files || files_in_use < 1)
+ if (files_in_use == 0)
abort ();
if (files[1].dir)
{
segT ranges_seg;
assert (all_segs);
-
+
info_seg = subseg_new (".debug_info", 0);
abbrev_seg = subseg_new (".debug_abbrev", 0);
aranges_seg = subseg_new (".debug_aranges", 0);
else
{
ranges_seg = subseg_new (".debug_ranges", 0);
- bfd_set_section_flags (stdoutput, ranges_seg,
+ bfd_set_section_flags (stdoutput, ranges_seg,
SEC_READONLY | SEC_DEBUGGING);
record_alignment (ranges_seg, ffs (2 * sizeof_address) - 1);
out_debug_ranges (ranges_seg);