Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339591 - Cannot use 'kill' in a post-mortem session
Summary: Cannot use 'kill' in a post-mortem session
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 15:40 EST by Marc Khouzam CLA
Modified: 2011-04-04 14:42 EDT (History)
3 users (show)

See Also:
john.cortell: review+


Attachments
Fix (2.58 KB, patch)
2011-04-03 22:55 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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