This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] thread apply commands change selected frame


Daniel Jacobowitz wrote:
On Wed, Jan 31, 2007 at 04:57:50PM +0100, Denis PILAT wrote:
Your remarks have been taken into account into the attached patch.
Are you ok for committing this one plus the previous patch regarding the thread.c ?
(Frederic Riss will do that for me)

Yes, that's OK (with a minor fix, below). Let me know if you would
like write access yourself.
Yes thanks.
Checking for $[specific number] should be avoided, because adding more
tests earlier in the file will break it.  Use \\\$\[0-9]+ instead.

I prefer that as well, therefore I changed the previous test as well to keep the same style (see attached file).

--
Denis
2007-02-01  Denis Pilat  <denis.pilat@st.com>

	* gdb.threads/threadapply.exp: check that frame is not changed by
	the thread apply all command.

Index: testsuite/gdb.threads/threadapply.exp
===================================================================
--- testsuite/gdb.threads/threadapply.exp	(revision 553)
+++ testsuite/gdb.threads/threadapply.exp	(working copy)
@@ -67,5 +67,11 @@ gdb_test_multiple "define backthread" "d
 # verify that the macro can get past the backtrace error and perform
 # subsequent commands.
 gdb_test "set backtrace limit 3" ""
-gdb_test "thread apply all backthread" "Thread ..*\\\$1 = 0x14.*Thread ..*\\\$2 = 0x14.*Thread ..*\\\$3 = 0x14.*Thread ..*\\\$4 = 0x14.*Thread ..*\\\$5 = 0x14.*Thread ..*\\\$. = 0x14"
+gdb_test "thread apply all backthread" "Thread ..*\\\$\[0-9]+ = 0x14.*Thread ..*\\\$\[0-9]+ = 0x14.*Thread ..*\\\$\[0-9]+ = 0x14.*Thread ..*\\\$\[0-9]+ = 0x14.*Thread ..*\\\$\[0-9]+ = 0x14.*Thread ..*\\\$\[0-9]+ = 0x14"
 
+# Go into the thread_function to check that a simple "thread apply"
+# does not change the selected frame.
+gdb_test "step" "thread_function.*" "step to the thread_function"
+gdb_test "up" ".*in main.*" "go up in the stack frame" 
+gdb_test "thread apply all print 1"  "Thread ..*\\\$\[0-9]+ = 1.*Thread ..*\\\$\[0-9]+ = 1.*Thread ..*\\\$\[0-9]+ = 1.*Thread ..*\\\$\[0-9]+ = 1.*Thread ..*\\\$\[0-9]+ = 1.*Thread ..*\\\$\[0-9]+ = 1" "run a simple print command on all threads"
+gdb_test "down" "#0.*thread_function.*" "go down and check selected frame"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]