diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-01-04 20:58:03 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-01-04 20:58:03 +0100 |
commit | 5dc28f42b4522c1ba7446174282496a3e54014d2 (patch) | |
tree | af140ca4a2f43d4298d8e2199c1b85c8ba511715 /gcc/dwarf2out.c | |
parent | 03a9ba1e28339288fcbdbb3a70f6487a88104df7 (diff) | |
download | gcc-5dc28f42b4522c1ba7446174282496a3e54014d2.zip gcc-5dc28f42b4522c1ba7446174282496a3e54014d2.tar.gz gcc-5dc28f42b4522c1ba7446174282496a3e54014d2.tar.bz2 |
re PR debug/51695 (NOTE_INSN_VAR_LOCATION notes are sometimes too large)
PR debug/51695
* dwarf2out.c (output_loc_list): For now drop >= 64KB expressions
in .debug_loc on the floor.
* gcc.dg/pr51695.c: New test.
From-SVN: r182886
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d8c1817..f9f4295 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8166,6 +8166,13 @@ output_loc_list (dw_loc_list_ref list_head) /* Don't output an entry that starts and ends at the same address. */ if (strcmp (curr->begin, curr->end) == 0 && !curr->force) continue; + size = size_of_locs (curr->expr); + /* If the expression is too large, drop it on the floor. We could + perhaps put it into DW_TAG_dwarf_procedure and refer to that + in the expression, but >= 64KB expressions for a single value + in a single range are unlikely very useful. */ + if (size > 0xffff) + continue; if (!have_multiple_function_sections) { dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section, @@ -8184,7 +8191,6 @@ output_loc_list (dw_loc_list_ref list_head) "Location list end address (%s)", list_head->ll_symbol); } - size = size_of_locs (curr->expr); /* Output the block length for this list of location operations. */ gcc_assert (size <= 0xffff); |