Skip to content
  1. Oct 29, 2012
    • Enrico Granata's avatar
      <rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it... · b588726e
      Enrico Granata authored
      <rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
      This should delay initialization of Python until strictly necessary and speed-up debugger startup
      Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes
      
      llvm-svn: 166967
      b588726e
  2. Oct 19, 2012
    • Greg Clayton's avatar
      Added the infrastructure necessary for plug-ins to be able to add their own... · e8cd0c98
      Greg Clayton authored
      Added the infrastructure necessary for plug-ins to be able to add their own settings instead of having settings added to existing ones. In particular "target.disable-kext-loading" was added to "target" where it should actually be specific to the the dynamic loader plugin. Now the plug-in manager has the ability to create settings at the root level starting with "plugin". Each plug-in type can add new sub dictionaries, and then each plug-in can register a setting dictionary under its own short name. For example the DynamicLoaderDarwinKernel plug-in now registers a setting dictionary at:
      
      plugin
          dynamic-loader
              macosx-kernel
                  (bool) disable-kext-loading
                  
      To settings can be set using:
      
      (lldb) settings set plugin.dynamic-loader.macosx-kernel.disable-kext-loading true
      
      I currently only hooked up the DynamicLoader plug-ins, but the code is very easy to duplicate when and if we need settings for other plug-ins.
      
      llvm-svn: 166294
      e8cd0c98
  3. Oct 18, 2012
  4. Oct 16, 2012
  5. Sep 29, 2012
    • Enrico Granata's avatar
      Implementing plugins that provide commands. · 21dfcd9d
      Enrico Granata authored
      This checkin adds the capability for LLDB to load plugins from external dylibs that can provide new commands
      It exports an SBCommand class from the public API layer, and a new SBCommandPluginInterface
      
      There is a minimal load-only plugin manager built into the debugger, which can be accessed via Debugger::LoadPlugin.
      
      Plugins are loaded from two locations at debugger startup (LLDB.framework/Resources/PlugIns and ~/Library/Application Support/LLDB/PlugIns) and more can be (re)loaded via the "plugin load" command
      
      For an example of how to make a plugin, refer to the fooplugin.cpp file in examples/plugins/commands
      
      Caveats:
      	Currently, the new API objects and features are not exposed via Python.
      	The new commands can only be "parsed" (i.e. not raw) and get their command line via a char** parameter (we do not expose our internal Args object)
      	There is no unloading feature, which can potentially lead to leaks if you overwrite the commands by reloading the same or different plugins
      	There is no API exposed for option parsing, which means you may need to use getopt or roll-your-own
      
      llvm-svn: 164865
      21dfcd9d
  6. Sep 14, 2012
  7. Sep 01, 2012
    • Greg Clayton's avatar
      Made it so changes to the prompt via "settings set prompt" get noticed by the command line. · 4c05410f
      Greg Clayton authored
      Added the ability for OptionValueString objects to take flags. The only flag is currently for parsing escape sequences. Not the prompt string can have escape characters translate which will allow colors in the prompt.
      
      Added functions to Args that will parse the escape sequences in a string, and also re-encode the escape sequences for display. This was looted from other parts of LLDB (the Debugger::FormatString() function).
      
      llvm-svn: 163043
      4c05410f
  8. Aug 29, 2012
    • Greg Clayton's avatar
      <rdar://problem/11757916> · 1f746071
      Greg Clayton authored
      Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes:
      - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". 
      - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly
      - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was.
      - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile()
      
      Cleaned up header includes a bit as well.
      
      llvm-svn: 162860
      1f746071
  9. Aug 23, 2012
    • Greg Clayton's avatar
      <rdar://problem/12022079> · 754a9369
      Greg Clayton authored
      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
      754a9369
  10. Aug 22, 2012
  11. Aug 09, 2012
  12. Jul 17, 2012
  13. Jul 14, 2012
  14. Jul 11, 2012
    • Greg Clayton's avatar
      <rdar://problem/11852100> · 53eb7ad2
      Greg Clayton authored
      The "stop-line-count-after" and "stop-line-count-before" settings are broken. This fixes them.
      
      llvm-svn: 160071
      53eb7ad2
  15. May 16, 2012
    • Greg Clayton's avatar
      <rdar://problem/11246147> · 0d69a3a4
      Greg Clayton authored
      Make sure our debugger STDIN read thread shuts down quickly when we are done with it. We had a case where the owner of the file handle was not closing it and caused spins.
      
      llvm-svn: 156879
      0d69a3a4
  16. May 08, 2012
  17. Apr 26, 2012
  18. Mar 30, 2012
  19. Mar 27, 2012
    • Enrico Granata's avatar
      Synthetic values are now automatically enabled and active by default. SBValue... · c5bc412c
      Enrico Granata authored
      Synthetic values are now automatically enabled and active by default. SBValue is set up to always wrap a synthetic value when one is available.
      A new setting enable-synthetic-value is provided on the target to disable this behavior.
      There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic.
      The test suite has been changed accordingly.
      Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang
      Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching
      
      llvm-svn: 153495
      c5bc412c
  20. Mar 19, 2012
    • Enrico Granata's avatar
      Massive enumeration name changes: a number of enums in ValueObject were not... · 86cc9829
      Enrico Granata authored
      Massive enumeration name changes: a number of enums in ValueObject were not following the naming pattern
      Changes to synthetic children:
       - the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points
         this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed
       - making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly)
         claim to itself be synthetic
       - cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible
       - major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself
       - removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place)
      Some clean ups to the summary generation code
      Centralized the code that clears out user-visible strings and data in ValueObject
      More efficient summaries for libc++ containers
      
      llvm-svn: 153061
      86cc9829
  21. Mar 07, 2012
    • Greg Clayton's avatar
      <rdar://problem/10997402> · e7612134
      Greg Clayton authored
      This fix really needed to happen as a previous fix I had submitted for
      calculating symbol sizes made many symbols appear to have zero size since
      the function that was calculating the symbol size was calling another function
      that would cause the calculation to happen again. This resulted in some symbols
      having zero size when they shouldn't. This could then cause infinite stack
      traces and many other side affects.
      
      llvm-svn: 152244
      e7612134
  22. Feb 22, 2012
  23. Feb 21, 2012
  24. Feb 17, 2012
    • Greg Clayton's avatar
      This checking is part one of trying to add some threading safety to our · cc4d0146
      Greg Clayton authored
      internals. The first part of this is to use a new class:
      
      lldb_private::ExecutionContextRef
      
      This class holds onto weak pointers to the target, process, thread and frame
      and it also contains the thread ID and frame Stack ID in case the thread and
      frame objects go away and come back as new objects that represent the same
      logical thread/frame. 
      
      ExecutionContextRef objcets have accessors to access shared pointers for
      the target, process, thread and frame which might return NULL if the backing
      object is no longer available. This allows for references to persistent program
      state without needing to hold a shared pointer to each object and potentially
      keeping that object around for longer than it needs to be. 
      
      You can also "Lock" and ExecutionContextRef (which contains weak pointers)
      object into an ExecutionContext (which contains strong, or shared pointers)
      with code like
      
      ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock());
      
      llvm-svn: 150801
      cc4d0146
  25. Feb 16, 2012
  26. Feb 15, 2012
    • Enrico Granata's avatar
      <rdar://problem/10062621> · 061858ce
      Enrico Granata authored
      New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association.
      This provides SB classes for each of the main object types involved in providing formatter support:
       SBTypeCategory
       SBTypeFilter
       SBTypeFormat
       SBTypeSummary
       SBTypeSynthetic
      plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions
      For naming consistency, this patch also renames a lot of formatters-related classes.
      Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side.
      The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer.
      An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes.
      Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories.
      
      llvm-svn: 150558
      061858ce
  27. Jan 30, 2012
    • Greg Clayton's avatar
      SBFrame is now threadsafe using some extra tricks. One issue is that stack · b9556acc
      Greg Clayton authored
      frames might go away (the object itself, not the actual logical frame) when
      we are single stepping due to the way we currently sometimes end up flushing
      frames when stepping in/out/over. They later will come back to life 
      represented by another object yet they have the same StackID. Now when you get
      a lldb::SBFrame object, it will track the frame it is initialized with until 
      the thread goes away or the StackID no longer exists in the stack for the 
      thread it was created on. It uses a weak_ptr to both the frame and thread and
      also stores the StackID. These three items allow us to determine when the
      stack frame object has gone away (the weak_ptr will be NULL) and allows us to
      find the correct frame again. In our test suite we had such cases where we
      were just getting lucky when something like this happened:
      
      1 - stop at breakpoint
      2 - get first frame in thread where we stopped
      3 - run an expression that causes the program to JIT and run code
      4 - run more expressions on the frame from step 2 which was very very luckily
          still around inside a shared pointer, yet, not part of the current 
          thread (a new stack frame object had appeared with the same stack ID and
          depth). 
          
      We now avoid all such issues and properly keep up to date, or we start 
      returning errors when the frame doesn't exist and always responds with
      invalid answers.
      
      Also fixed the UserSettingsController  (not going to rewrite this just yet)
      so that it doesn't crash on shutdown. Using weak_ptr's came in real handy to
      track when the master controller has already gone away and this allowed me to
      pull out the previous NotifyOwnerIsShuttingDown() patch as it is no longer 
      needed.
      
      llvm-svn: 149231
      b9556acc
  28. Jan 29, 2012
    • Greg Clayton's avatar
      Switching back to using std::tr1::shared_ptr. We originally switched away · e1cd1be6
      Greg Clayton authored
      due to RTTI worries since llvm and clang don't use RTTI, but I was able to 
      switch back with no issues as far as I can tell. Once the RTTI issue wasn't
      an issue, we were looking for a way to properly track weak pointers to objects
      to solve some of the threading issues we have been running into which naturally
      led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared 
      pointer from just a pointer, which is also easily solved using the 
      std::tr1::enable_shared_from_this class. 
      
      The main reason for this move back is so we can start properly having weak
      references to objects. Currently a lldb_private::Thread class has a refrence
      to its parent lldb_private::Process. This doesn't work well when we now hand
      out a SBThread object that contains a shared pointer to a lldb_private::Thread
      as this SBThread can be held onto by external clients and if they end up
      using one of these objects we can easily crash.
      
      So the next task is to start adopting std::tr1::weak_ptr where ever it makes
      sense which we can do with lldb_private::Debugger, lldb_private::Target,
      lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
      many more objects now that they are no longer using intrusive ref counted
      pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
      pointers).
      
      llvm-svn: 149207
      e1cd1be6
  29. Jan 18, 2012
  30. Jan 14, 2012
    • Greg Clayton's avatar
      <rdar://problem/9731573> · 32720b51
      Greg Clayton authored
      Fixed two double "int close(int fd)" issues found by our file descriptor
      interposing library on darwin:
      
      The first is in SBDebugger::SetInputFileHandle (FILE *file, bool transfer_ownership)
      where we would give our FILE * to a lldb_private::File object member variable and tell
      it that it owned the file descriptor if "transfer_ownership" was true, and then we
      would also give it to the communication plug-in that waits for stdin to come in and
      tell it that it owned the FILE *. They would both try and close the file.
      
      The seconds was when we use a file descriptor through ConnectionFileDescriptor 
      where someone else is creating a connection with ConnectionFileDescriptor and a URL
      like: "fd://123". We were always taking ownwership of the fd 123, when we shouldn't
      be. There is a TODO in the comments that says we should allow URL options to be passed
      to be able to specify this later (something like: "fd://123?transer_ownership=1"), but
      we can get to this later.
      
      llvm-svn: 148201
      32720b51
    • Greg Clayton's avatar
      <rdar://problem/10684141> · ccbc08e6
      Greg Clayton authored
      When the lldb_private::Debugger goes away, it should cleanup all
      of its targets.
      
      llvm-svn: 148189
      ccbc08e6
  31. Jan 13, 2012
    • Greg Clayton's avatar
      Added a new thread and frame format that can be used to display a function · 6d3dbf51
      Greg Clayton authored
      name + arguments when the data is available. It seems to work really well, 
      but some more testing is needed before we make this on by default.
      
      The new function format name is:
      
       ${function.name-with-args}
      
      To see how to use these formats see the website:
      
          http://lldb.llvm.org/formats.html
      
      Here is a sample backtrace of debugging LLDB with LLDB using this new format
      value:
      
      (lldb) thread backtrace all
      * thread #1: tid = 0x2203, 0x00007fff88a17bca libsystem_kernel.dylib __psynch_cvwait + 10, stop reason = signal SIGINT, name = <lldb.driver.main-thread>, queue = com.apple.main-thread
          frame #0: 0x00007fff88a17bca libsystem_kernel.dylib __psynch_cvwait + 10
          frame #1: 0x00007fff884ae274 libsystem_c.dylib _pthread_cond_wait + 840
          frame #2: 0x00000001010778ea LLDB lldb_private::Condition::Wait(this=0x0000000104846770, mutex=0x0000000104846730, abstime=0x0000000000000000, timed_out=0x00007fff5fbfdea7) + 138 at Condition.cpp:92
          frame #3: 0x0000000101244c21 LLDB lldb_private::Predicate<bool>::WaitForValueEqualTo(this=0x0000000104846728, value=true, abstime=0x0000000000000000, timed_out=0x00007fff5fbfdea7) + 209 at Predicate.h:317
          frame #4: 0x0000000100f6eeb2 LLDB lldb_private::Listener::WaitForEventsInternal(this=0x0000000104846660, timeout=0x0000000000000000, broadcaster=0x0000000000000000, broadcaster_names=0x0000000000000000, num_broadcaster_names=0x00000000, event_type_mask=0x00000000, event_sp=0x00007fff5fbfe030) + 386 at Listener.cpp:388
          frame #5: 0x0000000100f6f231 LLDB lldb_private::Listener::WaitForEvent(this=0x0000000104846660, timeout=0x0000000000000000, event_sp=0x00007fff5fbfe030) + 81 at Listener.cpp:436
          frame #6: 0x0000000100098dcd LLDB lldb::SBListener::WaitForEvent(this=0x00007fff5fbff0f0, timeout_secs=0xffffffff, event=0x00007fff5fbfe430) + 685 at SBListener.cpp:181
          frame #7: 0x000000010000628c lldb Driver::MainLoop(this=0x00007fff5fbff620) + 5244 at Driver.cpp:1325
          frame #8: 0x0000000100006ca3 lldb main(argc=1, argv=0x00007fff5fbff758, envp=0x00007fff5fbff768) + 419 at Driver.cpp:1460
          frame #9: 0x0000000100000d54 lldb start + 52
      
        thread #3: tid = 0x2703, 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10, name = <lldb.comm.debugger.input>
          frame #0: 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10
          frame #1: 0x0000000100f3f072 LLDB lldb_private::ConnectionFileDescriptor::BytesAvailable(this=0x000000010524d040, timeout_usec=0x004c4b40, error_ptr=0x0000000105640a18) + 722 at ConnectionFileDescriptor.cpp:542
          frame #2: 0x0000000100f3e6dd LLDB lldb_private::ConnectionFileDescriptor::Read(this=0x000000010524d040, dst=0x0000000105640a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105640a14, error_ptr=0x0000000105640a18) + 301 at ConnectionFileDescriptor.cpp:273
          frame #3: 0x0000000100f3b8f7 LLDB lldb_private::Communication::ReadFromConnection(this=0x0000000104846270, dst=0x0000000105640a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105640a14, error_ptr=0x0000000105640a18) + 167 at Communication.cpp:317
          frame #4: 0x0000000100f3b197 LLDB lldb_private::Communication::ReadThread(p=0x0000000104846270) + 327 at Communication.cpp:344
          frame #5: 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x00000001045f6650) + 227 at Host.cpp:549
          frame #6: 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
          frame #7: 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
      
        thread #4: tid = 0x2803, 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10, name = <lldb.comm.driver.editline>
          frame #0: 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10
          frame #1: 0x0000000100f3f072 LLDB lldb_private::ConnectionFileDescriptor::BytesAvailable(this=0x0000000105700370, timeout_usec=0x004c4b40, error_ptr=0x00000001056c3a18) + 722 at ConnectionFileDescriptor.cpp:542
          frame #2: 0x0000000100f3e6dd LLDB lldb_private::ConnectionFileDescriptor::Read(this=0x0000000105700370, dst=0x00000001056c3a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x00000001056c3a14, error_ptr=0x00000001056c3a18) + 301 at ConnectionFileDescriptor.cpp:273
          frame #3: 0x0000000100f3b8f7 LLDB lldb_private::Communication::ReadFromConnection(this=0x0000000105700000, dst=0x00000001056c3a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x00000001056c3a14, error_ptr=0x00000001056c3a18) + 167 at Communication.cpp:317
          frame #4: 0x0000000100f3b197 LLDB lldb_private::Communication::ReadThread(p=0x0000000105700000) + 327 at Communication.cpp:344
          frame #5: 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x0000000105700430) + 227 at Host.cpp:549
          frame #6: 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
          frame #7: 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
      
        thread #5: tid = 0x2903, 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10, name = <lldb.comm.driver.editline_output>
          frame #0: 0x00007fff88a17df2 libsystem_kernel.dylib select$DARWIN_EXTSN + 10
          frame #1: 0x0000000100f3f072 LLDB lldb_private::ConnectionFileDescriptor::BytesAvailable(this=0x00000001057178f0, timeout_usec=0x004c4b40, error_ptr=0x0000000105980a18) + 722 at ConnectionFileDescriptor.cpp:542
          frame #2: 0x0000000100f3e6dd LLDB lldb_private::ConnectionFileDescriptor::Read(this=0x00000001057178f0, dst=0x0000000105980a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105980a14, error_ptr=0x0000000105980a18) + 301 at ConnectionFileDescriptor.cpp:273
          frame #3: 0x0000000100f3b8f7 LLDB lldb_private::Communication::ReadFromConnection(this=0x0000000105717580, dst=0x0000000105980a60, dst_len=1024, timeout_usec=0x004c4b40, status=0x0000000105980a14, error_ptr=0x0000000105980a18) + 167 at Communication.cpp:317
          frame #4: 0x0000000100f3b197 LLDB lldb_private::Communication::ReadThread(p=0x0000000105717580) + 327 at Communication.cpp:344
          frame #5: 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x00000001057179b0) + 227 at Host.cpp:549
          frame #6: 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
          frame #7: 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
      
        thread #6: tid = 0x2a03, 0x00007fff88a18af2 libsystem_kernel.dylib read + 10, name = <lldb.driver.commandline_io>
          frame #0: 0x00007fff88a18af2 libsystem_kernel.dylib read + 10
          frame #1: 0x0000000100050c3b libedit.3.dylib read_init + 247
          frame #2: 0x0000000100050e96 libedit.3.dylib el_wgetc + 155
          frame #3: 0x000000010005115d libedit.3.dylib el_wgets + 578
          frame #4: 0x000000010005debc libedit.3.dylib el_gets + 37
          frame #5: 0x000000010000d409 lldb IOChannel::LibeditGetInput(this=0x0000000105700490, new_line=0x0000000105a03db0) + 89 at IOChannel.cpp:311
          frame #6: 0x000000010000d8b6 lldb IOChannel::Run(this=0x0000000105700490) + 806 at IOChannel.cpp:391
          frame #7: 0x000000010000d57d lldb IOChannel::IOReadThread(ptr=0x0000000105700490) + 29 at IOChannel.cpp:345
          frame #8: 0x0000000101078923 LLDB ThreadCreateTrampoline(arg=0x00000001057179f0) + 227 at Host.cpp:549
          frame #9: 0x00007fff884aa8bf libsystem_c.dylib _pthread_start + 335
          frame #10: 0x00007fff884adb75 libsystem_c.dylib thread_start + 13
      (lldb) 
      
      llvm-svn: 148110
      6d3dbf51
  32. Dec 22, 2011
  33. Dec 17, 2011
    • Jim Ingham's avatar
      Add the ability to capture the return value in a thread's stop info, and print it · 73ca05a2
      Jim Ingham authored
      as part of the thread format output.
      Currently this is only done for the ThreadPlanStepOut.
      Add a convenience API ABI::GetReturnValueObject.
      Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
      trying to hand out one of its subsidiary object's pointers.  That way this will always
      be good.
      
      llvm-svn: 146806
      73ca05a2
  34. Nov 21, 2011
    • Greg Clayton's avatar
      Many GDB users always want to display disassembly when they stop by using · e372b98d
      Greg Clayton authored
      something like "display/4i $pc" (or something like this). With LLDB we already
      were showing 3 lines of source before and 3 lines of source after the current
      source line when showing a stop context. We now improve this by allowing the
      user to control the number of lines with the new "stop-line-count-before" and
      "stop-line-count-after" settings. Also, there is a new setting for how many
      disassembly lines to show: "stop-disassembly-count". This will control how many
      source lines are shown when there is no source or when we have no source line
      info. 
      
      settings set stop-line-count-before 3
      settings set stop-line-count-after 3
      settings set stop-disassembly-count 4
      settings set stop-disassembly-display no-source
      
      The default values are set as shown above and allow 3 lines of source before 
      and after (what we used to do) the current stop location, and will display 4 
      lines of disassembly if the source is not available or if we have no debug
      info. If both "stop-source-context-before" and "stop-source-context-after" are
      set to zero, this will disable showing any source when stopped. The 
      "stop-disassembly-display" setting is an enumeration that allows you to control
      when to display disassembly. It has 3 possible values:
      
      "never" - never show disassembly no matter what
      "no-source" - only show disassembly when there is no source line info or the source files are missing
      "always" - always show disassembly.
      
      llvm-svn: 145050
      e372b98d
  35. Nov 17, 2011
  36. Nov 16, 2011
    • Greg Clayton's avatar
      Made the darwin host layer properly reap any child processes that it spawns. · e4e45924
      Greg Clayton authored
      After recent changes we weren't reaping child processes resulting in many
      zombie processes. 
      
      This was fixed by adding more settings to the ProcessLaunchOptions class
      that allow clients to specify a callback function and baton to be notified
      when their process dies. If one is not supplied a default callback will be
      used that "does the right thing". 
      
      Cleaned up a race condition in the ProcessGDBRemote class that would attempt
      to monitor when debugserver died. 
      
      Added an extra boolean to the process monitor callbacks that indicate if a
      process exited or not. If your process exited with a zero exit status and no
      signal, both items could be zero.
      
      Modified the process monitor functions to not require a callback function
      in order to reap the child process.
      
      llvm-svn: 144780
      e4e45924
Loading