Provides default "not supported" implementations for optional methods of IStoppedGDBTarget. More...
#include <IGDBTarget.h>
Public Member Functions | |
virtual GDBStatus | ReadFrameRelatedRegisters (int threadID, RegisterSetContainer ®isters) |
Reads program counter, stack pointer and stack base pointer registers. | |
virtual GDBStatus | GetDynamicLibraryList (std::vector< DynamicLibraryRecord > &libraries) |
Fills the list of the dynamic libraries currently loaded in the target. | |
virtual GDBStatus | GetThreadList (std::vector< ThreadRecord > &threads) |
Fills the list of the threads currently present in the target. | |
virtual GDBStatus | SetThreadModeForNextCont (int threadID, DebugThreadMode mode, OUT bool *pNeedRestoreCall, IN OUT INT_PTR *pRestoreCookie) |
Sets the mode in which an individual thread will continue before the next debug event. | |
virtual GDBStatus | Terminate () |
Terminates the target. | |
virtual GDBStatus | CreateBreakpoint (BreakpointType type, ULONGLONG Address, unsigned kind, OUT INT_PTR *pCookie) |
Sets a breakpoint at a given address. | |
virtual GDBStatus | RemoveBreakpoint (BreakpointType type, ULONGLONG Address, INT_PTR Cookie) |
Removes a previously set breakpoint. | |
virtual GDBStatus | ExecuteRemoteCommand (const std::string &command, std::string &output) |
This handler is invoked when user sends an arbitrary command to the GDB stub ("mon <command>" in GDB). | |
virtual IFLASHProgrammer * | GetFLASHProgrammer () |
Returns a pointer to an IFLASHProgrammer instance, or NULL if not supported. The returned instance should be persistent (e.g. the same object that implements IStoppedGDBTarget). | |
Public Member Functions inherited from GDBServerFoundation::ISyncGDBTarget | |
virtual GDBStatus | GetLastStopRecord (TargetStopRecord *pRec)=0 |
Returns the information explaining why the target has stopped (e.g. stopped at a breakpoint). | |
virtual GDBStatus | ResumeAndWait (int threadID)=0 |
Resumes the target and indefinitely waits till a next debug event occurs. | |
virtual GDBStatus | Step (int threadID)=0 |
Resumes the target in a single-step mode. | |
virtual GDBStatus | SendBreakInRequestAsync ()=0 |
Requests the target to stop executing (i.e. forces a breakpoint) | |
Public Member Functions inherited from GDBServerFoundation::IStoppedGDBTarget | |
virtual const PlatformRegisterList * | GetRegisterList ()=0 |
Returns a pointer to a persistent list of the registers supported by the target. | |
virtual GDBStatus | ReadTargetRegisters (int threadID, RegisterSetContainer ®isters)=0 |
Reads the values of all registers from the target. | |
virtual GDBStatus | WriteTargetRegisters (int threadID, const RegisterSetContainer ®isters)=0 |
Writes one or more target registers. | |
virtual GDBStatus | ReadTargetMemory (ULONGLONG Address, void *pBuffer, size_t *pSizeInBytes)=0 |
Reads the memory of the underlying target. | |
virtual GDBStatus | WriteTargetMemory (ULONGLONG Address, const void *pBuffer, size_t sizeInBytes)=0 |
Writes the memory of the underlying target. | |
virtual | ~IStoppedGDBTarget () |
Detailed Description
Provides default "not supported" implementations for optional methods of IStoppedGDBTarget.
- Examples:
- SimpleWin32Server/SimpleWin32Server.cpp.
Member Function Documentation
|
inlinevirtual |
Sets a breakpoint at a given address.
- Parameters
-
type Specifies the type of the supported breakpoint. Address Specifies the address where the breakpoint should be set. kind Specifies the additional information provided by GDB. For data breakpoints this is the length of the watched region. pCookie receives an arbitrary INT_PTR value that will be passed to RemoveBreakpoint() once this breakpoint is removed.
- Remarks
- It is not necessary to implement this method for software breakpoints. If GDB encounters a "not supported" reply, it will set the breakpoint using the WriteTargetMemory() call. It is only recommended to implement this method for the software breakpoints if it can set them better than GDB itself.
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
This handler is invoked when user sends an arbitrary command to the GDB stub ("mon <command>" in GDB).
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Fills the list of the dynamic libraries currently loaded in the target.
If the target supports dynamic libraries (a.k.a DLLs, a.k.a. shared libraries, a.k.a. shared objects), this method should provide the information about them by filling the libraries vector.
- Parameters
-
libraries Contains an empty vector that should be filled with instances of DynamicLibraryRecord
- Returns
- If the target does not support dynamic libraries, the method should return kGDBNotSupported. Refer to GDBStatus documentation for more information.
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Returns a pointer to an IFLASHProgrammer instance, or NULL if not supported. The returned instance should be persistent (e.g. the same object that implements IStoppedGDBTarget).
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Fills the list of the threads currently present in the target.
If the target supports multiple threads, this method should provide the information about them by filling the threads vector.
- Parameters
-
threads Contains an empty vector that should be filled with instances of ThreadRecord
- Returns
- If the target does not support multiple threads, the method should return kGDBNotSupported. Refer to GDBStatus documentation for more information.
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Reads program counter, stack pointer and stack base pointer registers.
- Returns
- See the GDBStatus description for a list of valid return codes.
- Parameters
-
threadID Specifies the ID of the thread to query registers Contains the storage for the register values. The storage is initialized with RegisterValue instances flagged as invalid and sizes set based on the GetRegisterList() call.
- Remarks
- If this method returns an error, GDB will read all registers using the ReadTargetRegisters() method. Thus it only makes sense to implement this method if reading frame-related registers instead of all registers saves time.
Here's an example implementation of this method:
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Removes a previously set breakpoint.
This method should remove a breakpoint previously set with CreateBreakpoint().
- Parameters
-
type Equal to the type argument of the corresponding CreateBreakpoint() call. Address Equal to the Address argument of the corresponding CreateBreakpoint() call. Cookie contains the arbitrary INT_PTR value provided by the CreateBreakpoint() method.
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Sets the mode in which an individual thread will continue before the next debug event.
This method allows setting different continuation modes (e.g. single-step, free run or halt) for different threads of a multi-threaded program. If the target does not support it, the method should return kGDBNotSupported.
- Parameters
-
threadID Specifies the ID of the thread that is being controlled mode Specifies the mode in which the thread should be put until the next debug event pNeedRestoreCall Set the value pointed by this argument to TRUE if this method needs to be called again with mode == dtmRestore once the next debug event completes. pRestoreCookie If mode is not dtmRestore, you set pNeedRestoreCall to TRUE, this argument can receive an arbitrary INT_PTR value that will be passed to the method later during the dtmRestore call. If mode is dtmRestore, this argument points to the previously saved value.
- Remarks
- Before the method is actually used, it is called with mode == dtmProbe and an invalid threadID to determine whether the target supports it. Thus, if mode is dtmProbe, the threadID argument should be ignored and the method should immediately return either kGDBNotSupported or kGDBSuccess.
Implements GDBServerFoundation::IStoppedGDBTarget.
|
inlinevirtual |
Terminates the target.
Implements GDBServerFoundation::IStoppedGDBTarget.
The documentation for this class was generated from the following file: