aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/dwarf.exp10
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 57b7208..5de67b4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-04 Simon Marchi <simon.marchi@efficios.com>
+
+ * lib/dwarf.exp (declare_labels): Use name as text if text is
+ not provided.
+
2020-12-04 Tom de Vries <tdevries@suse.de>
PR testsuite/26990
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index c1596df..ecd438b 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -863,13 +863,13 @@ namespace eval Dwarf {
set name [lindex $arg 0]
set text [lindex $arg 1]
- upvar $name label_var
- if {$text == ""} {
- set label_var [new_label]
- } else {
- set label_var [new_label $text]
+ if { $text == "" } {
+ set text $name
}
+ upvar $name label_var
+ set label_var [new_label $text]
+
proc ${name}: {args} [format {
define_label %s
uplevel $args