[Lldb-commits] [PATCH] C++ API tests review request

Malea, Daniel daniel.malea at intel.com
Thu May 2 14:55:34 PDT 2013

Hi all,

I'm trying to nail down exactly what multithreaded problems there are with the LLDB API, so I wrote some tests that use it via C++. The same stuff could have been done from Python, but I figured since there's so few C++ tests (one that I found "check_public_api_headers") I figured I'd write some to keep things interesting.

When someone has a moment, could you provide some feedback, as I'm seeing 3 out of 4 tests fail on Linux/Mac OS X — wondering if these are LLDB bugs I'm uncovering, or more likely, that the tests are using the API incorrectly.

Here's a brief description of what the tests do:

  1.  Test that a function registered with SBBreakpoint.SetCallback() is called when a breakpoint is hit. -- the function is not invoked
  2.  Test that an SBListener registered with a process receives an event.
  3.  Test that a process retrieved from an SBEvent can be used to query thread/frame information — retrieving thread/frame works ok, but querying a function name does not
  4.  Test that a process can be resumed from a thread that did not start it — This one's weird: SBProcess::GetState() returns eStateStopped() but calling Process::Resume() fails with error "process is running".

Currently, only #2 passes, which is the simplest case. There's a bunch of boiler plate code in there that is not too interesting. The meat of the test logic are in the .cpp files that are prefixed with "test_".

Thanks a bunch,

More information about the lldb-commits mailing list