public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH 1/2] gdb: Fix parameter passing to mi_create_breakpoint
Date: Wed, 14 Jun 2017 18:58:00 -0000	[thread overview]
Message-ID: <e545b4d9342c6e56c9e6c65ff3c64fdf9ccabcf1.1497466455.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1497466455.git.andrew.burgess@embecosm.com>
In-Reply-To: <cover.1497466455.git.andrew.burgess@embecosm.com>

In the test gdb.mi/mi-vla-fortran.exp the parameters passed to
mi_create_breakpoint are passed in the wrong order.  By good luck the
tests still passes, however the wrong test name is used.  All fixed in
this commit.

gdb/testsuite/ChangeLog:

	* gdb.mi/mi-vla-fortran.exp: Correct parameter passing to
	mi_create_breakpoint.
---
 gdb/testsuite/ChangeLog                 |  5 +++++
 gdb/testsuite/gdb.mi/mi-vla-fortran.exp | 36 +++++++++++++++++++--------------
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
index b81165e..7b40aba 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
@@ -37,9 +37,9 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load ${binfile}
 
 set bp_lineno [gdb_get_line_number "vla1-not-allocated"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 1 "del" "vla" \
-  ".*vla.f90" $bp_lineno $hex \
-  "insert breakpoint at line $bp_lineno (vla not allocated)"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno (vla not allocated)" \
+    -number 1 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -63,8 +63,9 @@ mi_list_array_varobj_children_with_index "vla1_not_allocated" "0" "1" \
 
 
 set bp_lineno [gdb_get_line_number "vla1-allocated"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 2 "del" "vla" ".*vla.f90" \
-  $bp_lineno $hex "insert breakpoint at line $bp_lineno (vla allocated)"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno (vla allocated)" \
+    -number 2 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -87,8 +88,9 @@ mi_list_array_varobj_children_with_index "vla1_allocated" "5" "1" \
 
 
 set bp_lineno [gdb_get_line_number "vla1-filled"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 3 "del" "vla" ".*vla.f90" \
-  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno" \
+    -number 3 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -97,8 +99,9 @@ mi_gdb_test "520-data-evaluate-expression vla1" \
 
 
 set bp_lineno [gdb_get_line_number "vla1-modified"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 4 "del" "vla" ".*vla.f90" \
-  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno" \
+    -number 4 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -113,8 +116,9 @@ mi_gdb_test "560-data-evaluate-expression vla1(4)" \
 
 
 set bp_lineno [gdb_get_line_number "vla1-deallocated"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 5 "del" "vla" ".*vla.f90" \
-  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno" \
+    -number 5 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -163,8 +167,9 @@ gdb_expect {
 }
 
 set bp_lineno [gdb_get_line_number "pvla2-associated"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 7 "del" "vla" ".*vla.f90" \
-  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno" \
+    -number 7 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -186,8 +191,9 @@ mi_gdb_test "593-var-evaluate-expression pvla2_associated" \
 
 
 set bp_lineno [gdb_get_line_number "pvla2-set-to-null"]
-mi_create_breakpoint "-t vla.f90:$bp_lineno" 8 "del" "vla" ".*vla.f90" \
-  $bp_lineno $hex "insert breakpoint at line $bp_lineno"
+mi_create_breakpoint "-t vla.f90:$bp_lineno" \
+    "insert breakpoint at line $bp_lineno" \
+    -number 8 -disp del -func vla ".*vla.f90" $bp_lineno $hex
 mi_run_cmd
 mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
   { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
-- 
2.5.1

  parent reply	other threads:[~2017-06-14 18:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 18:57 [PATCH 0/2] Couple of small fixes to gdb.mi/mi-vla-fortran.exp test Andrew Burgess
2017-06-14 18:58 ` [PATCH 2/2] gdb: Make some test names unique Andrew Burgess
2017-06-22 10:37   ` Yao Qi
2017-06-22 11:08     ` Pedro Alves
2017-06-22 11:59       ` Yao Qi
2017-06-22 12:06         ` Pedro Alves
2017-06-22 12:12   ` Pedro Alves
2017-07-13 20:15   ` [PATCHv2 " Andrew Burgess
2017-07-13 22:40     ` Pedro Alves
2017-06-14 18:58 ` Andrew Burgess [this message]
2017-06-22 10:16   ` [PATCH 1/2] gdb: Fix parameter passing to mi_create_breakpoint Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e545b4d9342c6e56c9e6c65ff3c64fdf9ccabcf1.1497466455.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).