public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi
@ 2014-09-01  1:02 Yao Qi
  2014-09-01  1:03 ` [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp Yao Qi
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yao Qi @ 2014-09-01  1:02 UTC (permalink / raw)
  To: gdb-patches

Hi,
This series fixes some fails in mi-var-child.exp and
mi-var-display.exp, which are caused by printed symbol on address
zero.  One of them is fixed by "set print symbol" off, and that is
what patch 1/3 does.  Patch 2/3 is a refactor patch, which uses
mi_varobj_update in tests to simplify them.

The cause of the rest of fails is that function pointers are NULL,
and they point to a code symbol _ftext on address zero.  We can
relax pattern to match both "0x0" and "0x0 <_ftext>", but I didn't
fix it in this way.  Instead, I explicitly assign function address
to these function pointers, so the output becomes "$hex <$func_name>"
on all the targets.  See details in patch 3/3.

The patch series is tested on x86_64-linux with native and gdbserver,
and arm-none-eabi.

*** BLURB HERE ***

Yao Qi (3):
  Set print symbol off in mi-var-display.exp
  Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp
  Fix fail in mi-var-child.exp and mi-var-display.exp

 gdb/testsuite/gdb.mi/mi-var-child.c     | 18 +++++++
 gdb/testsuite/gdb.mi/mi-var-child.exp   | 92 ++++++++++++++++++++-------------
 gdb/testsuite/gdb.mi/mi-var-display.exp |  5 +-
 gdb/testsuite/gdb.mi/mi2-var-child.exp  | 74 ++++++++++++++------------
 gdb/testsuite/gdb.mi/var-cmd.c          | 16 ++++++
 5 files changed, 135 insertions(+), 70 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp
  2014-09-01  1:02 [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
@ 2014-09-01  1:03 ` Yao Qi
  2014-10-14 11:48   ` Yao Qi
  2014-09-01  1:03 ` [PATCH 1/3] Set print symbol off in mi-var-display.exp Yao Qi
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Yao Qi @ 2014-09-01  1:03 UTC (permalink / raw)
  To: gdb-patches

Hi,
I modify mi-var-child.exp and find that the pattern to match the output
of -var-update * is quite complicated.  However, it can be simplified by
using mi_varobj_update.  That is what this patch does.

gdb/testsuite:

2014-08-30  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-var-child.exp: Use mi_varobj_update to simplify
	tests.
	* gdb.mi/mi2-var-child.exp: Likewise.
---
 gdb/testsuite/gdb.mi/mi-var-child.exp  | 70 +++++++++++++++++++---------------
 gdb/testsuite/gdb.mi/mi2-var-child.exp | 67 ++++++++++++++++++--------------
 2 files changed, 77 insertions(+), 60 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 4e9a76c..1f547ba 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -668,9 +668,7 @@ mi_gdb_test "-var-delete weird" \
 
 # Test: c_variable-5.1
 # Desc: check that nothing changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\\\]" \
-	"update all vars. None changed"
+mi_varobj_update * {} "update all vars. None changed"
 
 # Step over "struct_declarations.integer = 123;"
 mi_step_to do_children_tests {} ".*${srcfile}" \
@@ -678,8 +676,7 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.2
 # Desc: check that integer changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.integer} \
 	"update all vars struct_declarations.integer"
 
 # Step over:
@@ -691,8 +688,7 @@ mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} ".*${srcfi
 
 # Test: c_variable-5.3
 # Desc: check that char_ptr changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.char_ptr struct_declarations.char_ptr.\\*char_ptr} \
 	"update all vars struct_declarations.char_ptr"
 
 # Step over "struct_declarations.int_ptr_ptr = &foo;"
@@ -701,8 +697,12 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.4
 # Desc: check that int_ptr_ptr and children changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {weird->int_ptr_ptr
+    weird->int_ptr_ptr.\\*weird->int_ptr_ptr
+    weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr
+    struct_declarations.int_ptr_ptr
+    struct_declarations.int_ptr_ptr.\\*int_ptr_ptr
+    struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr} \
 	"update all vars int_ptr_ptr and children changed"
 
 # Step over "weird->long_array[0] = 1234;"
@@ -711,8 +711,7 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.5
 # Desc: check that long_array[0] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.0} \
 	"update all vars struct_declarations.long_array.0 changed"
 
 # Step over "struct_declarations.long_array[1] = 2345;"
@@ -721,8 +720,7 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.6
 # Desc: check that long_array[1] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.1} \
 	"update all vars struct_declarations.long_array.1 changed"
 
 # Step over "weird->long_array[2] = 3456;"
@@ -731,8 +729,7 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.7
 # Desc: check that long_array[2] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.2} \
 	"update all vars struct_declarations.long_array.2 changed"
 
 # Step over:
@@ -750,9 +747,14 @@ mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} ".*${srcfi
 
 # Test: c_variable-5.8
 # Desc: check that long_array[3-9] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
-	"update all vars struct_declarations.long_array.3-9 changed"
+mi_varobj_update * {struct_declarations.long_array.3
+    struct_declarations.long_array.4
+    struct_declarations.long_array.5
+    struct_declarations.long_array.6
+    struct_declarations.long_array.7
+    struct_declarations.long_array.8
+    struct_declarations.long_array.9} \
+    "update all vars struct_declarations.long_array.3-9 changed"
 
 
 # Step over "weird->func_ptr = nothing";
@@ -761,9 +763,8 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.9
 # Desc: check that func_ptr changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
-	"update all vars struct_declarations.func_ptr changed"
+mi_varobj_update * {struct_declarations.func_ptr} \
+    "update all vars struct_declarations.func_ptr changed"
 
 # Step over "struct_declarations.long_array[10] = 3456";
 mi_step_to do_children_tests {} ".*${srcfile}" \
@@ -1119,8 +1120,11 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.47
 # Desc: check that psnp->char_ptr (and [0].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.char_ptr
+    psnp->char_ptr
+    psnp->char_ptr.\\*psnp->char_ptr psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr
+    psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr
+    psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr } \
 	"update all vars psnp->char_ptr (and 0.char_ptr) changed"
 
 #  Step over "snp1.char_ptr = &c3;"
@@ -1129,8 +1133,11 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.48
 # Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.next.char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr} \
 	"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
 
 
@@ -1140,8 +1147,7 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.49
 # Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.next.next.char_ptr} \
 	"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
 
 
@@ -1151,8 +1157,11 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.50
 # Desc: check that psnp->long_ptr (and [0].long_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.long_ptr psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr} \
 	"update all vars psnp->long_ptr (and 0.long_ptr) changed"
 
 
@@ -1179,8 +1188,7 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 
 # Test: c_variable-5.52
 # Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.next.next.long_ptr} \
 	"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
 
 mi_prepare_inline_tests $srcfile
diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp
index fc02066..6ae3e0c 100644
--- a/gdb/testsuite/gdb.mi/mi2-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp
@@ -668,9 +668,7 @@ mi_gdb_test "-var-delete weird" \
 
 # Test: c_variable-5.1
 # Desc: check that nothing changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\\\]" \
-	"update all vars. None changed"
+mi_varobj_update * {} "update all vars. None changed"
 
 # Step over "struct_declarations.integer = 123;"
 mi_step_to do_children_tests {} {.*var-cmd.c} \
@@ -678,8 +676,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.2
 # Desc: check that integer changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.integer} \
 	"update all vars struct_declarations.integer"
 
 # Step over:
@@ -691,8 +688,8 @@ mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd
 
 # Test: c_variable-5.3
 # Desc: check that char_ptr changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.char_ptr
+    struct_declarations.char_ptr.\\*char_ptr} \
 	"update all vars struct_declarations.char_ptr"
 
 # Step over "struct_declarations.int_ptr_ptr = &foo;"
@@ -701,8 +698,12 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.4
 # Desc: check that int_ptr_ptr and children changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {weird->int_ptr_ptr
+    weird->int_ptr_ptr.\\*weird->int_ptr_ptr
+    weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr
+    struct_declarations.int_ptr_ptr
+    struct_declarations.int_ptr_ptr.\\*int_ptr_ptr
+    struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr} \
 	"update all vars int_ptr_ptr and children changed"
 
 # Step over "weird->long_array[0] = 1234;"
@@ -711,8 +712,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.5
 # Desc: check that long_array[0] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.0} \
 	"update all vars struct_declarations.long_array.0 changed"
 
 # Step over "struct_declarations.long_array[1] = 2345;"
@@ -721,8 +721,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.6
 # Desc: check that long_array[1] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.1} \
 	"update all vars struct_declarations.long_array.1 changed"
 
 # Step over "weird->long_array[2] = 3456;"
@@ -731,8 +730,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.7
 # Desc: check that long_array[2] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.2} \
 	"update all vars struct_declarations.long_array.2 changed"
 
 # Step over:
@@ -750,8 +748,13 @@ mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd
 
 # Test: c_variable-5.8
 # Desc: check that long_array[3-9] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.long_array.3
+    struct_declarations.long_array.4
+    struct_declarations.long_array.5
+    struct_declarations.long_array.6
+    struct_declarations.long_array.7
+    struct_declarations.long_array.8
+    struct_declarations.long_array.9} \
 	"update all vars struct_declarations.long_array.3-9 changed"
 
 
@@ -762,8 +765,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.9
 # Desc: check that func_ptr changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {struct_declarations.func_ptr} \
 	"update all vars struct_declarations.func_ptr changed"
 
 # Delete all variables
@@ -1073,8 +1075,11 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.47
 # Desc: check that psnp->char_ptr (and [0].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.char_ptr
+    psnp->char_ptr
+    psnp->char_ptr.\\*psnp->char_ptr psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr
+    psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr
+    psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr } \
 	"update all vars psnp->char_ptr (and 0.char_ptr) changed"
 
 #  Step over "snp1.char_ptr = &c3;"
@@ -1083,8 +1088,11 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.48
 # Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.next.char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr
+    psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr} \
 	"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
 
 
@@ -1094,8 +1102,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.49
 # Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.next.next.char_ptr} \
 	"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
 
 
@@ -1105,8 +1112,11 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.50
 # Desc: check that psnp->long_ptr (and [0].long_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.long_ptr psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr
+    psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr} \
 	"update all vars psnp->long_ptr (and 0.long_ptr) changed"
 
 
@@ -1133,8 +1143,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} \
 
 # Test: c_variable-5.52
 # Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
+mi_varobj_update * {psnp->ptrs.0.next.next.long_ptr} \
 	"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
 
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] Set print symbol off in mi-var-display.exp
  2014-09-01  1:02 [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
  2014-09-01  1:03 ` [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp Yao Qi
@ 2014-09-01  1:03 ` Yao Qi
  2014-09-09  2:12   ` Yao Qi
  2014-09-01  1:04 ` [PATCH 3/3] Fix fail in mi-var-child.exp and mi-var-display.exp Yao Qi
  2014-09-18  1:05 ` [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
  3 siblings, 1 reply; 9+ messages in thread
From: Yao Qi @ 2014-09-01  1:03 UTC (permalink / raw)
  To: gdb-patches

Hi,
I see the following fail on arm-none-eabi target,

-var-evaluate-expression -f nat foo^M
^done,value="0x3 <_ftext+2>"^M
(gdb) ^M
FAIL: gdb.mi/mi-var-display.exp: eval variable -f nat foo

the "<_ftext+2>" isn't expected in the test, so "set print symbol off"
can prevent printing it.  It is obvious and I'll commit it in three
days if no comments.

gdb/testsuite:

2014-09-01  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-var-display.exp: Set print symbol off.
---
 gdb/testsuite/gdb.mi/mi-var-display.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index 2db4a7d..02c2212 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -49,6 +49,9 @@ mi_run_cmd
 mi_expect_stop "breakpoint-hit" "do_children_tests" "" ".*var-cmd.c" \
 	$line_dct_end { "" "disp=\"keep\"" } "run to main"
 
+# Prevent symbol on the address being printed.
+mi_gdb_test "-gdb-set print symbol off"
+
 #####       #####
 #               #
 # Display tests #
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] Fix fail in mi-var-child.exp and mi-var-display.exp
  2014-09-01  1:02 [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
  2014-09-01  1:03 ` [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp Yao Qi
  2014-09-01  1:03 ` [PATCH 1/3] Set print symbol off in mi-var-display.exp Yao Qi
@ 2014-09-01  1:04 ` Yao Qi
  2014-10-14 11:49   ` Yao Qi
  2014-09-18  1:05 ` [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
  3 siblings, 1 reply; 9+ messages in thread
From: Yao Qi @ 2014-09-01  1:04 UTC (permalink / raw)
  To: gdb-patches

Hi,
I see the following fails on arm-none-eabi target,

-var-list-children --simple-values struct_declarations  ^M
^done,numchild="11",children=[...,child={name="struct_declarations.func_ptr_struct",exp="func_ptr_struct",numchild="0",value="0x0 <_ftext>",type="struct _struct_decl (*)(int, char *, long)",thread-id="1"},child={name="struct_declarations.func_ptr_ptr",exp="func_ptr_ptr",numchild="0",value="0x0 <_ftext>",type="struct _struct_decl *(*)(int, char *, long)",thread-id="1"},...
(gdb) ^M
FAIL: gdb.mi/mi-var-child.exp: listing of children, simple types: names, type and values, complex types: names and types

-var-set-format weird.func_ptr_ptr natural^M
^done,format="natural",value="0x0 <_ftext>"^M
(gdb) ^M
FAIL: gdb.mi/mi-var-display.exp: set format variable weird.func_ptr_ptr in natural

In the test, "0x0" is expected, but "0x0 <_ftext>" is in the output.
Function pointers point to address zero, and tests assume there is no
symbol on address zero.  However, on my arm-none-eabi target, there is
a code symbol _ftext on address zero, and test fails.  Note that "set
print symbol off" doesn't take effect for function pointer.

int (*f) (void);
f = main;

(gdb) p f
$1 = (int (*)(void)) 0x8048400 <main>
(gdb) set print symbol off
(gdb) p f
$2 = (int (*)(void)) 0x8048400 <main>

In order to erase the difference, we can assign some function address
explicitly to function pointer, so the test behaves in a unique way.
In this patch, we assign nothing1 and nothing2 to function pointers
func_ptr_struct and func_ptr_ptr respectively, and update test as the
source file is changed.

gdb/testsuite:

2014-09-01  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-var-child.c (nothing1): New function.
	(nothing2): New function.
	(do_children_tests): Set function pointers by nothing1 and
	nothing2.
	* gdb.mi/mi-var-child.exp: Step over new added statements.
	Update test to match the new output.
	* gdb.mi/var-cmd.c (nothing1): New function.
	(nothing2): New function.
	(do_children_tests): Set function pointers by  nothing1 and
	nothing2.
	* gdb.mi/mi-var-display.exp: Update test to match output.
	Step to the line specified by $line_dct_nothing.
	Increase the number of lines to step.
---
 gdb/testsuite/gdb.mi/mi-var-child.c     | 16 ++++++++++++++++
 gdb/testsuite/gdb.mi/mi-var-child.exp   | 22 +++++++++++++++++-----
 gdb/testsuite/gdb.mi/mi-var-display.exp |  2 +-
 gdb/testsuite/gdb.mi/mi2-var-child.exp  |  7 +++----
 gdb/testsuite/gdb.mi/var-cmd.c          | 16 ++++++++++++++++
 5 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-var-child.c b/gdb/testsuite/gdb.mi/mi-var-child.c
index bde668e..689fe55 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.c
+++ b/gdb/testsuite/gdb.mi/mi-var-child.c
@@ -160,6 +160,20 @@ nothing ()
 {
 }
 
+struct _struct_decl
+nothing1 (int a, char *b, long c)
+{
+  struct _struct_decl foo;
+
+  return foo;
+}
+
+struct _struct_decl *
+nothing2 (int a, char *b, long c)
+{
+  return (struct _struct_decl *) 0;
+}
+
 void
 subroutine1 (int i, long *l)
 {
@@ -231,6 +245,8 @@ do_children_tests (void)
   struct_declarations.long_array[9] = 1234;
 
   weird->func_ptr = nothing;
+  weird->func_ptr_struct = nothing1;
+  weird->func_ptr_ptr = nothing2;
   struct_declarations.long_array[10] = 3456;
   struct_declarations.long_array[11] = 5678;
 
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 1f547ba..88be094 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -766,9 +766,21 @@ mi_step_to do_children_tests {} ".*${srcfile}" \
 mi_varobj_update * {struct_declarations.func_ptr} \
     "update all vars struct_declarations.func_ptr changed"
 
-# Step over "struct_declarations.long_array[10] = 3456";
+# Step over "weird->func_ptr_struct = nothing1"
 mi_step_to do_children_tests {} ".*${srcfile}" \
     [expr $line_dct_nothing + 2] "step \$line_dct_nothing + 2"
+mi_varobj_update * {struct_declarations.func_ptr_struct} \
+    "update all vars struct_declarations.func_ptr_struct changed"
+
+# Step over "weird->func_ptr_ptr = nothing2"
+mi_step_to do_children_tests {} ".*${srcfile}" \
+    [expr $line_dct_nothing + 3] "step \$line_dct_nothing + 3"
+mi_varobj_update * {struct_declarations.func_ptr_ptr} \
+    "update all vars struct_declarations.func_ptr_ptr changed"
+
+# Step over "struct_declarations.long_array[10] = 3456";
+mi_step_to do_children_tests {} ".*${srcfile}" \
+    [expr $line_dct_nothing + 4] "step \$line_dct_nothing + 4"
 
 mi_gdb_test "-var-update --no-values *" \
 	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.10\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
@@ -807,10 +819,10 @@ mi_list_varobj_children {struct_declarations --simple-values} \
          [list struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*" "$hex"] \
          {struct_declarations.long_array long_array 12 "long \\[12\\]"} \
          [list struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)" "(@$hex: |)$hex <nothing>"] \
-         {struct_declarations.func_ptr_struct func_ptr_struct 0 \
-              "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?" 0x0} \
-         {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \
-              "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)" 0x0} \
+         [list struct_declarations.func_ptr_struct func_ptr_struct 0 \
+              "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?" "$hex <nothing1>"] \
+         [list struct_declarations.func_ptr_ptr func_ptr_ptr 0 \
+              "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)" "$hex <nothing2>"] \
          {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} \
          {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} \
 ] "listing of children, simple types: names, type and values, complex types: names and types"
diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index 02c2212..9f0ade5 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -290,7 +290,7 @@ mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \
 	"set format variable weird.func_ptr_struct"
 
 mi_gdb_test "-var-set-format weird.func_ptr_ptr natural" \
-	"\\^done,format=\"natural\",value=\"0x0\"" \
+	"\\^done,format=\"natural\",value=\"$hex <nothing2>\"" \
 	"set format variable weird.func_ptr_ptr in natural"
 
 mi_gdb_test "-var-set-format weird.u1 natural" \
diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp
index 6ae3e0c..fffc1f1 100644
--- a/gdb/testsuite/gdb.mi/mi2-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp
@@ -759,9 +759,8 @@ mi_varobj_update * {struct_declarations.long_array.3
 
 
 # Step over "weird->func_ptr = nothing;"
-set line_dct_a0_0 [gdb_get_line_number "a0\[0\] = '0';"]
-mi_step_to do_children_tests {} {.*var-cmd.c} \
-    $line_dct_a0_0 "step \$line_dct_a0_0"
+mi_step_to do_children_tests {} ".*${srcfile}" \
+    [expr $line_dct_nothing + 1] "step \$line_dct_nothing + 1"
 
 # Test: c_variable-5.9
 # Desc: check that func_ptr changed
@@ -782,7 +781,7 @@ mi_gdb_test "-var-delete weird->int_ptr_ptr" \
 #   psnp = &snp0;
 
 set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
-mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
+mi_execute_to "exec-step 45" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
     [expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
 
 # Test: c_variable-5.10
diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c
index 4bb2746..bbfbc34 100644
--- a/gdb/testsuite/gdb.mi/var-cmd.c
+++ b/gdb/testsuite/gdb.mi/var-cmd.c
@@ -182,6 +182,20 @@ nothing ()
 {
 }
 
+struct _struct_decl
+nothing1 (int a, char *b, long c)
+{
+  struct _struct_decl foo;
+
+  return foo;
+}
+
+struct _struct_decl *
+nothing2 (int a, char *b, long c)
+{
+  return (struct _struct_decl *) 0;
+}
+
 void
 subroutine1 (int i, long *l)
 {
@@ -253,6 +267,8 @@ do_children_tests (void)
   struct_declarations.long_array[9] = 1234;
 
   weird->func_ptr = nothing;
+  weird->func_ptr_struct = nothing1;
+  weird->func_ptr_ptr = nothing2;
 
   /* Struct/pointer/array tests */
   a0[0] = '0';
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] Set print symbol off in mi-var-display.exp
  2014-09-01  1:03 ` [PATCH 1/3] Set print symbol off in mi-var-display.exp Yao Qi
@ 2014-09-09  2:12   ` Yao Qi
  0 siblings, 0 replies; 9+ messages in thread
From: Yao Qi @ 2014-09-09  2:12 UTC (permalink / raw)
  To: gdb-patches

Yao Qi <yao@codesourcery.com> writes:

> gdb/testsuite:
>
> 2014-09-01  Yao Qi  <yao@codesourcery.com>
>
> 	* gdb.mi/mi-var-display.exp: Set print symbol off.

Patch is pushed.  Ping patch 2/3 and 3/3.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi
  2014-09-01  1:02 [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
                   ` (2 preceding siblings ...)
  2014-09-01  1:04 ` [PATCH 3/3] Fix fail in mi-var-child.exp and mi-var-display.exp Yao Qi
@ 2014-09-18  1:05 ` Yao Qi
  2014-09-30 14:04   ` Yao Qi
  3 siblings, 1 reply; 9+ messages in thread
From: Yao Qi @ 2014-09-18  1:05 UTC (permalink / raw)
  To: gdb-patches

Yao Qi <yao@codesourcery.com> writes:

> This series fixes some fails in mi-var-child.exp and
> mi-var-display.exp, which are caused by printed symbol on address
> zero.  One of them is fixed by "set print symbol" off, and that is
> what patch 1/3 does.  Patch 2/3 is a refactor patch, which uses
> mi_varobj_update in tests to simplify them.
>
> The cause of the rest of fails is that function pointers are NULL,
> and they point to a code symbol _ftext on address zero.  We can
> relax pattern to match both "0x0" and "0x0 <_ftext>", but I didn't
> fix it in this way.  Instead, I explicitly assign function address
> to these function pointers, so the output becomes "$hex <$func_name>"
> on all the targets.  See details in patch 3/3.
>
> The patch series is tested on x86_64-linux with native and gdbserver,
> and arm-none-eabi.

Patch 1 is pushed in.  Ping patch 2 and patch 3.

https://sourceware.org/ml/gdb-patches/2014-09/msg00002.html
https://sourceware.org/ml/gdb-patches/2014-09/msg00003.html

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi
  2014-09-18  1:05 ` [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
@ 2014-09-30 14:04   ` Yao Qi
  0 siblings, 0 replies; 9+ messages in thread
From: Yao Qi @ 2014-09-30 14:04 UTC (permalink / raw)
  To: gdb-patches

On 09/18/2014 09:01 AM, Yao Qi wrote:
> Yao Qi <yao@codesourcery.com> writes:
> 
>> This series fixes some fails in mi-var-child.exp and
>> mi-var-display.exp, which are caused by printed symbol on address
>> zero.  One of them is fixed by "set print symbol" off, and that is
>> what patch 1/3 does.  Patch 2/3 is a refactor patch, which uses
>> mi_varobj_update in tests to simplify them.
>>
>> The cause of the rest of fails is that function pointers are NULL,
>> and they point to a code symbol _ftext on address zero.  We can
>> relax pattern to match both "0x0" and "0x0 <_ftext>", but I didn't
>> fix it in this way.  Instead, I explicitly assign function address
>> to these function pointers, so the output becomes "$hex <$func_name>"
>> on all the targets.  See details in patch 3/3.
>>
>> The patch series is tested on x86_64-linux with native and gdbserver,
>> and arm-none-eabi.
> 
> Patch 1 is pushed in.  Ping patch 2 and patch 3.
> 
> https://sourceware.org/ml/gdb-patches/2014-09/msg00002.html
> https://sourceware.org/ml/gdb-patches/2014-09/msg00003.html
> 

Ping.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp
  2014-09-01  1:03 ` [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp Yao Qi
@ 2014-10-14 11:48   ` Yao Qi
  0 siblings, 0 replies; 9+ messages in thread
From: Yao Qi @ 2014-10-14 11:48 UTC (permalink / raw)
  To: gdb-patches

Yao Qi <yao@codesourcery.com> writes:

> I modify mi-var-child.exp and find that the pattern to match the output
> of -var-update * is quite complicated.  However, it can be simplified by
> using mi_varobj_update.  That is what this patch does.
>
> gdb/testsuite:
>
> 2014-08-30  Yao Qi  <yao@codesourcery.com>
>
> 	* gdb.mi/mi-var-child.exp: Use mi_varobj_update to simplify
> 	tests.
> 	* gdb.mi/mi2-var-child.exp: Likewise.

Patch is pushed in.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] Fix fail in mi-var-child.exp and mi-var-display.exp
  2014-09-01  1:04 ` [PATCH 3/3] Fix fail in mi-var-child.exp and mi-var-display.exp Yao Qi
@ 2014-10-14 11:49   ` Yao Qi
  0 siblings, 0 replies; 9+ messages in thread
From: Yao Qi @ 2014-10-14 11:49 UTC (permalink / raw)
  To: gdb-patches

Yao Qi <yao@codesourcery.com> writes:

> gdb/testsuite:
>
> 2014-09-01  Yao Qi  <yao@codesourcery.com>
>
> 	* gdb.mi/mi-var-child.c (nothing1): New function.
> 	(nothing2): New function.
> 	(do_children_tests): Set function pointers by nothing1 and
> 	nothing2.
> 	* gdb.mi/mi-var-child.exp: Step over new added statements.
> 	Update test to match the new output.
> 	* gdb.mi/var-cmd.c (nothing1): New function.
> 	(nothing2): New function.
> 	(do_children_tests): Set function pointers by  nothing1 and
> 	nothing2.
> 	* gdb.mi/mi-var-display.exp: Update test to match output.
> 	Step to the line specified by $line_dct_nothing.
> 	Increase the number of lines to step.

I test this patch again on x86-linux, arm-none-eabi, and
arm-linux-gnueaib.  Push it in.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-14 11:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01  1:02 [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
2014-09-01  1:03 ` [PATCH 2/3] Use mi_varobj_update in mi-var-child.exp and mi2-var-child.exp Yao Qi
2014-10-14 11:48   ` Yao Qi
2014-09-01  1:03 ` [PATCH 1/3] Set print symbol off in mi-var-display.exp Yao Qi
2014-09-09  2:12   ` Yao Qi
2014-09-01  1:04 ` [PATCH 3/3] Fix fail in mi-var-child.exp and mi-var-display.exp Yao Qi
2014-10-14 11:49   ` Yao Qi
2014-09-18  1:05 ` [PATCH 0/3] Fix fails in gdb.mi on arm-none-eabi Yao Qi
2014-09-30 14:04   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).