[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-patch] MISession terminate patch
|
doh! patch attached..
-----Original Message-----
From: cdt-patch-bounces@xxxxxxxxxxx
[mailto:cdt-patch-bounces@xxxxxxxxxxx] On Behalf Of Alain Magloire
Sent: 31 March 2005 22:07
To: cdt-patch@xxxxxxxxxxx
Subject: Re: [cdt-patch] MISession terminate patch
>
> Hi,
>
> We're seeing a problem when debugging using CDT 2.1.1.
>
> As part of a debug session, we launch a number of tools, including gdb
> talking to a remote target (gdbserver) over tcp/ip. Some of the time,
> clicking on the terminate button while the target is running, doesn't
> terminate the Elf Debugger Process, as displayed in the debug window,
> even though the actual gdb process has terminated successfully. All of
> the other launch sub-processes are terminated successfully. This
> results in the debug window displaying the launch with only the elf
> debugger process being displayed as active (running), and it can't be
> terminated. I believe that this is caused by the EventThread thread
> terminating before the last command (kill) by the
> MISession.terminate() gets posted.
>
> Attached is a patch for the MISession.java file (in
> org.eclipse.cdt.debug.mi.core) which sets the condition for
> terminating the EventThread thread later on in the terminate sequence,
> to ensure that the final postCommand(kill,2000) makes it through to
> the EventThread and is posted before the thread dies.=20
>
> Would it be possible to have the patch applied please?
>
Where's the beef ?
_______________________________________________
cdt-patch mailing list
cdt-patch@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-patch
Index: MISession.java
===================================================================
RCS file: /data1/cvs/repository/eclipse/patches/org.eclipse.cdt.debug.mi.core/MISession.java,v
retrieving revision 1.1
diff -u -r1.1 MISession.java
--- MISession.java 31 Mar 2005 18:14:03 -0000 1.1
+++ MISession.java 31 Mar 2005 18:17:38 -0000
@@ -430,13 +430,8 @@
// Destroy any MI Inferior(Process) and streams.
inferior.destroy();
- // {in,out}Channel is use as predicate/condition
- // in the {RX,TX,Event}Thread to detect termination
- // and bail out. So they are set to null.
InputStream inGDB = inChannel;
- inChannel = null;
OutputStream outGDB = outChannel;
- outChannel = null;
// Although we will close the pipe(). It is cleaner
// to give a chance to gdb to cleanup.
@@ -454,6 +449,14 @@
if (gdbProcess != null) {
gdbProcess.destroy();
}
+
+ // {in,out}Channel is use as predicate/condition
+ // in the {RX,TX,Event}Thread to detect termination
+ // and bail out. So they are set to null.
+ // This is set to null, just before the i/o gdb prompt streams
+ // are closed and set to null themselves.
+ inChannel = null;
+ outChannel = null;
// Close the input GDB prompt
try {