Page MenuHomePhabricator

[lldb-mi] Fix setting of breakpoints using file:func syntax.
ClosedPublic

Authored by dawn on Jul 24 2015, 5:09 PM.

Details

Summary

Given eBreakPoint_ByFileFn, code previously was calling:

sbTarget.BreakpointCreateByName(strFileFn.c_str(), fileName.c_str());

which calls the overload:

lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);

but the module_name is expected to be the exe or dll here, i.e. for -break-insert a.out:func which isn't a valid use of -break-insert in gdb.

This patch calls the correct overload:

lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name,
                        const SBFileSpecList &module_list,
                        const SBFileSpecList &comp_unit_list);

Comments were added to the tests for cases that won't work due to bugs in lldb.

Diff Detail

Repository
rL LLVM

Event Timeline

dawn updated this revision to Diff 30623.Jul 24 2015, 5:09 PM
dawn retitled this revision from to [lldb-mi] Fix setting of breakpoints using file:func syntax..
dawn updated this object.
dawn added reviewers: abidh, brucem, ki.stfu.
dawn set the repository for this revision to rL LLVM.
dawn added a subscriber: lldb-commits.
ki.stfu requested changes to this revision.Jul 26 2015, 11:42 PM
ki.stfu edited edge metadata.
ki.stfu added inline comments.
test/tools/lldb-mi/breakpoint/TestMiBreak.py
91

remove please

This revision now requires changes to proceed.Jul 26 2015, 11:42 PM
dawn updated this revision to Diff 30707.Jul 27 2015, 10:38 AM
dawn edited edge metadata.

Line removed as requested.

dawn updated this revision to Diff 30708.Jul 27 2015, 10:44 AM
dawn edited edge metadata.

Removed duplicate test for "::main" which was already added in http://reviews.llvm.org/D11396.

ki.stfu accepted this revision.Jul 27 2015, 10:09 PM
ki.stfu edited edge metadata.
This revision is now accepted and ready to land.Jul 27 2015, 10:09 PM
This revision was automatically updated to reflect the committed changes.