Commit Graph

2791 Commits

Author SHA1 Message Date
Enrico Granata 8f11a4ac96 new webpage describing type command
llvm-svn: 134575
2011-07-07 00:39:55 +00:00
Enrico Granata 82a7d98342 new detailed descriptions for type summary add and type format add
some changes to the help system code for better display of long help text
-p and -r flags now also work for type format add

llvm-svn: 134574
2011-07-07 00:38:40 +00:00
Johnny Chen bd68b95889 Add class docstrings with example usage for SBBreakpoint and SBBreakpointLocation.
llvm-svn: 134571
2011-07-07 00:14:13 +00:00
Johnny Chen 1630367ea6 Add class docstrings with example usage for SBFunction and SBAddress.
llvm-svn: 134560
2011-07-06 23:23:53 +00:00
Johnny Chen 194cd7eb24 SWIG doesn't need two methods of the same name 'GetDescription' but differ in
the presence of 'const'.  Ifndef the non-const one out.

llvm-svn: 134553
2011-07-06 22:23:24 +00:00
Johnny Chen f82eb4043b Add fuzz calls for SBType::IsPointerType(void *opaque_type).
llvm-svn: 134551
2011-07-06 22:11:38 +00:00
Johnny Chen 102ac765f0 Add post-processing step to transform the docstring from 'char', i.e., 'char *', to 'str', i.e., Python string.
llvm-svn: 134543
2011-07-06 21:55:45 +00:00
Greg Clayton 58f1c12756 Revert some Xcode project changes that I didn't intend to checkin.
llvm-svn: 134541
2011-07-06 21:43:20 +00:00
Greg Clayton 9432989dd3 Bumped Xcode project version for lldb-68.
llvm-svn: 134534
2011-07-06 21:01:19 +00:00
Johnny Chen e58f332b8c Add docstrings for the primordial object -- SBDebugger.
The swig "autodoc" feature to remove '*' from 'char *' will be handled by doing
post-processing on the lldb.py module.

llvm-svn: 134524
2011-07-06 19:28:33 +00:00
Enrico Granata a7187d0000 bug fix in summary strings:
- ${*var[].something} was not working as expected
options -p and -r now also work for type format add

llvm-svn: 134523
2011-07-06 19:27:11 +00:00
Johnny Chen d4deaf2677 Remove unnecessary 'import' statement.
llvm-svn: 134519
2011-07-06 19:09:25 +00:00
Greg Clayton dd0649bc5f Fixed an issue that was causing us to crash when evaluating expressions for
objective C or C++ methods when "self" or "this" were in scope, but had 
invalid locations in a DWARF location list. The lack of a valid value caused
us to use an invalid type value and then we tried to import that invalid 
value and we would crash.

llvm-svn: 134518
2011-07-06 18:55:08 +00:00
Jim Ingham 89b6109be8 Set the EvaluationPoint's m_thread_id to the RIGHT invalid define...
llvm-svn: 134505
2011-07-06 17:42:14 +00:00
Greg Clayton 262f80df5e Made the string representation for a SBValue return what "frame variable"
would return instead of a less than helpful "name: '%s'" description.

Make sure that when we ask for the error from a ValueObject object we
first update the value if needed.

Cleaned up some SB functions to use internal functions and not re-call
through the public API when possible.

llvm-svn: 134497
2011-07-06 16:49:27 +00:00
Enrico Granata e443ba736b Fixed some format names
llvm-svn: 134492
2011-07-06 15:56:06 +00:00
Greg Clayton 34132754bd Fixed some issues with ARM backtraces by not processing any push/pop
instructions if they are conditional. Also fixed issues where the PC wasn't
getting bit zero stripped for ARM targets when a stack frame was thumb. We
now properly call through the GetOpcodeLoadAddress() functions to make sure
the addresses are properly stripped for any targets that may decorate up
their addresses.

We now don't pass the SIGSTOP signals along. We can revisit this soon, but
currently this was interfering with debugging some older ARM targets that
don't have vCont support in the GDB server.

llvm-svn: 134461
2011-07-06 04:07:21 +00:00
Enrico Granata 9fc1944ece new syntax for summary strings:
- ${*expr} now simply means to dereference expr before actually using it
 - bitfields, array ranges and pointer ranges now work in a (hopefully) more natural and language-compliant way
a new class TypeHierarchyNavigator replicates the behavior of the FormatManager in going through type hierarchies
when one-lining summary strings, children's summaries can be used as well as values

llvm-svn: 134458
2011-07-06 02:13:41 +00:00
Johnny Chen af51b1f709 Add a more verbose docstring for SBThread.h.
llvm-svn: 134452
2011-07-06 00:16:21 +00:00
Johnny Chen 491c3d72ac Add swig docstrings for SBBlock.h.
llvm-svn: 134451
2011-07-05 23:54:12 +00:00
Johnny Chen 34ed733c69 Add swig docstrings for SBModule.h, plus ifndef the SBModule::GetUUIDBytes() API out if swig.
Fix typos in the comment for Module.h.

llvm-svn: 134446
2011-07-05 22:03:36 +00:00
Johnny Chen bf868492b8 Add a more verbose docstring to the SBSymbolContext API class.
Add doxygen/docstring to SBProcess.RemoteAttachToProcessWithID() API method.

llvm-svn: 134437
2011-07-05 19:18:41 +00:00
Johnny Chen c201d8a999 Add a CLEANUP_DOCSTRING state to our FSM to do cleanup of the Python docstrings
generated from the swig docstring features instead of blindly applying the
cleanup action for all input lines.

llvm-svn: 134368
2011-07-03 19:55:50 +00:00
Johnny Chen b8f7603526 Add swig docstrings for SBFrame.h.
Add post-processing step to remove the trailing blank lines from the docstrings of lldb.py.

llvm-svn: 134360
2011-07-03 01:43:29 +00:00
Greg Clayton 0c51ac3295 When we use the "fd://%u" for file descriptors, we need to detect if this is
a file or socket. We now make a getsockopt call to check if the fd is a socket.

Also, the previous logic in the GDB communication needs to watch for success
with an error so we can deal with EAGAIN and other normal "retry" error codes.

llvm-svn: 134359
2011-07-02 23:21:06 +00:00
Greg Clayton 197bacfffa Cleanup errors that come out of commands and make sure they all have newlines
_only_ in the resulting stream, not in the error objects (lldb_private::Error).
lldb_private::Error objects should always just have an error string with no 
terminating newline characters or periods.

Fixed an issue with GDB remote packet detection that could end up deadlocking
if a full packet wasn't received in one chunk. Also modified the packet 
checking function to properly toss one or more bytes when it detects bad
data. 

llvm-svn: 134357
2011-07-02 21:07:54 +00:00
Peter Collingbourne f52f0502ca Fix Linux build errors
llvm-svn: 134347
2011-07-02 20:42:56 +00:00
Johnny Chen ed48137734 Refine the post-processing phase of lldb.py to remove some more doxygen/c++-comment residues.
llvm-svn: 134326
2011-07-02 20:01:09 +00:00
Johnny Chen 73a44f6b99 Furnish some docstrings to be swigified into the generated lldb.py module.
Especially SBProcess.ReadMemory() and SBProcess.WriteMemory() because the generated autodoc strings
make no sense for Python programmers due to typemap (see lldb.swig).

llvm-svn: 134301
2011-07-02 00:57:52 +00:00
Enrico Granata 6586310263 test cases for the new features just committed
llvm-svn: 134294
2011-07-02 00:27:11 +00:00
Enrico Granata 0a3958e046 several improvements to "type summary":
- type names can now be regular expressions (exact matching is done first, and is faster)
 - integral (and floating) types can be printed as bitfields, i.e. ${var[low-high]} will extract bits low thru high of the value and print them
 - array subscripts are supported, both for arrays and for pointers. the syntax is ${*var[low-high]}, or ${*var[]} to print the whole array (the latter only works for statically sized arrays)
 - summary is now printed by default when a summary string references a variable. if that variable's type has no summary, value is printed instead. to force value, you can use %V as a format specifier
 - basic support for ObjectiveC:
  - ObjectiveC inheritance chains are now walked through
  - %@ can be specified as a summary format, to print the ObjectiveC runtime description for an object
 - some bug fixes

llvm-svn: 134293
2011-07-02 00:25:22 +00:00
Johnny Chen 4bbbecfb8c SWIG doesn't need two methods of the same name 'GetDescription' but differ in
the presence of 'const'.  Ifndef the non-const one out.

llvm-svn: 134284
2011-07-01 22:45:43 +00:00
Johnny Chen b9a2c32219 Add some documentation blocks to SBTarget.h and use swig docstring feature to
take advantage of them.  Update modify-python-lldb.py to remove some 'residues'
resulting from swigification.

llvm-svn: 134269
2011-07-01 22:14:07 +00:00
Johnny Chen 61abb2aea7 Add docstrings for some API classes and auto-generates docstrings for the methods of them.
A few of the auto-generated method docstrings don't look right, and may need to be fixed
by either overwriting the auto-gened docstrings or some post-processing steps.

llvm-svn: 134246
2011-07-01 18:39:47 +00:00
Greg Clayton 1d55f1b936 Bump Xcode project version to lldb-66 and debugserver-141.
llvm-svn: 134232
2011-07-01 04:31:33 +00:00
Greg Clayton 460c77a278 Useless Xcode project change that Xcode keeps wanting to add to my project so
I am giving up the fight...

llvm-svn: 134230
2011-07-01 03:43:03 +00:00
Johnny Chen ee481783cb Add module docstring to the auto-generated lldb.py file.
llvm-svn: 134192
2011-06-30 21:29:50 +00:00
Johnny Chen cc76475fff Ifdef out the 'lldb::Encoding GetEncoding(uint32_t &count)' API from
Python SWIG, since it cannot hanlde the (uint32_t &count) parameter.

llvm-svn: 134176
2011-06-30 18:40:27 +00:00
Jason Molenda a049469c5b Restructure to be modular instead of a single big function;
should make it a little easier to use this as an example of
how to fetch all the different bits of information about
threads.

llvm-svn: 134135
2011-06-30 07:25:17 +00:00
Greg Clayton e305594277 Centralize all of the type name code so that we always strip the leading
"struct ", "class ", and "union " from the start of any type names that are
extracted from clang QualType objects. I had to fix test suite cases that
were expecting the struct/union/class prefix to be there.

llvm-svn: 134132
2011-06-30 02:28:26 +00:00
Johnny Chen 086b1b774e While we are at it, let's also exercise the similar SBModule.FindGlobalVariables() API within
the find_global_variables() test method.

Skipping test_find_global_variables_with_dwarf(self) due to segmentation fault.

llvm-svn: 134118
2011-06-30 00:24:31 +00:00
Johnny Chen 466c593912 Add test cases to TestTargetAPI.py to exercise the newly added SBTarget.FindGlobalVariables() API.
llvm-svn: 134109
2011-06-29 22:45:06 +00:00
Enrico Granata 4becb37e34 This commit adds a new top subcommand "summary" to command type named "type". Currently this command
implements three commands:

type summary add <format> <typename1> [<typename2> ...]
type summary delete <typename1> [<typename2> ...]
type summary list [<typename1> [<typename2>] ...]
type summary clear

This allows you to specify the default format that will be used to display
summaries for variables, shown when you use "frame variable" or "expression", or the SBValue classes.

Examples:
type summary add "x = ${var.x}" Point

type summary list

type summary add --one-liner SimpleType

llvm-svn: 134108
2011-06-29 22:27:15 +00:00
Johnny Chen d1ef780bb3 Add fuzz calls for SBModule/SBTarget.FindGlobalVariables(...).
llvm-svn: 134107
2011-06-29 22:26:59 +00:00
Greg Clayton dea8cb4fe3 Added support for finding and global variables in the SBTarget and SBModule
level in the public API. 

Also modified the ValueObject values to be able to display global variables
without having a valid running process. The globals will read themselves from
the object file section data if there is no process, and from the process if
there is one.

Also fixed an issue where modifications for dynamic types could cause child
values of ValueObjects to not show up if the value was unable to evaluate
itself (children of NULL pointer objects).

llvm-svn: 134102
2011-06-29 22:09:02 +00:00
Johnny Chen 8bae20f7f7 Add fuzz calls for SBTypeMember.
llvm-svn: 134098
2011-06-29 21:42:46 +00:00
Johnny Chen 6999f86617 Add fuzz calls to SBType, SBValue, and SBValueList.
Fixed crashes for SBValue fuzz calls.
And change 'bool SBType::IsPointerType(void)' to
'bool SBType::IsAPointerType(void)' to avoid name collision with the static 'bool SBType::IsPointerType(void *)'
function, which SWIG cannot handle.

llvm-svn: 134096
2011-06-29 21:19:39 +00:00
Jim Ingham 20c771998b Remove a few more places where we were iterating linearly over the Breakpoint Site's rather than
looking up what we needed by address, which is much faster.

llvm-svn: 134090
2011-06-29 19:42:28 +00:00
Greg Clayton 626f4a13e3 Fixed an issue that was checked in with the dynamic types and update point
changes that caused all SBValue objects to completely ignore the target
lock due to bad C++ scoping of the target Mutex::Locker variables.

llvm-svn: 134081
2011-06-29 18:28:50 +00:00
Enrico Granata 595ca06397 just a test for commit access - ignore this
llvm-svn: 134056
2011-06-29 04:18:11 +00:00