Patchwork [6/6] Update gdb hooks to reflect changes to gimple types

login
register
mail settings
Submitter David Malcolm
Date Oct. 31, 2013, 4:26 p.m.
Message ID <1383236801-13234-7-git-send-email-dmalcolm@redhat.com>
Download mbox | patch
Permalink /patch/287556/
State New
Headers show

Comments

David Malcolm - Oct. 31, 2013, 4:26 p.m.
gcc/
	* gdbhooks.py (GimplePrinter.to_string): Update lookup of
	code field to reflect inheritance, rather than embedding of
	the base gimple type.
---
 gcc/gdbhooks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jeff Law - Nov. 14, 2013, 7:23 a.m.
On 10/31/13 10:26, David Malcolm wrote:
> gcc/
> 	* gdbhooks.py (GimplePrinter.to_string): Update lookup of
> 	code field to reflect inheritance, rather than embedding of
> 	the base gimple type.
Conditionally approved.  Obvious condition is the other 5 patches get 
approved.

Jeff

Patch

diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py
index 53abf32..c05e574 100644
--- a/gcc/gdbhooks.py
+++ b/gcc/gdbhooks.py
@@ -240,7 +240,7 @@  class GimplePrinter:
     def to_string (self):
         if long(self.gdbval) == 0:
             return '<gimple 0x0>'
-        val_gimple_code = self.gdbval['gsbase']['code']
+        val_gimple_code = self.gdbval['code']
         val_gimple_code_name = gdb.parse_and_eval('gimple_code_name')
         val_code_name = val_gimple_code_name[long(val_gimple_code)]
         result = '<%s 0x%x' % (val_code_name.string(),