From 358cf1ea302ebc9c2f307aa710c22821a4ab670a Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 25 Jun 2015 21:46:34 +0000 Subject: Resubmitting 240466 after fixing the linux test suite failures. A few extras were fixed - Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected. - Since some places want to access the address as a reference, I added a few new functions to symbol: Address &Symbol::GetAddressRef(); const Address &Symbol::GetAddressRef() const; Linux test suite passes just fine now. llvm-svn: 240702 --- .../Plugins/Process/gdb-remote/ProcessGDBRemote.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index 16e47dfcba6..d810d9ce2f1 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -326,6 +326,9 @@ protected: void GetMaxMemorySize(); + bool + CalculateThreadStopInfo (ThreadGDBRemote *thread); + //------------------------------------------------------------------ /// Broadcaster event bits definitions. //------------------------------------------------------------------ @@ -348,7 +351,9 @@ protected: typedef std::vector tid_collection; typedef std::vector< std::pair > tid_sig_collection; typedef std::map MMapMap; + typedef std::map ExpeditedRegisterMap; tid_collection m_thread_ids; // Thread IDs for all threads. This list gets updated after stopping + StructuredData::ObjectSP m_threads_info_sp; // Stop info for all threads if "jThreadsInfo" packet is supported tid_collection m_continue_c_tids; // 'c' for continue tid_sig_collection m_continue_C_tids; // 'C' for continue with signal tid_collection m_continue_s_tids; // 's' for step @@ -385,6 +390,20 @@ protected: lldb::StateType SetThreadStopInfo (StringExtractor& stop_packet); + lldb::StateType + SetThreadStopInfo (StructuredData::Dictionary *thread_dict); + + lldb::ThreadSP + SetThreadStopInfo (lldb::tid_t tid, + ExpeditedRegisterMap &expedited_register_map, + uint8_t signo, + const std::string &thread_name, + const std::string &reason, + const std::string &description, + uint32_t exc_type, + const std::vector &exc_data, + lldb::addr_t thread_dispatch_qaddr); + void HandleStopReplySequence (); -- cgit v1.2.3