aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-12-04 23:07:26 +0000
committerMichael Snyder <msnyder@vmware.com>2001-12-04 23:07:26 +0000
commit1ea5c32521e1acff5f3fb8d40e113655a0682234 (patch)
tree55f2989c66699696f53060c14480dbbc1e4a1453 /gas/dwarf2dbg.c
parentbafae9c48de1793fa374b55b905136a3cd7486a1 (diff)
downloadgdb-1ea5c32521e1acff5f3fb8d40e113655a0682234.zip
gdb-1ea5c32521e1acff5f3fb8d40e113655a0682234.tar.gz
gdb-1ea5c32521e1acff5f3fb8d40e113655a0682234.tar.bz2
2001-11-16 Michael Snyder <msnyder@redhat.com>
* stabs.c (stabs_generate_asm_lineno): Remember file and line number from one call to the next, and eliminate consecutive duplicates (thereby emitting only one line symbol per source line). * dwarf2dbg.c (dwarf2_gen_line_info): Ditto.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 9807e5e..6e62206 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -230,11 +230,20 @@ dwarf2_gen_line_info (ofs, loc)
{
struct line_subseg *ss;
struct line_entry *e;
+ static unsigned int line = -1;
+ static unsigned int filenum = -1;
/* Early out for as-yet incomplete location information. */
if (loc->filenum == 0 || loc->line == 0)
return;
+ /* Don't emit sequences of line symbols for the same line. */
+ if (line == loc->line && filenum == loc->filenum)
+ return;
+
+ line = loc->line;
+ filenum = loc->filenum;
+
e = (struct line_entry *) xmalloc (sizeof (*e));
e->next = NULL;
e->frag = frag_now;