Commit Graph

1491 Commits

Author SHA1 Message Date
Johnny Chen d5f66fcbac Add a test case for the SBFrame APIs. In particular, it uses the frame API to
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
2010-12-23 01:12:19 +00:00
Johnny Chen cdbe594841 No need to pass an empty string as an arg or as an env string to the SBTarget.LaunchProcess() API.
llvm-svn: 122450
2010-12-22 22:56:19 +00:00
Johnny Chen 858718a9e2 Simplify the breakpoint command function. Instead of fetching the command interpreter
and run the "process continue" command, use the SBProcess.Continue() API.

llvm-svn: 122434
2010-12-22 20:36:29 +00:00
Johnny Chen d161a85700 Broadcaster::AddListener(): Bail out early if the passed in Listener pointer is
NULL, instead of registering a NULL listener and to crash later.

llvm-svn: 122429
2010-12-22 19:29:31 +00:00
Johnny Chen 73f7fa82e5 Modify one assertion message.
llvm-svn: 122428
2010-12-22 19:23:44 +00:00
Jason Molenda f830e481c2 RegisterContextLLDB.cpp (InitializeNonZerothFrame): If we get a
0 mid-stack, stop backtracing.

SectionLoadList.cpp (ResolveLoadAddress): Don't assert on an
out-of-range address, just return an invalid Address object.
The unwinder may be passing in invalid addresses on the final
stack frame and the assert is a problem.

llvm-svn: 122386
2010-12-22 02:02:45 +00:00
Johnny Chen 77c4697735 Fix some typos in the docstrings and also update the test method names.
llvm-svn: 122382
2010-12-22 00:56:47 +00:00
Johnny Chen f2df189b72 Add test cases for registering a listener object with the broadcaster of a process
and waiting for two expected state changed events to arrive: "running" followed by
"stopped".

llvm-svn: 122380
2010-12-22 00:32:54 +00:00
Johnny Chen 3635eae697 Rename the test methods to be more meaningful.
llvm-svn: 122352
2010-12-21 19:52:54 +00:00
Johnny Chen 4f8caab924 Set the debugger to asynchronous mode before using the Python API call to kill
the process.  The custom thread started before this point is running in a loop
waiting for events to come.

llvm-svn: 122316
2010-12-21 05:43:37 +00:00
Greg Clayton 6bcfafa0fe Updated Xcode build version to lldb-37 and debugserver-123.
llvm-svn: 122308
2010-12-21 02:23:58 +00:00
Johnny Chen 0b0c57806b Fix typo.
llvm-svn: 122306
2010-12-21 02:10:18 +00:00
Johnny Chen f667ab526b Added python_api/event/TestEvents.py to get the listener object associated with the
debugger and to exercise some event APIs.

llvm-svn: 122304
2010-12-21 02:06:56 +00:00
Greg Clayton bdea7cee67 Remove an assertion that is causing crashes. We do need to find a way to reproduce when this assertion asserts, but we should crash our debug session because of it. For now we log to stderr in hope of tracking it down.
llvm-svn: 122290
2010-12-20 23:42:12 +00:00
Johnny Chen 25c04838e9 The recent change in argument parsing is messing up the emacs lldb mode's capability to properly
scan the debugger output for program counter when it comes to the output of 'Up Stack' or 'Down Stack'
gud commands.  Remove the single quotes around the argument strings for "settings set frame-format"
and "settings set thread-format" commands to avoid the single quotes which were being emitted as part
of the debugger output.

llvm-svn: 122286
2010-12-20 22:58:58 +00:00
Johnny Chen 592b50e9dc Patch from Stephen:
Provide a missing resolve_path argument in calls to FileSpec's
constructor for both Linux and FreeBSD code fragments.

llvm-svn: 122275
2010-12-20 21:52:18 +00:00
Johnny Chen 8c46c6fee1 Patch from Stephen Wilson:
Provide full qualification for #include's.

llvm-svn: 122274
2010-12-20 21:45:22 +00:00
Johnny Chen 622220b66d Change the test case test_set_prompt() to no longer require quotes around lldb2 in:
# Set prompt to 'lldb2'.
   self.runCmd("settings set prompt lldb2")

llvm-svn: 122272
2010-12-20 21:29:34 +00:00
Johnny Chen a6846833ea Patch from Stephen Wilson:
POSIX does not define sockaddr_un.sun_len.  Set only when required by
the platform.

llvm-svn: 122266
2010-12-20 21:07:54 +00:00
Greg Clayton af67cecd47 The LLDB API (lldb::SB*) is now thread safe!
llvm-svn: 122262
2010-12-20 20:49:23 +00:00
Johnny Chen 508265afa5 Patch from Stephen Wilson:
Fix a typo where a qualification was being interpreted as a label.

llvm-svn: 122260
2010-12-20 20:33:26 +00:00
Caroline Tice 3d6086f628 Add code to make sure InputReaders finish and are cleaned up when
a Debugger object is destroyed or re-set. (Thus making sure that, for
example, the Python interpreter finishes and exits cleanly rather than
being left in an undefined state.)

llvm-svn: 122255
2010-12-20 18:35:50 +00:00
Greg Clayton fff42e6241 Line tables were trying to be too clever and only use 24 bits for a line
table offset where the offset is within a section. Increased the section
offset for line table entries to be 32 bits (from 24 bits), giving each 
section a 4G offset, and increased the section index to 32 bits (from 8 bits).

llvm-svn: 122200
2010-12-19 22:07:39 +00:00
Greg Clayton 9906250fe2 Removed logging code that I accidentally left in after recent changes.
llvm-svn: 122198
2010-12-19 21:36:12 +00:00
Greg Clayton 6ad07dd9e9 Improved our argument parsing abilities to be able to handle stuff more like
a shell would interpret it. A few examples that we now handle correctly

INPUT: "Hello "world
OUTPUT: "Hello World"

INPUT: "Hello "' World'
OUTPUT: "Hello World"

INPUT: Hello" World"
OUTPUT: "Hello World"

This broke the setting of dictionary values for the "settings set" command
for things like:

(lldb) settings set target.process.env-vars ["MY_ENV_VAR"]=YES

since we would drop the quotes. I fixed the user settings controller to use
a regular expression so it can accept any of the following inputs for
dictionary setting:

settings set target.process.env-vars ["MY_ENV_VAR"]=YES
settings set target.process.env-vars [MY_ENV_VAR]=YES
settings set target.process.env-vars MY_ENV_VAR=YES

We might want to eventually drop the first two syntaxes, but I won't make
that decision right now.

This allows more natural setting of the envirorment variables:

settings set target.process.env-vars MY_ENV_VAR=YES ABC=DEF CWD=/tmp

llvm-svn: 122166
2010-12-19 03:41:24 +00:00
Greg Clayton 3b14763356 Linux patches from Stephen Wilson.
llvm-svn: 122130
2010-12-18 01:54:34 +00:00
Greg Clayton 5c844d51c8 Linux patches from Stephen Wilson.
llvm-svn: 122128
2010-12-18 01:52:51 +00:00
Greg Clayton deaeb2c18e Linux patches from Stephen Wilson.
llvm-svn: 122127
2010-12-18 01:52:08 +00:00
Greg Clayton b096dcae4a Linux patches from Stephen Wilson.
llvm-svn: 122126
2010-12-18 01:49:57 +00:00
Greg Clayton 082bb00bc4 Linux patches from Stephen Wilson.
llvm-svn: 122125
2010-12-18 01:48:09 +00:00
Sean Callanan ed85f908d6 Fixed the handling of the _cmd parameter in the i386
ABI.

llvm-svn: 122118
2010-12-18 00:32:25 +00:00
Johnny Chen 9633214507 Fix wrong test logic -- should pass "-s address" option to "image dump symtab"
in order to sort the output by address.

llvm-svn: 122071
2010-12-17 18:02:08 +00:00
Greg Clayton 8f49e51853 Bumped Xcode project versions to for lldb-36 and debugserver-122.
llvm-svn: 122061
2010-12-17 15:59:24 +00:00
Greg Clayton 8ac365cc4e Removed darwin specific CPU type defines to make UnwindAssemblyProfiler_x86 able to compile on linux (patch from Stephen Wilson).
llvm-svn: 122060
2010-12-17 15:54:09 +00:00
Greg Clayton 442d7544ac Removed libunwind sources as we aren't using them anymore.
llvm-svn: 122059
2010-12-17 15:50:20 +00:00
Greg Clayton f028a1fb84 Added access to set the current stack frame within a thread so any command
line commands can use the current thread/frame.

Fixed an issue with expressions that get sandboxed in an objective C method
where unichar wasn't being passed down.

Added a "static size_t Scalar::GetMaxByteSize();" function in case we need
to know the max supported by size of something within a Scalar object.

llvm-svn: 122027
2010-12-17 02:26:24 +00:00
Johnny Chen 7ac81906ea Modify the regexp to match the debugger output of the 'Up Stack' and 'Down Stack'
gud commands in order to more reliably locate the program counter and to display
the file-and-line.

llvm-svn: 122020
2010-12-17 01:35:41 +00:00
Greg Clayton 3c310a1a79 Fixes for linux building from Stephen Wilson.
llvm-svn: 122002
2010-12-16 21:36:30 +00:00
Greg Clayton ce6d19a732 Fixes for linux building from Stephen Wilson.
llvm-svn: 122001
2010-12-16 21:33:41 +00:00
Greg Clayton ed6deadb46 Added header doc for the recently added Process::ReadUnsignedInteger (addr_t addr, size_t int_byte_size, Error &error) function.
llvm-svn: 121999
2010-12-16 20:15:34 +00:00
Greg Clayton 58a4c46766 Added the ability to read unsigned integers from the Process:
uint64_t Process::ReadUnsignedInteger (addr_t addr, size_t int_byte_size, Error &error);

llvm-svn: 121996
2010-12-16 20:01:20 +00:00
Johnny Chen 62f68ee564 Use SBModule.GetDescription(SBStream) API to get the module description to match
against.

llvm-svn: 121989
2010-12-16 18:37:46 +00:00
Johnny Chen de442a6878 Update the comment section of blacklist.py with the command line to reproduce the crash.
llvm-svn: 121986
2010-12-16 18:10:16 +00:00
Jason Molenda 4f75c691a5 Remove #include of non-existant lldb/Expression/ASTSplitConsumer.h
(from Sean's commit a minute ago)

llvm-svn: 121954
2010-12-16 03:23:53 +00:00
Sean Callanan e4ec90e990 Implemented a feature where the expression parser
can avoid running the code in the target if the
expression's result is known and the expression
has no side effects.

Right now this feature is quite conservative in
its guess about side effects, and it only computes
integer results, but the machinery to make it more
sophisticated is there.

llvm-svn: 121952
2010-12-16 03:17:46 +00:00
Johnny Chen 13eb0eaea7 Patch from Stephen Wilson:
Extend Swig's include search path.

   Cover both /usr/include and /usr/local/include.  This should allow Swig to find
   system headers such as stdint.h on all platforms we currently support.

llvm-svn: 121943
2010-12-16 02:03:06 +00:00
Johnny Chen 6becf1c924 Add python_api/symbol-context to test getting the symbol context while stopped
on a frame and to exercise the methods of SBSymbolContext.

llvm-svn: 121941
2010-12-16 01:41:37 +00:00
Johnny Chen 4b33209a04 Patch by Stephen Wilson to make Swig happy building on linux.
Pass the test suite on Mac OS X Snow Leopard.

llvm-svn: 121924
2010-12-16 00:01:06 +00:00
Johnny Chen 8e74416cd5 Fix one of the golden output of "frame variable -t *self" to be:
"(MyString) *self"

llvm-svn: 121907
2010-12-15 22:50:54 +00:00
Johnny Chen 763d1a17a1 Fix typos in SBBreakpoint::GetThreadIndex()/GetThreadName(), and test sequences
for the two API calls.

llvm-svn: 121898
2010-12-15 21:39:37 +00:00