aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-11-14 08:53:08 +0800
committerYao Qi <yao@codesourcery.com>2014-11-14 08:55:06 +0800
commit02ad9cf101803a29d15ea81bb1fdab8a2e82f34f (patch)
treeb74463023bbf32edfa8c7acebf30f9ea0ee98903
parenta8719064e81f8330d3b3e5e504653e19c4131864 (diff)
downloadgdb-02ad9cf101803a29d15ea81bb1fdab8a2e82f34f.zip
gdb-02ad9cf101803a29d15ea81bb1fdab8a2e82f34f.tar.gz
gdb-02ad9cf101803a29d15ea81bb1fdab8a2e82f34f.tar.bz2
New proc _handle_attribute
This patch is to move some code to a new procedure _handle_attribute, which will be used in my following patches. gdb/testsuite: 2014-11-14 Yao Qi <yao@codesourcery.com> * lib/dwarf.exp (_handle_DW_TAG): Move some code to ... (_handle_attribute): New procedure.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/dwarf.exp19
2 files changed, 18 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 405548e..d46f3cc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-14 Yao Qi <yao@codesourcery.com>
+
+ * lib/dwarf.exp (_handle_DW_TAG): Move some code to ...
+ (_handle_attribute): New procedure.
+
2014-11-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
* gdb.ada/cond_lang/foo.c (callme): Add return type.
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 1483271..4986f83 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -461,6 +461,18 @@ namespace eval Dwarf {
return $name
}
+ proc _handle_attribute { attr_name attr_value attr_form } {
+ variable _abbrev_section
+ variable _constants
+
+ _handle_DW_FORM $attr_form $attr_value
+
+ _defer_output $_abbrev_section {
+ _op .uleb128 $_constants($attr_name) $attr_name
+ _op .uleb128 $_constants($attr_form) $attr_form
+ }
+ }
+
proc _handle_DW_TAG {tag_name {attrs {}} {children {}}} {
variable _abbrev_section
variable _abbrev_num
@@ -489,12 +501,7 @@ namespace eval Dwarf {
}
set attr_form [_map_name $attr_form _FORM]
- _handle_DW_FORM $attr_form $attr_value
-
- _defer_output $_abbrev_section {
- _op .uleb128 $_constants($attr_name) $attr_name
- _op .uleb128 $_constants($attr_form) $attr_form
- }
+ _handle_attribute $attr_name $attr_value $attr_form
}
_defer_output $_abbrev_section {