Commit Graph

5380 Commits

Author SHA1 Message Date
Greg Clayton b3e776008b Added a hollowed out version of an OperatingSystem plugin that will use a class in python to get thread information for threads stored in memory.
llvm-svn: 162472
2012-08-23 21:17:11 +00:00
Jim Ingham 608036ae5b gdb format should default to count of 1.
<rdar://problem/12161861>

llvm-svn: 162470
2012-08-23 21:16:25 +00:00
Johnny Chen 8ccba980e6 Make the substring un-matching more robust.
llvm-svn: 162467
2012-08-23 20:25:04 +00:00
Johnny Chen 53311c3cb1 Make a test scenario stronger, since, by default, the setting interpreter.expand-regex-aliases is false.
llvm-svn: 162465
2012-08-23 20:22:16 +00:00
Johnny Chen cfe38aab25 Fix the test suite failures as a result of r162418 check-in.
llvm-svn: 162462
2012-08-23 19:36:03 +00:00
Johnny Chen b417dcdbee rdar://problem/12022371
Make it so that "b 245" should set a breakpoint at line 245 of the current file.
Also add a simple test file.

llvm-svn: 162419
2012-08-23 00:32:22 +00:00
Greg Clayton 754a9369db <rdar://problem/12022079>
Added a new "interpreter" properties to encapsulate any properties for the command interpreter. Right now this contains only "expand-regex-aliases", so you can now enable (disabled by default) the echoing of the command that a regular expression alias expands to:

(lldb) b main
Breakpoint created: 1: name = 'main', locations = 1

Note that the expanded regular expression command wasn't shown by default. You can enable it if you want to:

(lldb) settings set interpreter.expand-regex-aliases true
(lldb) b main
breakpoint set --name 'main'
Breakpoint created: 1: name = 'main', locations = 1

Also enabled auto completion for enumeration option values (OptionValueEnumeration) and for boolean option values (OptionValueBoolean).

Fixed auto completion for settings names when nothing has been type (it should show all settings).

llvm-svn: 162418
2012-08-23 00:22:02 +00:00
Jim Ingham 4e22598b0f Fix some indenting.
llvm-svn: 162406
2012-08-22 22:52:39 +00:00
Jim Ingham 4fc6cb9c76 Rework how the API mutex is acquired when filling out an ExecutionContext from an ExecutionContextRef,
particularly in the SBThread & SBFrame interfaces.  Instead of filling the whole context & then getting
the API mutex, we now get only the target, acquire the API mutex from it, then fill out the rest of the
context.  This removes a race condition where you get a ThreadSP, then wait on the API mutex while another
command Destroy's the Thread you've just gotten.
Also fixed the ExecutionContextRef::Get*SP calls so they don't return invalid objects.
Also fixed the ExecutionContext::Has*Scope calls so they don't claim to have a scope if the object representing
that scope has been destroyed.
Also fixed a think-o in Thread::IsValid which was causing it to return the opposite of the desired value.

<rdar://problem/11995490>

llvm-svn: 162401
2012-08-22 21:34:33 +00:00
Jim Ingham 1e4f425d2f Check that the data buffer is non-null before getting its file contents.
llvm-svn: 162400
2012-08-22 21:21:16 +00:00
Jason Molenda 26d3b2a272 Change the man page install phase to only run in "desktop" and "desktop-no-xpc" targets, not for the "ios" target.
llvm-svn: 162397
2012-08-22 21:17:08 +00:00
Johnny Chen d79f06cf12 Modified .lldb-loggings now to direct the lldb log files to the same session directory which also houses the test logs.
llvm-svn: 162387
2012-08-22 20:25:33 +00:00
Johnny Chen c50ce97745 Demonstrate how to use the config file and the pre-flight functionality to route the lldb gdb-remote log messages
into individually named log destinations.  In the simple usage-lldb-loggings example, we ran two cases which resulted
in two lldb_log files.

llvm-svn: 162378
2012-08-22 18:48:13 +00:00
Greg Clayton 6920b52be6 Remove further outdated "settings" code and also implement a few missing things.
llvm-svn: 162376
2012-08-22 18:39:03 +00:00
Filipe Cabecinhas 2c0978a4ac Fixed a Linux building bug pointed out by Daniel Malea.
llvm-svn: 162373
2012-08-22 18:10:45 +00:00
Johnny Chen e3fe26c5dd Fix wrong directory pathname.
llvm-svn: 162372
2012-08-22 17:53:02 +00:00
Greg Clayton 67cc06366c Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation:
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads

Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".

llvm-svn: 162366
2012-08-22 17:17:09 +00:00
Filipe Cabecinhas 9e10605d6b Added a test for the Python part of SBInputReader callbacks.
llvm-svn: 162357
2012-08-22 13:25:58 +00:00
Filipe Cabecinhas 6eb31e7391 Added a typemap and wrappers for SBInputReader callbacks
Now it's possible to use SBInputReader callbacks in Python.

We leak the callback object, unfortunately. A __del__ method can be added
to SBInputReader, but we have no way to check the callback function that
is on the reader. So we can't call Py_DECREF on it when we have our
PythonCallback function. One way to do it is to assume that reified
SBInputReaders always have a Python callback (and always call Py_DECREF).
Another one is to add methods or properties to SBInputReader (or make the
m_callback_function property public).

llvm-svn: 162356
2012-08-22 13:25:10 +00:00
Johnny Chen 82e5a26240 rdar://problem/11324515
'add-dsym' (aka 'target symbols add') should display error messages when dsym file is not found
or the dsym uuid does not match any existing modules. Add TestAddDsymCommand.py test file.

llvm-svn: 162332
2012-08-22 00:18:43 +00:00
Johnny Chen 4fe2302ae2 Fix test failures in TestWatchpointIter.py due to http://llvm.org/viewvc/llvm-project?rev=162322&view=rev.
llvm-svn: 162328
2012-08-21 23:17:04 +00:00
Johnny Chen 66535a3f88 Remove the process->DisableWatchpoint() and EnableWatchpoint() calls since the sentry object is already doing that.
llvm-svn: 162323
2012-08-21 22:15:58 +00:00
Johnny Chen 0f7ad8d98f rdar://problem/12144930
Watchpoint conditions were hitting watchpoint, smashing LLDB's stack.
Make sure watchpoint is properly disabled and subsequently enabled while performing watchpoint actions.

llvm-svn: 162322
2012-08-21 22:06:34 +00:00
Johnny Chen 393fbf6c53 Comment change.
llvm-svn: 162308
2012-08-21 20:18:21 +00:00
Jim Ingham 48cdc58f0a SBValue::GetTypeName and SBValue::GetByteSize might have to update the dynamic value - which might involve running code. So they need to take the stop lock & target locks.
<rdar://problem/12001204>

llvm-svn: 162250
2012-08-21 01:46:35 +00:00
Johnny Chen d773139bbc Fix the wrong comment in TestUUIDMismatchWarnings.py.
llvm-svn: 162239
2012-08-20 22:36:58 +00:00
Johnny Chen 9b832fe40d Fix a crash (_wrap_SBDebugger_SetInputFileHandle -> PyString_AsString) running the test suite.
Also modify the boundary condition test case SBDebugger.DispatchInput(None) to be wrapped inside a try-except clause for now.

llvm-svn: 162228
2012-08-20 21:16:02 +00:00
Greg Clayton 486290078c Added qVAttachOrWaitSupported packet support.
llvm-svn: 162207
2012-08-20 16:50:43 +00:00
Filipe Cabecinhas c30199917a A baton isn't needed to dispatch input.
I also added a typemap to make DispatchInput usable in Python.

llvm-svn: 162204
2012-08-20 16:21:04 +00:00
Filipe Cabecinhas 4c1f3a1cc5 Add FILE* typemaps for SBDebugger.GetInputFileHandle() and friends.
llvm-svn: 162203
2012-08-20 16:10:44 +00:00
Jason Molenda 8eba46c68a Some eh_frame unwind instructions will define a return address register;
when you want to find the caller's saved pc, you look up the return address
register and use that.  On arm, for instance, this would be the contents of
the link register (lr).

If the eh_frame CIE defines an RA, record that fact in the UnwindPlan.

When we're finding a saved register, if it's the pc, lok for the location
of the return address register instead.

<rdar://problem/12062310> 

llvm-svn: 162167
2012-08-18 06:53:34 +00:00
Johnny Chen 8115c6d45d Fix missing braces from the python-GIL merge.
llvm-svn: 162162
2012-08-18 04:24:00 +00:00
Johnny Chen 2c90e999aa Merge python-GIL bracnh (by filcab) back into trunk!
llvm-svn: 162161
2012-08-18 04:14:54 +00:00
Johnny Chen 319e927ae1 Fix a race condition where multiple PythonInputReaderManager instances could, during destruction,
tread on the m_embedded_thread_input_reader_sp singleton maintained by the script interpreter.
Furthermore, use two additional slots under the script interpreter to store the PseudoTerminal and
the InputReaderSP pertaining to the embedded python interpreter -- resulted from the
ScriptInterpreterPython::ExecuteInterpreterLoop() call -- to facilitate separation from what is being
used by the PythonInputReaderManager instances.

llvm-svn: 162147
2012-08-17 23:44:35 +00:00
Sean Callanan 433c8a1f44 Committed a simple dtrace script that tracks
process termination, which can be useful to track
debugserver's delivery of signals.

llvm-svn: 162104
2012-08-17 16:30:13 +00:00
Sean Callanan adc43c998c Fixed some small formatting issues in the help for
"command regex."  It's now more readable and
grammatically correct.

<rdar://problem/12115962>

llvm-svn: 162047
2012-08-16 21:46:58 +00:00
Sean Callanan aa01b83078 Fixed a crash when incomplete expression variables
are materialized.

<rdar://problem/12105013>

llvm-svn: 162046
2012-08-16 21:34:44 +00:00
Johnny Chen a60c5ad819 Catch timestamps for the beginning and end of the test suite run.
llvm-svn: 162040
2012-08-16 19:15:21 +00:00
Johnny Chen a7e1d39309 Update build instructions. Patch from "Kopec, Matt" <matt.kopec@intel.com>!
llvm-svn: 162001
2012-08-16 00:08:21 +00:00
Johnny Chen eb46f78b08 rdar://problem/12096295
Add an lldb command line option to specify a core file: --core/-c.
For consistency, change the "target create" command to also use --core.

llvm-svn: 161993
2012-08-15 22:10:42 +00:00
Sean Callanan be3c5dab76 Fixed a typo.
<rdar://problem/12090979>

llvm-svn: 161910
2012-08-15 00:26:32 +00:00
Johnny Chen 6cf6f89005 A little bit of refactoring.
llvm-svn: 161903
2012-08-14 23:09:48 +00:00
Johnny Chen 25c0eb4a38 When trying to take snapshots of a watched variable, if the frame is unable to evaluate the variable expression,
do not take the sanpshot and forget about the stop info.  It is possible that the variable expression has gone
out of scope, we'll revise the hit count due to the false alarms.

llvm-svn: 161892
2012-08-14 20:56:37 +00:00
Enrico Granata 273d177bdf <rdar://problem/11589605> Making a
'type category enable *' command
to match 'type category disable *'

llvm-svn: 161882
2012-08-14 18:18:07 +00:00
Johnny Chen 88fc73b8f7 Simplify the "Watchpoint ... hit" printout, make it more terse.
Change the test case, too. 

llvm-svn: 161806
2012-08-13 23:27:50 +00:00
Jason Molenda 4d04d477d9 When emulating instructions that read from memory,
return 0x0 as the read value instead of uninitialized
stack data so we get consistent behavior from the
emulator.
<rdar://problem/12058770>

llvm-svn: 161795
2012-08-13 21:53:35 +00:00
Johnny Chen f97ecd70b2 Comment changes.
llvm-svn: 161787
2012-08-13 21:19:11 +00:00
Johnny Chen 209bd65ea4 rdar://problem/12007576
Record the snapshot of our watched value when the watchpoint is set or hit.
And report the old/new values when watchpoint is triggered.  Add some test scenarios.

llvm-svn: 161785
2012-08-13 21:09:54 +00:00
Greg Clayton 45b673dad5 <rdar://problem/12087275>
Make the crashlog parser able to deal with spaces in the process name.

llvm-svn: 161772
2012-08-13 18:48:03 +00:00
Greg Clayton 774ebdfcd1 Added a new "objc_refs" command that will track down all allocations on the heap that have the "isa" for the objective C class at offset zero. This will need to be improved to deal with KVO classes, but it is a start. It also disallows looking up a pointer value of zero since that would return way too many matches.
llvm-svn: 161724
2012-08-11 02:26:26 +00:00