Skip to content
  1. Oct 05, 2012
    • Jason Molenda's avatar
      Ran the sources through the compiler with -Wshadow warnings · ccd41e55
      Jason Molenda authored
      enabled after we'd found a few bugs that were caused by shadowed
      local variables; the most important issue this turned up was
      a common mistake of trying to obtain a mutex lock for the scope
      of a code block by doing
      
              Mutex::Locker(m_map_mutex);
      
      This doesn't assign the lock object to a local variable; it is
      a temporary that has its dtor called immediately.  Instead,
      
              Mutex::Locker locker(m_map_mutex);
      
      does what is intended.  For some reason -Wshadow happened to
      highlight these as shadowed variables.
      
      I also fixed a few obivous and easy shadowed variable issues
      across the code base but there are a couple dozen more that
      should be fixed when someone has a free minute.
      <rdar://problem/12437585>
      
      llvm-svn: 165269
      ccd41e55
  2. Sep 18, 2012
  3. Feb 16, 2012
  4. Jan 31, 2012
  5. Aug 20, 2011
  6. Jul 07, 2011
    • Greg Clayton's avatar
      Added "target variable" command that allows introspection of global · 644247c1
      Greg Clayton authored
      variables prior to running your binary. Zero filled sections now get
      section data correctly filled with zeroes when Target::ReadMemory
      reads from the object file section data.
      
      Added new option groups and option values for file lists. I still need
      to hook up all of the options to "target variable" to allow more complete
      introspection by file and shlib.
      
      Added the ability for ValueObjectVariable objects to be created with
      only the target as the execution context. This allows them to be read
      from the object files through Target::ReadMemory(...). 
      
      Added a "virtual Module * GetModule()" function to the ValueObject
      class. By default it will look to the parent variable object and
      return its module. The module is needed when we have global variables
      that have file addresses (virtual addresses that are specific to
      module object files) and in turn allows global variables to be displayed
      prior to running.
      
      Removed all of the unused proxy object support that bit rotted in 
      lldb_private::Value.
      
      Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
      with the more efficient "FileSpec::Equal (lhs, rhs)".
      
      Improved logging in GDB remote plug-in.
      
      llvm-svn: 134579
      644247c1
  7. Jun 19, 2011
  8. Jun 17, 2011
    • Greg Clayton's avatar
      Improved the packet throughput when debugging with GDB remote by over 3x on · 73bf5dbd
      Greg Clayton authored
      darwin (not sure about other platforms).
      
      Modified the communication and connection classes to not require the
      BytesAvailable function. Now the "Read(...)" function has a timeout in
      microseconds.
      
      Fixed a lot of assertions that were firing off in certain cases and replaced
      them with error output and code that can deal with the assertion case.
      
      llvm-svn: 133224
      73bf5dbd
  9. Apr 01, 2011
    • Greg Clayton's avatar
      Added the ability to get a broadcaster event name for a given broadcaster · 95bf0fd3
      Greg Clayton authored
      event.
      
      Modified the ProcessInfo structure to contain all process arguments. Using the
      new function calls on MacOSX allows us to see the full process name, not just
      the first 16 characters. 
      
      Added a new platform command: "platform process info <pid> [<pid> <pid> ...]"
      that can be used to get detailed information for a process including all 
      arguments, user and group info and more.
      
      llvm-svn: 128694
      95bf0fd3
  10. Mar 24, 2011
    • Greg Clayton's avatar
      Did a lot more work on abtracting and organizing the platforms. · 1cb6496e
      Greg Clayton authored
      On Mac OS X we now have 3 platforms:
      PlatformDarwin - must be subclassed to fill in the missing pure virtual funcs
                       but this implements all the common functionality between
                       remote-macosx and remote-ios. It also allows for another
                       platform to be used (remote-gdb-server for now) when doing
                       remote connections. Keeping this pluggable will allow for
                       flexibility.
      PlatformMacOSX - Now implements both local and remote macosx desktop platforms.
      PlatformRemoteiOS - Remote only iOS that knows how to locate SDK files in the
                          cached SDK locations on the host.
      
      A new agnostic platform has been created:
      PlatformRemoteGDBServer - this implements the platform using the GDB remote 
                                protocol and uses the built in lldb_private::Host
                                static functions to implement many queries.
      
      llvm-svn: 128193
      1cb6496e
  11. Mar 20, 2011
    • Greg Clayton's avatar
      Split all of the core of LLDB.framework/lldb.so into a · 7a5388bf
      Greg Clayton authored
      static archive that can be linked against. LLDB.framework/lldb.so
      exports a very controlled API. Splitting the API into a static
      library allows other tools (debugserver for now) to use the power
      of the LLDB debugger core, yet not export it as its API is not
      portable or maintainable. The Host layer and many of the other
      internal only APIs can now be statically linked against.
      
      Now LLDB.framework/lldb.so links against "liblldb-core.a" instead
      of compiling the .o files only for the shared library. This fix
      is only for compiling with Xcode as the Makefile based build already
      does this.
      
      The Xcode projecdt compiler has been changed to LLVM. Anyone using
      Xcode 3 will need to manually change the compiler back to GCC 4.2,
      or update to Xcode 4.
      
      llvm-svn: 127963
      7a5388bf
  12. Feb 08, 2011
  13. Feb 03, 2011
  14. Feb 01, 2011
  15. Jan 27, 2011
    • Greg Clayton's avatar
      Finally tracked down the racy condition that would hose up our debug · 7ec3d40e
      Greg Clayton authored
      sessions: When continue packet has been sent and an interrupt packet was
      quickly sent, it would get read at the same time:
      
      $c#00\x03
      
      There was an error where the packet end index was always being computed 
      incorrectly by debugserver, but it wouldn't matter if there weren't extra
      bytes on the end (the hex \x03 interrupt byte in this case). The first
      '$' last 3 bytes of the data in the packet buffer were being trimmed
      (trying to trim the '#' + checksum (#XX)) which made:
      
      c#
      
      And this would then be passed to the handle routine for the 'c' packet which
      would see an extra character at the end and assume it was going to be in the
      form c[addr] where "[addr]" was a hex address to resume at and this would
      result in a malformed packet response. This is now fixed and everything works
      great.
      
      Another issue was issuing async packets correctly by doing correct handshakes
      between the thread that wants to send the async packet, and the thread that
      is tracking the current run.
      
      Added a write lock to the communication class as well to make sure you never
      get two threads trying to write data at the same time. This wasn't happening,
      but it is a good idea to make sure it doesn't.
      
      llvm-svn: 124369
      7ec3d40e
  16. Jan 12, 2011
    • Stephen Wilson's avatar
      Do not pass an invalid thread to Thread{Cancel,Join}. · a08cfb12
      Stephen Wilson authored
      A race condition exists between StopReadThread and the reader thread proper.
      When StopReadThread sets m_read_thread_enabled to false the reader thread can
      terminate and set m_read_thread to LLDB_INVALID_HOST_THREAD on exit.  Thus calls
      to ThreadCancel or ThreadJoin in StopReadThread can be passed an invalid handle.
      
      This patch removes the race by using m_read_thread_enabled as the flag thru
      which the reader thread can notify the parent thread of early/abnormal
      termination.
      
      llvm-svn: 123309
      a08cfb12
  17. Dec 14, 2010
    • Greg Clayton's avatar
      Modified LLDB expressions to not have to JIT and run code just to see variable · 8b2fe6dc
      Greg Clayton authored
      values or persistent expression variables. Now if an expression consists of
      a value that is a child of a variable, or of a persistent variable only, we
      will create a value object for it and make a ValueObjectConstResult from it to
      freeze the value (for program variables only, not persistent variables) and
      avoid running JITed code. For everything else we still parse up and JIT code
      and run it in the inferior. 
      
      There was also a lot of clean up in the expression code. I made the 
      ClangExpressionVariables be stored in collections of shared pointers instead
      of in collections of objects. This will help stop a lot of copy constructors on
      these large objects and also cleans up the code considerably. The persistent
      clang expression variables were moved over to the Target to ensure they persist
      across process executions.
      
      Added the ability for lldb_private::Target objects to evaluate expressions.
      We want to evaluate expressions at the target level in case we aren't running
      yet, or we have just completed running. We still want to be able to access the
      persistent expression variables between runs, and also evaluate constant 
      expressions. 
      
      Added extra logging to the dynamic loader plug-in for MacOSX. ModuleList objects
      can now dump their contents with the UUID, arch and full paths being logged with
      appropriate prefix values.
      
      Thread hardened the Communication class a bit by making the connection auto_ptr
      member into a shared pointer member and then making a local copy of the shared
      pointer in each method that uses it to make sure another thread can't nuke the
      connection object while it is being used by another thread.
      
      Added a new file to the lldb/test/load_unload test that causes the test a.out file
      to link to the libd.dylib file all the time. This will allow us to test using
      the DYLD_LIBRARY_PATH environment variable after moving libd.dylib somewhere else.
      
      llvm-svn: 121745
      8b2fe6dc
  18. Dec 12, 2010
    • Greg Clayton's avatar
      Fixed a multi-threaded race condition that could happen when communication... · bfae66ae
      Greg Clayton authored
      Fixed a multi-threaded race condition that could happen when communication classes are shutting down. We currently don't protect communication connection classes against multi-threaded access. The connection is stored in the lldb_private::Communication.m_connection_ap auto_ptr member. We either need to add protections when accessing this class or not let anything racy occur. With this fix, we are doing the latter.
      
      llvm-svn: 121647
      bfae66ae
  19. Dec 08, 2010
    • Greg Clayton's avatar
      Added the ability to dump sections to a certain depth (for when sections · 10177aa0
      Greg Clayton authored
      have children sections).
      
      Modified SectionLoadList to do it's own multi-threaded protected on its map.
      The ThreadSafeSTLMap class was difficult to deal with and wasn't providing
      much utility, it was only getting in the way.
      
      Make sure when the communication read thread is about to exit, it clears the
      thread in the main class.
      
      Fixed the ModuleList to correctly ignore architectures and UUIDs if they aren't
      valid when searching for a matching module. If we specified a file with no arch,
      and then modified the file and loaded it again, it would not match on subsequent
      searches if the arch was invalid since it would compare an invalid architecture
      to the one that was found or selected within the shared library or executable.
      This was causing stale modules to stay around in the global module list when they
      should have been removed.
      
      Removed deprecated functions from the DynamicLoaderMacOSXDYLD class.
      
      Modified "ProcessGDBRemote::IsAlive" to check if we are connected to a gdb
      server and also make sure our process hasn't exited.
      
      llvm-svn: 121236
      10177aa0
  20. Dec 04, 2010
  21. Dec 02, 2010
    • Caroline Tice's avatar
      · 82305fc5
      Caroline Tice authored
      Add proper EOF handling to Communication & Connection classes:
      
      Add bool member to Communication class indicating whether the
      Connection should be closed on receiving an EOF or not.  Update the
      Connection read to return an EOF status when appropriate.  Modify the
      Communication class to pass the EOF along or not, and to close the
      Connection or not, as appropriate.
      
      llvm-svn: 120723
      82305fc5
  22. Nov 20, 2010
  23. Nov 19, 2010
  24. Nov 06, 2010
    • Greg Clayton's avatar
      Modified all logging calls to hand out shared pointers to make sure we · 2d4edfbc
      Greg Clayton authored
      don't crash if we disable logging when some code already has a copy of the
      logger. Prior to this fix, logs were handed out as pointers and if they were
      held onto while a log got disabled, then it could cause a crash. Now all logs
      are handed out as shared pointers so this problem shouldn't happen anymore.
      We are also using our new shared pointers that put the shared pointer count
      and the object into the same allocation for a tad better performance.
      
      llvm-svn: 118319
      2d4edfbc
  25. Oct 29, 2010
  26. Oct 26, 2010
    • Caroline Tice's avatar
      First pass at adding logging capabilities for the API functions. At the moment · ceb6b139
      Caroline Tice authored
      it logs the function calls, their arguments and the return values.  This is not
      complete or polished, but I am committing it now, at the request of someone who
      really wants to use it, even though it's not really done.  It currently does not
      attempt to log all the functions, just the most important ones.  I will be 
      making further adjustments to the API logging code over the next few days/weeks.
      (Suggestions for improvements are welcome).
      
      
      Update the Python build scripts to re-build the swig C++ file whenever 
      the python-extensions.swig file is modified.
      
      Correct the help for 'log enable' command (give it the correct number & type of
      arguments).
      
      llvm-svn: 117349
      ceb6b139
  27. Sep 15, 2010
    • Greg Clayton's avatar
      Fixed a race condition that was sometimes stopping our command line · 86c3f345
      Greg Clayton authored
      interpreter from working. The communication read thread could
      startup and immediately exit if m_read_thread_enabled was
      checked in the thread function before it was set by the
      thread that spawns the read thread. Now m_read_thread_enabled is set
      to true prior to spawning the read thread to avoid this issue.
      
      Hopefully this will clear up the sporatic failures in our test suite.
      
      llvm-svn: 113947
      86c3f345
  28. Jul 23, 2010
  29. Jul 21, 2010
  30. Jul 10, 2010
  31. Jun 09, 2010
  32. Jun 08, 2010
Loading