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]

Fix tracepoints in extended-remote mode regression (Re: Fix error when gdb connect to a stub that tracepoint is running[1/2] Add a flag initialized to struct trace_status)


On 03/01/2012 06:49 PM, Pedro Alves wrote:

> 
> 2012-03-01  Pedro Alves  <palves@redhat.com>
> 	    Hui Zhu  <hui_zhu@mentor.com>
> 	    Yao Qi  <yao@codesourcery.com>
> 
> 	* remote.c (struct remote_state): New field `starting_up'.
> 	(remote_start_remote): Set and clear it.
> 	(remote_can_download_tracepoint): If starting up, return false.


This misses clearing `starting_up' on early return paths of remote_start_remote,
an so remote_can_download_tracepoint always return false in extended-remote mode.
With the extended-remote board, but not with the regular remote board:

Running ../../../src/gdb/testsuite/gdb.trace/change-loc.exp ...
FAIL: gdb.trace/change-loc.exp: 1 trace: tfind frame 0
FAIL: gdb.trace/change-loc.exp: 2 trace: tfind frame 2
FAIL: gdb.trace/change-loc.exp: 1 ftrace: running to main in runto
FAIL: gdb.trace/change-loc.exp: 1 ftrace: Can't run to main
FAIL: gdb.trace/change-loc.exp: 2 ftrace: run to main (the program exited)
FAIL: gdb.trace/change-loc.exp: 2 ftrace: tstart
...
(snip yet more fails)

This fixes it.  Applied on mainline and 7.4.

2012-03-20  Pedro Alves  <palves@redhat.com>

	* remote.c (remote_start_remote): Clear `rs->starting_up' on early
	returns.
---
 gdb/remote.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c
+++ src/gdb/remote.c
@@ -3268,6 +3268,7 @@ remote_start_remote (int from_tty, struc

 	  /* We're connected, but not running.  Drop out before we
 	     call start_remote.  */
+	  rs->starting_up = 0;
 	  return;
 	}
       else
@@ -3374,6 +3375,7 @@ remote_start_remote (int from_tty, struc

 	  /* We're connected, but not running.  Drop out before we
 	     call start_remote.  */
+	  rs->starting_up = 0;
 	  return;
 	}


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