Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 16015 Details for
Bug 78816
terminate session when GDB is not connected to the target causes error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fixes terminate problems by ignoring state of debugger and always executing the "kill" command ignore result + "exit"
fixterminate.txt (text/plain), 2.01 KB, created by
Oyvind Harboe
on 2004-11-19 09:50:02 EST
(
hide
)
Description:
Fixes terminate problems by ignoring state of debugger and always executing the "kill" command ignore result + "exit"
Filename:
MIME Type:
Creator:
Oyvind Harboe
Created:
2004-11-19 09:50:02 EST
Size:
2.01 KB
patch
obsolete
>Index: MIInferior.java >=================================================================== >RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/MIInferior.java,v >retrieving revision 1.7 >diff -u -r1.7 MIInferior.java >--- MIInferior.java 17 Nov 2004 15:39:15 -0000 1.7 >+++ MIInferior.java 19 Nov 2004 14:48:13 -0000 >@@ -159,31 +159,22 @@ > } > > public void terminate() throws MIException { >- // An inferior will be destroy():interrupt and kill if >- // - For attach session: >- // the inferior was not disconnected yet (no need to try >- // to kill a disconnected program). >- // - For Program session: >- // if the inferior was not terminated. >- // - For PostMortem(Core): send event >- // else noop >- if ((session.isAttachSession() && isConnected()) || (session.isProgramSession() && !isTerminated())) { >- // Try to interrupt the inferior, first. >- if (isRunning()) { >- interrupt(); >- } >- int token = 0; >- if (isSuspended()) { >- CommandFactory factory = session.getCommandFactory(); >- MIExecAbort abort = factory.createMIExecAbort(); >- session.postCommand0(abort, session.getCommandTimeout()); >- abort.getMIInfo(); >- token = abort.getToken(); >- } >- setTerminated(token, true); >- } else if (session.isCoreSession() && !isTerminated()){ >- setTerminated(); >- } >+ // never mind why the debugger ended up in the state that it is >+ // in. just execute a "kill", ignore result, + "exit" >+ // >+ // >+ try >+ { >+ CommandFactory factory = session.getCommandFactory(); >+ MIExecAbort abort = factory.createMIExecAbort(); >+ session.postCommand0(abort, session.getCommandTimeout()); >+ abort.getMIInfo(); >+ } catch (MIException e) >+ { >+ // ignore error. An error is expected when terminate is >+ // executed on a target that is in the disconnected state. >+ } >+ setTerminated(); > } > > public void interrupt() throws MIException {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 78816
:
15916
|
15958
| 16015