aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-09-16 21:41:42 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-09-16 21:41:42 +0000
commitde6bd2432cf479d4e6ef83aacbc0582b7beefe23 (patch)
tree9abeb5c44339c638b6aa228d57973c699ca3a8c4 /lldb/source/Commands/CommandObjectFrame.cpp
parentf0d3786945e1bb149e0bb5b46437fe8b93140738 (diff)
downloadllvm-de6bd2432cf479d4e6ef83aacbc0582b7beefe23.zip
llvm-de6bd2432cf479d4e6ef83aacbc0582b7beefe23.tar.gz
llvm-de6bd2432cf479d4e6ef83aacbc0582b7beefe23.tar.bz2
Add a declaraion info member field to the WatchpointLocation class.
Modify CommandObjectFrame.cpp to populate this field when creating a watchpoint location. Update the test case to verify that the declaration info matches the file and line number. llvm-svn: 139946
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 8bf9b14..314507c 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -11,12 +11,14 @@
// C Includes
// C++ Includes
+#include <string>
// Other libraries and framework includes
// Project includes
#include "lldb/Core/DataVisualization.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/StreamFile.h"
+#include "lldb/Core/StreamString.h"
#include "lldb/Core/Timer.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObject.h"
@@ -535,8 +537,15 @@ public:
exe_ctx.target->CreateWatchpointLocation(addr, size, watch_type).get();
if (wp_loc)
{
+ if (var_sp && var_sp->GetDeclaration().GetFile())
+ {
+ StreamString ss;
+ var_sp->GetDeclaration().DumpStopContext(&ss, true);
+ wp_loc->SetDeclInfo(ss.GetString());
+ }
+ StreamString ss;
output_stream.Printf("Watchpoint created: ");
- wp_loc->GetDescription(&output_stream, lldb::eDescriptionLevelBrief);
+ wp_loc->GetDescription(&output_stream, lldb::eDescriptionLevelFull);
output_stream.EOL();
result.SetStatus(eReturnStatusSuccessFinishResult);
}