Merge LLDB plugin into master
ClosedPublic

Authored by qi437103 on Jul 27 2016, 1:04 AM.

Details

Summary

LLDB plugin is now working for basic debugging use cases.

Things that work:

  • Basic execution control: start, continue, step etc.
  • Break points
  • Frame stack list
  • Symbol info when hover
  • Variables & Expressions (still have caveats)
  • Multi-threaded debugee (must use LLDB trunk version)
  • Debugger console
  • Remote debugging (only tested on localhost)

Things not working yet:

  • Disassembly/Register view
  • Memory view
  • Pending break points and anything requires pending break points
  • Watch points
  • Attach to process (works internally, no UI to access it)

Not tested:

  • Examine core file
  • Drkonqi support

There's a debugers/lldb/TODO.txt which contains more detailed description of current limitations and link to related LLDB bug reports.

Note: the whole thing might crash from time to time without this bug fixed. I'm using LLDB built myself with the code fixed. The patch can be found in the bug report.

Test Plan
  • GDB unit tests (such that I didn't break anything)
  • LLDB unit tests (some of them are skipped due to limitations mentioned above)
  • Manually tested

Diff Detail

Repository
R32 KDevelop
Branch
peifeng/lldb-plugin
Lint
No Linters Available
Unit
No Unit Test Coverage
qi437103 updated this revision to Diff 5511.Jul 27 2016, 1:04 AM
qi437103 retitled this revision from to Merge LLDB plugin into master.
qi437103 updated this object.
qi437103 edited the test plan for this revision. (Show Details)
qi437103 added reviewers: apol, KDevelop.
qi437103 set the repository for this revision to R32 KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJul 27 2016, 1:04 AM
qi437103 updated this object.Jul 27 2016, 2:56 PM
apol edited edge metadata.Jul 28 2016, 11:31 PM

:)

debuggers/common/mi/micommand.cpp
286

What does that non-exist command mean?

It only exists in gdb? On neither?

debuggers/common/midebuggerplugin.h
148

Please don't leave commented, boilerplate, code.

debuggers/lldb/TODO.txt
103

Mention attach to process debugging at least?

qi437103 marked 2 inline comments as done.Jul 29 2016, 9:16 AM

Address inline comments

debuggers/common/mi/micommand.cpp
286

It doesn't exist in neither gdb or lldb.

qi437103 updated this revision to Diff 5553.Jul 29 2016, 9:18 AM
qi437103 updated this object.
qi437103 edited edge metadata.
  • Make GDB and LLDB plugin load/unload tool views with debug session
  • Update TODO
qi437103 updated this revision to Diff 5554.Jul 29 2016, 9:20 AM
apol added a comment.Jul 29 2016, 9:48 AM

Address inline comments

It doesn't exist in neither gdb or lldb.

Any reason why we shouldn't just remove them?

Yep, we can safely remove them. It's just that at the time when I added comments, I was not sure whether there's any side effect removing them. But now I can say they are just no use.

qi437103 updated this revision to Diff 5557.Jul 29 2016, 1:15 PM

Remove non-existing MI commands

This revision was automatically updated to reflect the committed changes.
qi437103 reopened this revision.Jul 30 2016, 10:46 PM

Mistakenly closed

apol accepted this revision.Aug 1 2016, 12:41 AM
apol edited edge metadata.
This revision is now accepted and ready to land.Aug 1 2016, 12:41 AM
This revision was automatically updated to reflect the committed changes.