Commit Graph

4929 Commits

Author SHA1 Message Date
Johnny Chen 6943e7c569 Add clarification comments.
llvm-svn: 156350
2012-05-08 00:43:20 +00:00
Sean Callanan 0a2722d63d Updated LLVM to take a fix for disassembly of
Thumb branch operands.

llvm-svn: 156344
2012-05-08 00:01:21 +00:00
Johnny Chen 4ab2e6be38 Updated to a more meaningful macro name.
llvm-svn: 156340
2012-05-07 23:23:41 +00:00
Johnny Chen 5ec8fcbf0c Fix the problem that 'help breakpoint set' is printing a lot of redundant lines.
Correctly specify the LLDB_OPT_SET's that the 'shlib' command option belongs to by using a newly added macro like this:

    #define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM(1, 10) & ~LLDB_OPT_SET_10 )

rdar://problem/11393864

llvm-svn: 156337
2012-05-07 23:04:49 +00:00
Johnny Chen ddb149069e Add an -F option to the redo.py script to selectively re-run only those failed sessions whose filenames contain the component(s)
specified.  For example:

    ./redo.py -F x86_64 -n 2012-05-07-15_28_24

will redo the failed sessions under the 2012-05-07-15_28_24 directory, but only for session names which contain 'x86_64' in it.

llvm-svn: 156335
2012-05-07 22:59:00 +00:00
Johnny Chen 5a4b4b86d6 Move the el_source() call after the section of code which sets up the default "ctrl-r" and "ctrl-w" bindings
so that user-provided .editrc has a chance to override the lldb's default key bindings.

llvm-svn: 156314
2012-05-07 18:18:08 +00:00
Sean Callanan bcaa94db6c Updated LLVM to fix bad disassembly of operands
and occasionally failure to recognize instructions.
This problem affects ARM and Thumb BLX instructions.

llvm-svn: 156307
2012-05-07 16:50:20 +00:00
Filipe Cabecinhas f86cf78190 Remove repeated word.
llvm-svn: 156300
2012-05-07 09:30:51 +00:00
Filipe Cabecinhas 75bc95ec28 Fixed some strncat/strlcat uses.
llvm-svn: 156264
2012-05-06 17:56:42 +00:00
Johnny Chen 66b7c59593 Jason Molenda convinced me that we should make ctrl-w on the command line bind to ed-delete-prev-word.
If you have ctrl-w key binding specified with your .editrc file, it will be overridden with ed-delete-prev-word. :-)

llvm-svn: 156230
2012-05-05 04:44:12 +00:00
Jim Ingham 444717b318 Missed a few uses of Mutex::GetMutex in template functions that don't seem to get instantiated on the Mac OS X build,
but were causing build failures on Linux.

llvm-svn: 156224
2012-05-04 23:54:57 +00:00
Sean Callanan 247e62a706 Added an "attach" alias as promised on the web page.
llvm-svn: 156223
2012-05-04 23:15:02 +00:00
Jim Ingham 10ebffa48a Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes.
No one was using it and Locker(pthread_mutex_t *) immediately asserts for 
pthread_mutex_t's that don't come from a Mutex anyway.  Rather than try to make
that work, we should maintain the Mutex abstraction and not pass around the
platform implementation...

Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor
taking a pthread_mutex_t *.  You no longer need to call Mutex::GetMutex to pass
your mutex to a Locker (you can't in fact, since I made it private.)

llvm-svn: 156221
2012-05-04 23:02:50 +00:00
Greg Clayton c8f73d7b96 Added an interactive mode to the "crashlog" command so that we can look at multiple crash logs at once and do some data mining. Added an interactive command prompt that allows you to do:
% PYTHONPATH=./build/Debug/LLDB.framework/Resources/Python ; ./build/Debug//LLDB.framework/Resources/Python/lldb/macosx/crashlog.py -i ~/Downloads/crashes2/*.crash ) 

then you get an interactive prompt where you can search for data within all crash logs. For example you can do:

% list

which will list all crash logs

And you can search for all images given an image basename, or full path:

% image LLDB
% image /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB
% image LLDB.framework

Which would all produce an output listing like:

40CD4430-7D27-3248-BE4C-71B1F36FC5D0 (1.132 - 132) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x000000011f8bc000 - 0x0000000120d3efbf)
B727A528-FF1F-3B20-9E4F-BBE96C7D922D (1.136 - 136) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x000000011e7f7000 - 0x000000011fc7ff87)
4D6F8DC2-5757-39C7-96B0-1A5B5171DC6B (1.137 - 137) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x000000012bd7f000 - 0x000000012d1fcfef)
FBF8786F-92B9-31E3-8BCD-A82148338966 (1.137 - 137) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000122d78000 - 0x00000001241f5fd7)
7AE082E3-3BB7-3F64-A308-063E559DFC45 (1.143 - 143) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000119b8d000 - 0x000000011b02ef5f)
7AE082E3-3BB7-3F64-A308-063E559DFC45 (1.143 - 143) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000111497000 - 0x0000000112938f5f)
7AE082E3-3BB7-3F64-A308-063E559DFC45 (1.143 - 143) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000116680000 - 0x0000000117b21f5f)

llvm-svn: 156201
2012-05-04 20:44:14 +00:00
Johnny Chen 30e422d7ba When the current thread state is NULL, PyThreadState_Get() issues a fatal error.
Use a gentler API PyThreadState_GetDict(), instead.

rdar://problem/11292882

llvm-svn: 156200
2012-05-04 20:37:11 +00:00
Jim Ingham c075ecd833 Fix a think in Mutex::Locker::Locker(pthread_mutex_t *) Really should lock the mutex handed in, not the m_mutex_ptr that you've set to NULL...
Rework the Host.cpp::ThreadNameAccessor to use ThreadSafeSTLMap - we've got it so we might as well use it.  Also works around a problem with the
Mutex::Locker class raising fallacious asserts in debug mode when used with pthread_mutex_t's that weren't backed by Mutex objects.

llvm-svn: 156193
2012-05-04 19:24:49 +00:00
Jason Molenda 16d127cb7b In ProcessGDBRemote::DoConnectRemote(), if the remote system informed
us of its architecture, use that to set the Target's arch if it
doesn't already have one set.

In Process::CompleteAttach(), if the Target has a valid arch make
sure that the Platform we pick up is compatible with that arch; if
not, find a Platform that is compatible.  Don't let the the default
platform override the Target's arch.

<rdar://problem/11185420>

llvm-svn: 156116
2012-05-03 22:37:30 +00:00
Johnny Chen 356782f5f6 Fix the following error when importing crashlog.py from a Python interactive session:
AttributeError: 'module' object has no attribute 'debugger'

llvm-svn: 156115
2012-05-03 22:31:30 +00:00
Jim Ingham 64e7ead1d8 Clean up the usage of "MasterPlan" status in ThreadPlans. Only user-initiated plans
should be MasterPlans that want to stay on the plan stack.  So make all plans NOT
MasterPlans by default and then have the SB API's and the CommandObjectThread step
commands set this explicitly.

Also added a "clean up" phase to the Thread::ShouldStop so that if plans get stranded
on the stack, we can remove them.  This is done by adding an IsPlanStale method to the
thread plans, and if the plan can know that it is no longer relevant, it returns true,
and the plan and its sub-plans will get discarded.

llvm-svn: 156101
2012-05-03 21:19:36 +00:00
Jim Ingham 64cc29cb84 Document the fact that you can repeat "-n" and similar options to make one breakpoint on multiple names.
llvm-svn: 156098
2012-05-03 20:30:08 +00:00
Johnny Chen 8e1fd43ad7 Fix AttributeError when using crashlog with verbose mode.
rdar://problem/11374653

llvm-svn: 156088
2012-05-03 18:46:28 +00:00
Enrico Granata 78453eed12 Adding a new 'type category disable *' feature that disables all categories - This is intended as a quick kill switch for data formatters for cases where the user wants as little extra processing as possible to be done on their target, or to override major data formatters bug, should they occur
llvm-svn: 156044
2012-05-03 01:08:44 +00:00
Sean Callanan e38e69f204 Patched our local Clang to fix a crash when parsing
classes/structs that have variable-length arrays at
the end.

llvm-svn: 156026
2012-05-02 21:54:54 +00:00
Enrico Granata 2980927107 Update the docs to reflect the recent changes to categories
llvm-svn: 156020
2012-05-02 21:13:16 +00:00
Enrico Granata 19e7a185f2 Mentioning in the docs that Python commands can have docstrings
llvm-svn: 156018
2012-05-02 21:00:41 +00:00
Jim Ingham c007e84621 If a command takes options and arguments, the help text should warn the user to use "--" to terminate the options.
llvm-svn: 155973
2012-05-02 01:12:54 +00:00
Jim Ingham c7dccb797e Jeeze... Remove two unneeded #include's of ThreadPlanTestCondition.h, and replace them with
includes of ClangUserExpression that were being errantly dragged in through same.

llvm-svn: 155970
2012-05-02 00:30:53 +00:00
Jim Ingham 8e0b2e3614 Forgot to commit the change deleting the ThreadPlanTestCondition files from the project.
llvm-svn: 155968
2012-05-02 00:24:48 +00:00
Jim Ingham 92e1cd431c Cleanup - removing the ThreadPlanTestCondition and its helper functions. It is not needed,
since we now run the condition in the StopInfoBreakpoint's PerformAction, and don't need
to refer it to another "continue".  Actually, we haven't needed to do this for a year or
so, I just hadn't gotten around to deleting the dead wood.

llvm-svn: 155967
2012-05-02 00:23:18 +00:00
Jim Ingham fbbfe6ecf0 Fix reporting of stop reasons when the StepOver & StepIn plans stop because of a crash or breakpoint. Added the ability for a plan to say it is done but doesn't want to be the reason for the stop.
llvm-svn: 155927
2012-05-01 18:38:37 +00:00
Jim Ingham e2b6ad65a2 Use a cache of the results of "GetFileAddress" from a symbol in the Comparator we are using to sort the various lookup indices by symbol address. When we switched to weak pointers,
this lookup got slightly slower.  Not enough to matter for most uses, but in the sort algorithm it does matter.

llvm-svn: 155873
2012-05-01 01:34:15 +00:00
Sean Callanan 1276c33345 Added a --force option to "memory read,"
disallowing reads over 1KiB in total size
unless the user explicitly allows them.

llvm-svn: 155750
2012-04-28 01:27:38 +00:00
Johnny Chen bd5bb6fda3 Clarify "watchpoint set" help text.
rdar://problem/11327790

llvm-svn: 155694
2012-04-27 05:27:07 +00:00
Jason Molenda 30815837b0 Bump to lldb-145.
llvm-svn: 155687
2012-04-27 02:25:20 +00:00
Greg Clayton b69bb2e43f Clean up the way modules are looked for when calling Target::GetSharedModule(...). We were ignoring remapped files, even if they were valid. Also if we have a UUID, we should check our global module list first.
llvm-svn: 155683
2012-04-27 00:58:27 +00:00
Jim Ingham 57190baa6c Don't call SBDebugger::SetInternalVariable in the sigwinch_handler, since that takes locks and potentially does allocations.
Just call SBDebugger::SetTerminalWidth on the driver's SBDebugger, which does the same job, but no locks.
Also add the value checking to SetTerminalWidth you get with SetInternalVariable(..., "term-width", ...).

rdar://problem/11310563

llvm-svn: 155665
2012-04-26 21:39:32 +00:00
Sean Callanan 822944c97d Made the IR interpreter move all floats, not just "wide"
ones, to its own constant pool.  This reflects the fact
that the LLVM code generators for different targets move
floats to their constant pools under varying conditions,
and the JIT cannot (yet) be relied upon to relocate references to
its constant pool correctly.

llvm-svn: 155660
2012-04-26 20:51:20 +00:00
Greg Clayton c32e5c9bc2 Patch from Filipe Cabecinhas.
llvm-svn: 155644
2012-04-26 17:33:20 +00:00
Greg Clayton 512034b8bd Patch from Filipe Cabecinhas.
llvm-svn: 155642
2012-04-26 17:12:07 +00:00
Greg Clayton caca09b628 Patch from Filipe Cabecinhas.
llvm-svn: 155641
2012-04-26 17:11:01 +00:00
Greg Clayton 7afbe07a0d Patch from Filipe Cabecinhas.
llvm-svn: 155640
2012-04-26 17:09:38 +00:00
Greg Clayton f22f6ff32a Patch from Filipe Cabecinhas.
llvm-svn: 155639
2012-04-26 17:07:53 +00:00
Greg Clayton 9efa076aa6 Save more memory by not parsing the symbol table for stand alone DWARF files. We currently have SymbolFile plug-ins which all get the chance to say what they can parse in a symbol file. Prior to this fix we would ask the SymbolFileDWARF plug-in what abilities it had, and it would answer with "everything", and then we would check the SymbolFileSymtab plug-in what abilities it had, in case it had more abilities. The checking that SymbolFileSymtab does is a bit expensive as it pulls in the entire symbol table just to see if it can offer a few scraps of debug information. This causes all stand along DWARF files to pull in their symbol tables even though those symbols will never be used. This fix will check all SymbolFile plug-ins for their abilities and if any plug-in responds with "everything", then we stop the search.
llvm-svn: 155638
2012-04-26 16:53:42 +00:00
Jason Molenda fc6a17b0a8 Add an Error string specifically for when we hit an ENOMEM when
trying to mmap a file fails so parent caller function can 
provide helpful information to use about what went wrong.

llvm-svn: 155617
2012-04-26 06:39:51 +00:00
Enrico Granata 73076f9269 Automatically enabling the Cocoa formatter categories for command-line LLDB. Previously, the categories were filled in but disabled by default. Tweaking test cases appropriately to keep working and do the right thing
llvm-svn: 155605
2012-04-26 01:40:38 +00:00
Greg Clayton 83b6fabdf7 <rdar://problem/11271074>
<rdar://problem/11285931>

Use the DWARRF end prologue markers when trying to skip prologue instructions instead of blindly using the second line table address entry.

llvm-svn: 155600
2012-04-26 01:01:34 +00:00
Greg Clayton da91b17bc7 Patch from Viktor Kutuzov: changes the method declarations to const for the Args::GetCommandString and Agrs::GetQuotedCommandString methods. It allows using of these methods within the other const methods.
llvm-svn: 155593
2012-04-25 22:30:32 +00:00
Greg Clayton 4f76fef267 Make the libheap.dylib build into a consistent temp directory so it can be reused between lldb invocations. Also add the module name into the directory path that is used to store the target triple specific build of libheap.dylib.
Also added code that will rebuild libheap.dylib if heap_find.cpp is newer that libheap.dylib.

llvm-svn: 155590
2012-04-25 21:23:07 +00:00
Enrico Granata de93b6b42f Fixing a typo in the NSArray data formatter
llvm-svn: 155586
2012-04-25 20:59:02 +00:00
Jim Ingham e5b2245d68 Make sure the end of the first line is still within the function, and if not, don't push the prologue past it.
rdar://problem/11271074

llvm-svn: 155579
2012-04-25 19:48:30 +00:00