Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Retrieving data from events

Hello,

My CDT extension listens to old DebugEvent events and extracts some data. I would like to extract this data with DSF.
The following data is extracted:

- Thread name
        Retrieved by ((IThread)DebugEvent.getSource()).getName() (Assuming the the source is IThread)
        I found there is IThreadDMContext, which represents a thread. Once you have this context, you can retrieve IThreadDMData, which has getName() function. I look at the returned value of IResumedDMEvent.getDMContext(). It returns GDBContainerDMC_7_4 - it extends (eventually) IContainerDMContext, which represents a process, not a thread. I could not find a method which retrieves IThreadDMContext(s) from IContainerDMContext. Is it possible ?

- Detail - retreived by DebugEvent.getDetail();
        I assume that the method IResumedDMEvent.getReason() should supply the information for detail. Is this correct ?

- Line & location - retrieved by IThread.getBreakpoints() and then inspecting the first instance. If getMarker() does not return null, location will be IMarker..getResource().getFullPath().toOSString(). If the breakpoint is ILineBreakpoint, line is retrieved by ILineBreakpoint.getLineNumber().
        I found IBreakpointsExtension which retrives IBreakpointDMContext(s) from IExecutionDMContext. From there I assume I should use IBreakpoints.getBreakpointDMData which seems to have this data. Is this correct ?

Thanks,
Gidi

Back to the top