Patchwork [PR53135] Use block4 form for large debug expressions

login
register
mail settings
Submitter Alexandre Oliva
Date Oct. 2, 2012, 7:02 p.m.
Message ID <ortxucg0im.fsf@livre.localdomain>
Download mbox | patch
Permalink /patch/188622/
State New
Headers show

Comments

Alexandre Oliva - Oct. 2, 2012, 7:02 p.m.
This patch fixes a crash in dwarf2out because of a too-large debug
expression.  Jakub approved it for trunk and 4.7 branches in bugzilla.
I'm installing it in the trunk momentarily, and later today on 4.7 after
I give it a spin there.  Regstrapped on x86_64-linux-gnu and
i686-linux-gnu.

I'm keeping the testcase open because we still have an underlying
problem and other improvements to make.

Patch

Use block4 form for large debug expressions.

From: Alexandre Oliva <aoliva@redhat.com>

for  gcc/ChangeLog

	PR debug/53135
	* dwarf2out.c (value_format): Use block4 for dw_val_class_loc
	when needed.
---

 gcc/dwarf2out.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c776f68..25f57c0 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7491,6 +7491,8 @@  value_format (dw_attr_ref a)
 	  return DW_FORM_block1;
 	case 2:
 	  return DW_FORM_block2;
+	case 4:
+	  return DW_FORM_block4;
 	default:
 	  gcc_unreachable ();
 	}