Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339591

Summary: Cannot use 'kill' in a post-mortem session
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: cdtdoug, john.cortell, pawel.1.piech
Version: 8.0Flags: john.cortell: review+
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-03-10 15:40:21 EST
1- Set the preference to not kill GDB when the last inferior exits
2- use a post-mortem session
3- Press terminate on the process or thread or stack frame

574,950 [MI]  34-interpreter-exec console kill
574,953 [MI]  ~"Kill the program being debugged? (y or n) [answered Y; input not from terminal]\n"
574,954 [MI]  &"You can't do that without a process to debug.\n"
574,954 [MI]  34^error,msg="You can't do that without a process to debug."

We should check for the type of debug session before choose how we terminate
Comment 1 Marc Khouzam CLA 2011-04-03 22:55:46 EDT
Created attachment 192432 [details]
Fix

This patch checks if we are dealing with a post-mortem session, and if so, a terminate request will always terminate GDB, instead of trying 'kill' on the inferior.

Committed to HEAD.
Comment 2 Marc Khouzam CLA 2011-04-03 22:57:27 EDT
Fixed.

John, can you review? (3 lines)
Comment 4 John Cortell CLA 2011-04-04 14:42:02 EDT
Looks good to me