From f74cf86bc55b34e567c760212cb4bdb6158fd225 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 13 Nov 2013 23:28:31 +0000 Subject: Added two new GDB server packets to debugserver: "QSaveRegisterState" and "QRestoreRegiterState". "QSaveRegisterState" makes the remote GDB server save all register values and it returns a save identifier as an unsigned integer. This packet can be used prior to running expressions to save all registers. All registers can them we later restored with "QRestoreRegiterState:SAVEID" what SAVEID is the integer identifier that was returned from the call to QSaveRegisterState. Cleaned up redundant code in lldb_private::Thread, lldb_private::ThreadPlanCallFunction. Moved the lldb_private::Thread::RegisterCheckpoint into its own header file and it is now in the lldb_private namespace. Trimmed down the RegisterCheckpoint class to omit stuff that wasn't used (the stack ID). Added a few new virtual methods to lldb_private::RegisterContext that allow subclasses to efficiently save/restore register states and changed the RegisterContextGDBRemote to take advantage of these new calls. llvm-svn: 194621 --- lldb/tools/debugserver/source/MacOSX/MachThreadList.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/tools/debugserver/source/MacOSX/MachThreadList.h') diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.h b/lldb/tools/debugserver/source/MacOSX/MachThreadList.h index 85097314b02..46bccfee8de 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.h +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.h @@ -30,6 +30,8 @@ public: bool SetRegisterValue (nub_thread_t tid, uint32_t reg_set_idx, uint32_t reg_idx, const DNBRegisterValue *reg_value) const; nub_size_t GetRegisterContext (nub_thread_t tid, void *buf, size_t buf_len); nub_size_t SetRegisterContext (nub_thread_t tid, const void *buf, size_t buf_len); + uint32_t SaveRegisterState (nub_thread_t tid); + bool RestoreRegisterState (nub_thread_t tid, uint32_t save_id); const char * GetThreadInfo (nub_thread_t tid) const; void ProcessWillResume (MachProcess *process, const DNBThreadResumeActions &thread_actions); uint32_t ProcessDidStop (MachProcess *process); -- cgit v1.2.3