| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 131035
|
|
|
|
|
|
| |
test case to take advantage of 'ths_module == that_module'.
llvm-svn: 130709
|
|
|
|
|
|
|
| |
the breakpoint ID and provides the semantics needed for '==' and '!='. And
modify LLDBIteratorTestCase.lldb_iter_2() to use '==' between two SBBreakpoint's.
llvm-svn: 130531
|
|
|
|
|
|
|
|
| |
pattern now that
the lldb iteration protocol has been added to lldb.py module.
llvm-svn: 130452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python module.
This is so that the objects which support the iteration protocol are immediately obvious
from looking at the lldb.py file.
SBTarget supports two types of iterations: module and breakpoint. For an SBTarget instance,
you will need to issue either:
for m in target.module_iter()
or
for b in target.breakpoint_iter()
For other single iteration protocol objects, just use, for example:
for thread in process:
ID = thread.GetThreadID()
for frame in thread:
frame.Disassemble()
....
llvm-svn: 130442
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the getelem
method names of all the lldb container objects and returns an iterator object when
passed an eligible lldb container object.
Example:
from lldb_util import smart_iter
for thread in smart_iter(process):
ID = thread.GetThreadID()
if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
stopped_due_to_breakpoint = True
for frame in smart_iter(thread):
self.assertTrue(frame.GetThread().GetThreadID() == ID)
...
Add a test case for lldb.smart_iter().
llvm-svn: 130332
|
|
|
|
| |
llvm-svn: 130325
|
|
|
|
|
|
| |
its SBBreakpoint containees.
llvm-svn: 130323
|
|
|
|
|
|
|
|
| |
be consistent.
And modify the test cases accordingly.
llvm-svn: 130314
|
|
|
|
|
|
|
|
| |
for lldb objects which can contain other lldb objects. Examples are:
SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains
SBThread, SBThread contains SBFrame, etc.
llvm-svn: 130258
|
|
|
|
|
|
|
|
| |
to be consistent.
And modify the test cases accordingly.
llvm-svn: 130174
|
|
|
|
|
|
|
|
|
|
| |
i.e., with 'SBStream &description' first, followed by 'DescriptionLevel level'.
Modify lldbutil.py so that get_description() for a target or breakpoint location
can just take the lldb object itself without specifying an option to mean option
lldb.eDescriptionLevelBrief. Modify TestTargetAPI.py to exercise this logic path.
llvm-svn: 130147
|
|
|
|
|
|
| |
utility function.
llvm-svn: 130041
|
|
|
|
|
|
|
|
| |
lldbutil.py
and use it from TestTargetAPI.py.
llvm-svn: 130038
|
|
|
|
|
|
| |
lldb::DescriptionLevel enum.
llvm-svn: 130029
|
|
|
|
|
|
| |
print stack traces.
llvm-svn: 129828
|
|
|
|
|
|
| |
And use self.TraceOn() API.
llvm-svn: 129797
|
|
|
|
| |
llvm-svn: 129795
|
|
|
|
| |
llvm-svn: 129793
|
|
|
|
| |
llvm-svn: 129792
|
|
|
|
|
|
| |
And use self.TraceOn() in order to print more debug output.
llvm-svn: 129791
|
|
|
|
|
|
| |
And use self.TraceOn() API.
llvm-svn: 129790
|
|
|
|
| |
llvm-svn: 129789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.
The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.
There's also a general setting:
target.prefer-dynamic-value (boolean) = 'true'
which is consulted if you call "frame var" without supplying a value for the -d option.
llvm-svn: 129623
|
|
|
|
|
|
|
|
|
|
|
|
| |
lldb::SymbolType SBSymbol::GetType();
lldb::SectionType SBAddress::GetSectionType ();
lldb::SBModule SBAddress::GetModule ();
Also add an lldb::SBModule::GetUUIDString() API which is easier for Python
to work with in the test script.
llvm-svn: 128695
|
|
|
|
| |
llvm-svn: 128685
|
|
|
|
|
|
|
|
|
|
| |
process using the
SBTarget.Launch() API, stop at a breakpoint, get the stopped thread, and verify that the
pid of the stopped thread's process is equal to the pid of the process returned by
SBTarget.Launch().
llvm-svn: 127444
|
|
|
|
|
|
|
|
| |
SBThread.RunToAddress(lldb::addr_t addr) API.
The test itself is not working yet.
llvm-svn: 127436
|
|
|
|
|
|
|
|
| |
stopping at a breakpoint,
doing three step-over's, then verifying that the correct source line number is reached.
llvm-svn: 127432
|
|
|
|
| |
llvm-svn: 127421
|
|
|
|
|
|
|
|
| |
call where the call site is at function b().
Verifies that after the thread.StepOut(), we are at the correct line within function b.
llvm-svn: 127374
|
|
|
|
|
|
|
|
| |
continue till it's done.
We should still see the entire stdout redirected once the process is finished.
llvm-svn: 127184
|
|
|
|
|
|
| |
redirected to a file.
llvm-svn: 127179
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently it has only test cases for SBThread.GetStopDescription() API.
Also modified lldb.swig to add typemap for (char *dst, size_t dst_len)
which occurs for SBThread::GetStopDescription() C++ API. For Python
scripting:
# Due to the typemap magic (see lldb.swig), we pass in an (int)length to GetStopDescription
# and expect to get a Python string as the result object!
# The 100 is just an arbitrary number specifying the buffer size.
stop_description = thread.GetStopDescription(100)
llvm-svn: 127173
|
|
|
|
|
|
|
|
|
|
|
| |
SBProcess.RemoteLaunch()
API with a process not in eStateConnected, and checks that the remote launch failed.
Modify SBProcess::RemoteLaunch()/RemoteAttachToProcessWithID()'s log statements to fix a
crasher when logging is turned on.
llvm-svn: 127055
|
|
|
|
|
|
|
| |
We start a fake debugserver listening on localhost:12345 and issue the command
'process connect connect://localhost:12345' to connect to it.
llvm-svn: 127048
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SBFunction/SBSymbol.GetStartAddress(),
among other things:
// When stopped on breakppint 1, we can get the line entry using SBFrame API
// SBFrame.GetLineEntry(). We'll get the start address for the the line entry
// with the SBAddress type, resolve the symbol context using the SBTarget API
// SBTarget.ResolveSymbolContextForAddress() in order to get the SBSymbol.
//
// We then stop at breakpoint 2, get the SBFrame, and the the SBFunction object.
//
// The address from calling GetStartAddress() on the symbol and the function
// should point to the same address, and we also verify that.
And add one utility function disassemble(target, function_or_symbol) to lldbutil.py:
"""Disassemble the function or symbol given a target.
It returns the disassembly content in a string object.
"""
TestDisasm.py uses the disassemble() function to do disassembly on the SBSymbol, and
then the SBFunction object.
llvm-svn: 126955
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
// When stopped on breakppint 1, and then 2, we can get the line entries using
// SBFrame API SBFrame.GetLineEntry(). We'll get the start addresses for the
// two line entries; with the start address (of SBAddress type), we can then
// resolve the symbol context using the SBTarget API
// SBTarget.ResolveSymbolContextForAddress().
//
// The two symbol context should point to the same symbol, i.e., 'a' function.
Add two utility functions to lldbutil.py:
o get_stopped_threads(process, reason):
return the list of threads with the specified stop reason or an empty list if not found
o get_stopped_thread(process, reason):
return the first thread with the given stop reason or None if not found
llvm-svn: 126916
|
|
|
|
| |
llvm-svn: 126867
|
|
|
|
|
|
|
|
|
|
|
|
| |
o int_to_bytearray()
o bytearray_to_int()
They return/interpret the bytearray in the little endian format.
For big endian, simply perform ba.reverse() on the bytearray object.
And modify TestProcessAPI.py to take advantage of the functions.
llvm-svn: 126813
|
|
|
|
|
|
|
|
|
| |
GetByteOrder(),
among other SBProcess APIs, to write (int)256 into a memory location of a global variable
(int)my_int and reads/checks the variable afterwards.
llvm-svn: 126792
|
|
|
|
| |
llvm-svn: 126774
|
|
|
|
|
|
| |
This makes the number of total tests equal to 201.
llvm-svn: 126769
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
particular, this tests
the SBProcess.ReadMemory() API, which, due to SWIG typemap'ing, expects 3 arguments (the location
to read from, the size in bytes to read, and an SBError object), and returns the result as a
Python string object.
On SnowLeopard where this has been tested, the SWIG script needs to be pampered (use the exact
same parameter names as in SBProcess.h) in order for this to work.
llvm-svn: 126736
|
|
|
|
| |
llvm-svn: 124828
|
|
|
|
|
|
| |
SWIG renaming done to work around deprecated APIs.
llvm-svn: 124075
|
|
|
|
| |
llvm-svn: 123181
|
|
|
|
|
|
|
|
|
| |
get the argument values of the call stacks when stopped on the breakpoint.
Radar has been filed for the expected failures:
test failure: ./dotest.py -v -w -t -p TestFrames (argument values are wrong)
llvm-svn: 122460
|
|
|
|
|
|
| |
SBTarget.LaunchProcess() API.
llvm-svn: 122450
|
|
|
|
| |
llvm-svn: 122382
|