Commit 645e5539 authored by Peifeng Yu's avatar Peifeng Yu
Browse files

LLDB plugin: fix setting variable format not work

parent c6c540d1
......@@ -355,7 +355,7 @@ void MIVariable::formatChanged()
{
if (sessionIsAlive()) {
debugSession->addCommand(VarSetFormat,
QString(" \"%1\" %2 ").arg(varobj_).arg(format2str(format())),
QString(" %1 %2 ").arg(varobj_).arg(format2str(format())),
new SetFormatHandler(this));
}
}
......
......@@ -37,11 +37,13 @@
- File bug to lldb-mi
* HIGH PRIORITY: -break-insert
+ pending breakpoints set with '-f' not got resolved after file loaded
+ [SUBMITED] pending breakpoints set with '-f' not got resolved after file loaded
- fix is simple from lldb-mi side but quite difficult from kdevelop side.
maybe should write the patch myself
+ pending breakpoints '-f' can only be last flag switch
+ create disabled breakpoint with '-d' not working when combined with '-f'
+ [SUBMITED] pending breakpoints '-f' can only be last flag switch
+ [SUBMITED] create disabled breakpoint with '-d' not working when combined with '-f'
- https://llvm.org/bugs/show_bug.cgi?id=28703
+ -break-enable has no effect
* breakpoint hit doesn't generate corresponding breakpoint-modified notification
(needed to update hitCount)
* -break-watch command not supported
......@@ -49,17 +51,20 @@
* when hit watch point, nothing is output, which confuses the controller
* thread-info returns malformated result
+ there should be only one 'frame' key for each thread in the list
+ there shoule be a current-thread-id field (fixed at least in revision 265858)
+ [FIXED] there shoule be a current-thread-id field (fixed at least in revision 265858)
* var-update doesn't support * as variable name
* can't have space in environment cd
* -inferior-tty-set only has dummy implementation
* 'process launch' doesn't provide thread-group-started notification
* sliently stop when attaching to process, which confuses the controller
* sliently stop when request stop at start
* -data-disassemble start and end address parameter doesn't accept expressions
* [SUBMITED] [PATCHED] cli output not wrapped in console stream record
* [PATCHED] -data-disassemble start and end address parameter doesn't accept expressions
* -gdb-set not fully implemented
+ environment
+ disassembly-flavor
+ [PATCHED] disassembly-flavor
* -gdb-show not fully implemented
+ [PATCHED] disassembly-flavor
* File bug to lldb-mi for other missing commands
- Data formatter for lldb
......
......@@ -45,3 +45,31 @@ void LldbVariable::handleRawUpdate(const ResultRecord& r)
if (changelist.size() == 1)
handleUpdate(changelist[0]);
}
void LldbVariable::formatChanged()
{
if(childCount())
{
foreach(TreeItem* item, childItems) {
Q_ASSERT(dynamic_cast<MIVariable*>(item));
if( MIVariable* var=dynamic_cast<MIVariable*>(item))
var->setFormat(format());
}
}
else
{
if (sessionIsAlive()) {
QPointer<LldbVariable> guarded_this(this);
debugSession->addCommand(
VarSetFormat,
QString(" %1 %2 ").arg(varobj_).arg(format2str(format())),
[guarded_this](const ResultRecord &r){
if(guarded_this && r.hasField("changelist")) {
if (r["changelist"].size() > 0) {
guarded_this->handleRawUpdate(r);
}
}
});
}
}
}
......@@ -45,6 +45,9 @@ public:
// For testing
using KDevelop::Variable::childCount;
using KDevelop::Variable::child;
protected:
void formatChanged() override;
};
} // end of namespace LLDB
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment