Skip to content
  1. Jul 09, 2013
    • Daniel Malea's avatar
      Add TestConcurrentEvents test for LLDB's handling of inferior threads · b3d41a27
      Daniel Malea authored
      - Test verifies LLDB's handling of inferiors with threads that: hit breakpoints,
        modfiy variables that have watchpoints set, generate user signals, and crash.
      - Add a few "stress tests" (with ~100 threads) -- run these with "-l" dotest.py
        flag.
      - Fix stop_reason_to_str helper in lldbutil to handle eStopReasonThreadExited.
      - Add sort_stopped_threads helper to lldbutil to separate thread lists based
        on stop reason.
      
      Logged llvm.org/pr16566 and llvm.org/pr16567 for bugs exposed.
      
      llvm-svn: 185889
      b3d41a27
  2. Mar 19, 2013
    • Greg Clayton's avatar
      Fixed incorrect python that was trying to validate that we got a valid... · 53c5ddf0
      Greg Clayton authored
      Fixed incorrect python that was trying to validate that we got a valid lldb.SBThread object by checking to see if it is equal to "None". 
      
      This test is incorrect as functions that return lldb.SBThread objects never return None, they just return lldb.SBThread objects that contain invalid opaque classes. 
      
      llvm-svn: 177416
      53c5ddf0
  3. Jan 08, 2013
    • Greg Clayton's avatar
      <rdar://problem/12953853> · c1b2ccfd
      Greg Clayton authored
      Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file.
      
      Also fixed issues in the test suite that arose after fixing the bug.
      
      Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option.
      
      llvm-svn: 171816
      c1b2ccfd
  4. Sep 24, 2012
  5. Sep 22, 2012
  6. Jul 06, 2012
  7. Feb 04, 2012
    • Greg Clayton's avatar
      Convert all python objects in our API to use overload the __str__ method · 81e871ed
      Greg Clayton authored
      instead of the __repr__. __repr__ is a function that should return an
      expression that can be used to recreate an python object and we were using
      it to just return a human readable string.
      
      Fixed a crasher when using the new implementation of SBValue::Cast(SBType).
      
      Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general
      improvements to the API.
      
      Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't
      correctly handle not having a target.
      
      llvm-svn: 149743
      81e871ed
  8. Dec 22, 2011
  9. Nov 13, 2011
    • Greg Clayton's avatar
      <rdar://problem/10338439> · 2fc93eab
      Greg Clayton authored
      This is the actual fix for the above radar where global variables that weren't
      initialized were not being shown correctly when leaving the DWARF in the .o 
      files. Global variables that aren't intialized have symbols in the .o files
      that specify they are undefined and external to the .o file, yet document the
      size of the variable. This allows the compiler to emit a single copy, but makes
      it harder for our DWARF in .o files with the executable having a debug map
      because the symbol for the global in the .o file doesn't exist in a section
      that we can assign a fixed up linked address to, and also the DWARF contains
      an invalid address in the "DW_OP_addr" location (always zero). This means that
      the DWARF is incorrect and actually maps all such global varaibles to the
      first file address in the .o file which is usually the first function. So we
      can fix this in either of two ways: make a new fake section in the .o file
      so that we have a file address in the .o file that we can relink, or fix the 
      the variable as it is created in the .o file DWARF parser and actually give it
      the file address from the executable. Each variable contains a 
      SymbolContextScope, or a single pointer that helps us to recreate where the
      variables came from (which module, file, function, etc). This context helps
      us to resolve any file addresses that might be in the location description of
      the variable by pointing us to which file the file address comes from, so we
      can just replace the SymbolContextScope and also fix up the location, which we
      would have had to do for the other case as well, and update the file address.
      Now globals display correctly.
      
      The above changes made it possible to determine if a variable is a global
      or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag
      for each variable (local, global, or static), yet DWARF provides no way for
      us to classify these variables into these categories. We can now detect when
      a variable has a simple address expressions as its location and this will help
      us classify these correctly.
      
      While making the above changes I also noticed that we had two symbol types:
      eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same
      thing: the symbol is not defined in the current object file. Symbol objects
      also have a bit that specifies if a symbol is externally visible, so I got
      rid of the eSymbolTypeExtern symbol type and moved all code locations that
      used it to use the eSymbolTypeUndefined type.
       
      
      llvm-svn: 144489
      2fc93eab
  10. Oct 14, 2011
    • Johnny Chen's avatar
      SBValue::Watch() and SBValue::WatchPointee() are now the official API for creating · 01a67860
      Johnny Chen authored
      a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee
      encapsulated by SBValue (WatchPointee).
      
      Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that.
      
      Modified the watchpoint related test suite to reflect the change.
      
      Plus replacing WatchpointLocation with Watchpoint throughout the code base.
      
      There are still cleanups to be dome.  This patch passes the whole test suite.
      Check it in so that we aggressively catch regressions.
      
      llvm-svn: 141925
      01a67860
  11. Sep 30, 2011
    • Johnny Chen's avatar
      Migrate the in_range(symbol, section) and symbol_iter(module, section) utility functions · c44e20ce
      Johnny Chen authored
      from lldbutil.py to the lldb.py proper.  The in_range() function becomes a function in
      the lldb module.  And the symbol_iter() function becomes a method within the SBModule
      called symbol_in_section_iter().  Example:
      
              # Iterates the text section and prints each symbols within each sub-section.
              for subsec in text_sec:
                  print INDENT + repr(subsec)
                  for sym in exe_module.symbol_in_section_iter(subsec):
                      print INDENT2 + repr(sym)
                      print INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType())
      
      might produce this following output:
      
          [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
              id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
              symbol type: code
              id = {0x00000008}, name = 'thread_func(void*)', range = [0x0000000100001870-0x00000001000019b0)
              symbol type: code
              id = {0x0000000c}, name = 'main', range = [0x00000001000019b0-0x0000000100001d5c)
              symbol type: code
              id = {0x00000023}, name = 'start', address = 0x0000000100001780
              symbol type: code
          [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
              id = {0x00000024}, name = '__stack_chk_fail', range = [0x0000000100001d5c-0x0000000100001d62)
              symbol type: trampoline
              id = {0x00000028}, name = 'exit', range = [0x0000000100001d62-0x0000000100001d68)
              symbol type: trampoline
              id = {0x00000029}, name = 'fflush', range = [0x0000000100001d68-0x0000000100001d6e)
              symbol type: trampoline
              id = {0x0000002a}, name = 'fgets', range = [0x0000000100001d6e-0x0000000100001d74)
              symbol type: trampoline
              id = {0x0000002b}, name = 'printf', range = [0x0000000100001d74-0x0000000100001d7a)
              symbol type: trampoline
              id = {0x0000002c}, name = 'pthread_create', range = [0x0000000100001d7a-0x0000000100001d80)
              symbol type: trampoline
              id = {0x0000002d}, name = 'pthread_join', range = [0x0000000100001d80-0x0000000100001d86)
              symbol type: trampoline
              id = {0x0000002e}, name = 'pthread_mutex_lock', range = [0x0000000100001d86-0x0000000100001d8c)
              symbol type: trampoline
              id = {0x0000002f}, name = 'pthread_mutex_unlock', range = [0x0000000100001d8c-0x0000000100001d92)
              symbol type: trampoline
              id = {0x00000030}, name = 'rand', range = [0x0000000100001d92-0x0000000100001d98)
              symbol type: trampoline
              id = {0x00000031}, name = 'strtoul', range = [0x0000000100001d98-0x0000000100001d9e)
              symbol type: trampoline
              id = {0x00000032}, name = 'usleep', range = [0x0000000100001d9e-0x0000000100001da4)
              symbol type: trampoline
          [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
          [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
          [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
          [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
      
      llvm-svn: 140830
      c44e20ce
  12. Sep 28, 2011
  13. Sep 27, 2011
  14. Aug 04, 2011
  15. Jul 23, 2011
    • Johnny Chen's avatar
      Add an additional formatter class RecursiveDecentFormatter which prints the · 36d7d916
      Johnny Chen authored
      value and the decendents.  For an example,
      
      rdf = lldbutil.RecursiveDecentFormatter(indent_child=2)
      print rdf.format(g_table)
      
      produces:
      
      (const char **[2]) g_table = 0x00000001055a80f0 (location)
        (const char **) [0] = 0x00000001055a8080
          (const char *) *[0] = "Sunday"
        (const char **) [1] = 0x00000001055a80c0
          (const char *) *[1] = "Monday"
      
      llvm-svn: 135815
      36d7d916
  16. Jul 22, 2011
    • Johnny Chen's avatar
      Fix comment. · efee1cdc
      Johnny Chen authored
      llvm-svn: 135737
      efee1cdc
    • Johnny Chen's avatar
      Add BasicFormatter and ChildVisitingFormatter utility classes to the lldbutil.py module · 989b7efd
      Johnny Chen authored
      which provide some convenient ways to print an SBValue object.  Use that in TestValueAPI.py
      to print the 'days_of_week' char* array variable.
      
      For an example:
      
      cvf = lldbutil.ChildVisitingFormatter(indent=2)
      print cvf.format(days_of_week)
      
      produces:
      
      (const char *[7]) days_of_week = 0x00000001026a5060 (location)
        (const char *) [0] = "Sunday"
        (const char *) [1] = "Monday"
        (const char *) [2] = "Tuesday"
        (const char *) [3] = "Wednesday"
        (const char *) [4] = "Thursday"
        (const char *) [5] = "Friday"
        (const char *) [6] = "Saturday"
      
      llvm-svn: 135736
      989b7efd
  17. Jul 14, 2011
  18. Jun 20, 2011
  19. Jun 17, 2011
    • Johnny Chen's avatar
      o lldbutil.py: · 0d4f6dd0
      Johnny Chen authored
        For the print_stacktrace(thread, string_buffer = False) function, if we have debug info
        for a frame function, let's also emit the args for the current function.
      
      o TestFrameUtils.py:
      
        Add stronger assertTrue for frame0's args.
      
      o TestPrintStackTraces.py:
      
        Launch the inferior with ["abc", "xyz"] and expect '(int)argc=3' in the stack traces, since
        by design the inferior is built with debug info.
      
      llvm-svn: 133204
      0d4f6dd0
  20. Jun 16, 2011
  21. May 26, 2011
  22. May 25, 2011
  23. May 13, 2011
  24. May 12, 2011
    • Johnny Chen's avatar
      Add two utility functions: · ad7372c5
      Johnny Chen authored
          o get_parent_frame(frame)
          o get_args_as_string(frame)
      
      to lldbutil.py and create TestFrameUtils.py to exercise the utils.
      Plus re-arrange the test/python_api/lldbutil to have three directories
      for testing iteration, process stack traces, and the just added frame utils.
      
      llvm-svn: 131213
      ad7372c5
  25. May 11, 2011
  26. May 10, 2011
    • Johnny Chen's avatar
      Add a utility function get_registers(frame, kind) to get the registers of a... · 64ff7e6e
      Johnny Chen authored
      Add a utility function get_registers(frame, kind) to get the registers of a given frame and of a given kind.
      Also add three convenience functions get_GPRs(frame), get_FPRs(frame), and get_ESRs(frame) to get the general
      purpose registers, the floating point registers, and the exception state registers.
      
      Add TestRegistersIterator.py to test these added functions of lldbutil.py.
      
      llvm-svn: 131144
      64ff7e6e
  27. May 08, 2011
  28. May 05, 2011
  29. Apr 29, 2011
  30. Apr 27, 2011
  31. Apr 26, 2011
Loading