diff options
| author | Jim Ingham <jingham@apple.com> | 2011-10-28 01:12:19 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2011-10-28 01:12:19 +0000 |
| commit | 52c7d202410618f10c395ba830b2b6610ad2980e (patch) | |
| tree | 21e7824ddd22299c8b201a768563c7c9464770a2 /lldb/source/Target/StopInfo.cpp | |
| parent | aab78371b9273426a13d76bea5855640e650a056 (diff) | |
| download | bcm5719-llvm-52c7d202410618f10c395ba830b2b6610ad2980e.tar.gz bcm5719-llvm-52c7d202410618f10c395ba830b2b6610ad2980e.zip | |
Grab the address of the breakpoint site for the StopInfoBreakpoint so if
it gets deleted before GetDescription is called we still at least know
where it was.
llvm-svn: 143175
Diffstat (limited to 'lldb/source/Target/StopInfo.cpp')
| -rw-r--r-- | lldb/source/Target/StopInfo.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp index c422a1d290b..cfd340afa4f 100644 --- a/lldb/source/Target/StopInfo.cpp +++ b/lldb/source/Target/StopInfo.cpp @@ -72,8 +72,14 @@ public: m_description(), m_should_stop (false), m_should_stop_is_valid (false), - m_should_perform_action (true) + m_should_perform_action (true), + m_address (LLDB_INVALID_ADDRESS) { + BreakpointSiteSP bp_site_sp (m_thread.GetProcess().GetBreakpointSiteList().FindByID (m_value)); + if (bp_site_sp) + { + m_address = bp_site_sp->GetLoadAddress(); + } } StopInfoBreakpoint (Thread &thread, break_id_t break_id, bool should_stop) : @@ -81,8 +87,14 @@ public: m_description(), m_should_stop (should_stop), m_should_stop_is_valid (true), - m_should_perform_action (true) + m_should_perform_action (true), + m_address (LLDB_INVALID_ADDRESS) { + BreakpointSiteSP bp_site_sp (m_thread.GetProcess().GetBreakpointSiteList().FindByID (m_value)); + if (bp_site_sp) + { + m_address = bp_site_sp->GetLoadAddress(); + } } virtual ~StopInfoBreakpoint () @@ -300,7 +312,10 @@ public: else { StreamString strm; - strm.Printf("breakpoint site %lli", m_value); + if (m_address == LLDB_INVALID_ADDRESS) + strm.Printf("breakpoint site %lli which has been deleted - unknown address", m_value); + else + strm.Printf("breakpoint site %lli which has been deleted - was at 0x%llx", m_value, m_address); m_description.swap (strm.GetString()); } } @@ -313,6 +328,9 @@ private: bool m_should_stop_is_valid; bool m_should_perform_action; // Since we are trying to preserve the "state" of the system even if we run functions // etc. behind the users backs, we need to make sure we only REALLY perform the action once. + lldb::addr_t m_address; // We use this to capture the breakpoint site address when we create the StopInfo, + // in case somebody deletes it between the time the StopInfo is made and the + // description is asked for. }; |

