Skip to content
  1. Jan 04, 2013
  2. Dec 07, 2012
  3. Dec 04, 2012
    • Greg Clayton's avatar
      <rdar://problem/12798131> · 3bcdfc0e
      Greg Clayton authored
      Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.
      
      This fix does the following:
      - make sure all short options are treated as "int"
      - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
      - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
      - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value
      
      llvm-svn: 169189
      3bcdfc0e
  4. Nov 27, 2012
  5. Nov 23, 2012
  6. Nov 21, 2012
    • Daniel Malea's avatar
      Linux test case fixes · b90c3686
      Daniel Malea authored
      - missing includes in cpp test programs
      - mismatched dwarf/dsym test cases
      - make "com.apple.main-thread" expected string conditional on darwin platform
      
      llvm-svn: 168452
      b90c3686
  7. Nov 20, 2012
  8. Nov 12, 2012
  9. Oct 24, 2012
  10. Oct 18, 2012
    • Greg Clayton's avatar
      <rdar://problem/12462048> · 45392553
      Greg Clayton authored
      LLDB changes argv[0] when debugging a symlink. Now we have the notion of argv0 in the target settings:
      
      target.arg0 (string) = 
      
      There is also the program argument that are separate from the first argument that have existed for a while:
      
      target.run-args (arguments) =
      
      When running "target create <exe>", we will place the untouched "<exe>" into target.arg0 to ensure when we run, we run with what the user typed. This has been added to the ProcessLaunchInfo and all other needed places so we always carry around the:
      - resolved executable path
      - argv0
      - program args
      
      Some systems may not support separating argv0 from the resolved executable path and the ProcessLaunchInfo needs to carry all of this information along so that each platform can make that decision.
      
      llvm-svn: 166137
      45392553
  11. Oct 17, 2012
  12. Oct 16, 2012
  13. Sep 22, 2012
  14. Sep 21, 2012
    • Enrico Granata's avatar
      Initial commit of a new testsuite feature: test categories. · 165f8af8
      Enrico Granata authored
      This feature allows us to group test cases into logical groups (categories), and to only run a subset of test cases based on these categories.
      
      Each test-case can have a new method getCategories(self): which returns a list of strings that are the categories to which the test case belongs.
      If a test-case does not provide its own categories, we will look for categories in the class that contains the test case.
      If that fails too, the default implementation looks for a .category file, which contains a comma separated list of strings.
      The test suite will recurse look for .categories up until the top level directory (which we guarantee will have an empty .category file).
      
      The driver dotest.py has a new --category <foo> option, which can be repeated, and specifies which categories of tests you want to run.
      (example: ./dotest.py --category objc --category expression)
      
      All tests that do not belong to any specified category will be skipped. Other filtering options still exist and should not interfere with category filtering.
      A few tests have been categorized. Feel free to categorize others, and to suggest new categories that we could want to use.
      
      All categories need to be validly defined in dotest.py, or the test suite will refuse to run when you use them as arguments to --category.
      
      In the end, failures will be reported on a per-category basis, as well as in the usual format.
      
      This is the very first stage of this feature. Feel free to chime in with ideas for improvements!
      
      llvm-svn: 164403
      165f8af8
  15. May 11, 2012
  16. Apr 25, 2012
  17. Apr 24, 2012
  18. Apr 19, 2012
  19. Apr 06, 2012
    • Johnny Chen's avatar
      Add a new option to the test driver, -N dsym or -N dwarf, in order to exclude tests decorated with · f1548d4f
      Johnny Chen authored
      either @dsym_test or @dwarf_test to be executed during the testsuite run.  There are still lots of
      Test*.py files which have not been decorated with the new decorator.
      
      An example:
      
      # From TestMyFirstWatchpoint.py ->
      class HelloWatchpointTestCase(TestBase):
      
          mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint")
      
          @dsym_test
          def test_hello_watchpoint_with_dsym_using_watchpoint_set(self):
              """Test a simple sequence of watchpoint creation and watchpoint hit."""
              self.buildDsym(dictionary=self.d)
              self.setTearDownCleanup(dictionary=self.d)
              self.hello_watchpoint()
      
          @dwarf_test
          def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self):
              """Test a simple sequence of watchpoint creation and watchpoint hit."""
              self.buildDwarf(dictionary=self.d)
              self.setTearDownCleanup(dictionary=self.d)
              self.hello_watchpoint()
      
      
      # Invocation ->
      [17:50:14] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py
      LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug
      LLDB-137
      Path: /Volumes/data/lldb/svn/ToT
      URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
      Repository Root: https://johnny@llvm.org/svn/llvm-project
      Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
      Revision: 154133
      Node Kind: directory
      Schedule: normal
      Last Changed Author: gclayton
      Last Changed Rev: 154109
      Last Changed Date: 2012-04-05 10:43:02 -0700 (Thu, 05 Apr 2012)
      
      
      
      Session logs for test failures/errors/unexpected successes will go into directory '2012-04-05-17_50_49'
      Command invoked: python ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py
      compilers=['clang']
      
      Configuration: arch=x86_64 compiler=clang
      ----------------------------------------------------------------------
      Collected 2 tests
      
      1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)
         Test a simple sequence of watchpoint creation and watchpoint hit. ... skipped 'dsym tests'
      2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)
         Test a simple sequence of watchpoint creation and watchpoint hit. ... ok
      
      ----------------------------------------------------------------------
      Ran 2 tests in 1.138s
      
      OK (skipped=1)
      Session logs for test failures/errors/unexpected successes can be found in directory '2012-04-05-17_50_49'
      [17:50:50] johnny:/Volumes/data/lldb/svn/ToT/test $ 
      
      llvm-svn: 154154
      f1548d4f
  20. Mar 25, 2012
  21. 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
  22. Jan 06, 2012
  23. Dec 17, 2011
    • Johnny Chen's avatar
      http://llvm.org/bugs/show_bug.cgi?id=11588 · b456b792
      Johnny Chen authored
      valobj.AddressOf() returns None when an address is expected in a SyntheticChildrenProvider
      
      Patch from Enrico Granata:
      
      The problem was that the frozen object created by the expression parser was a copy of the contents of the StgClosure, rather than a pointer to it. Thus, the expression parser was correctly computing the result of the arithmetic&cast operation along with its address, but only saving it in the live object. This meant that the frozen copy acted as an address-less variable, hence the problem.
      
      The fix attached to this email lets the expression parser store the "live address" in the frozen copy of the address when the object is built without a valid address of its own.
      Doing so, along with delegating ValueObjectConstResult to calculate its own address when necessary, solves the issue. I have also added a new test case to check for regressions in this area, and checked that existing test cases pass correctly.
      
      llvm-svn: 146768
      b456b792
  24. Nov 15, 2011
  25. Oct 24, 2011
  26. Oct 08, 2011
  27. Sep 22, 2011
    • Sean Callanan's avatar
      Fixed a problem with the IR interpreter that caused · 0886e565
      Sean Callanan authored
      it to generate result variables that were not bound
      to their underlying data.  This allowed the SBValue
      class to use the interpreter (if possible).
      
      Also made sure that any result variables that point
      to stack allocations in the stack frame of the
      interpreted expressions do not get live data.
      
      llvm-svn: 140285
      0886e565
  28. Sep 20, 2011
  29. Sep 06, 2011
    • Enrico Granata's avatar
      Redesign of the interaction between Python and frozen objects: · 9128ee2f
      Enrico Granata authored
       - introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
         a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
         in frozen objects ; now such reads transparently move from host to target as required
       - as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
         removed code that enabled to recognize an expression result VO as such
       - introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
         representing a T* or T[], and doing dereferences transparently
         in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
       - as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
         en lieu of doing the raw read itself
       - introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
         this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
         in public layer this returns an SBData, just like GetPointeeData()
       - introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
         the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
         of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
       - added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
      Solved a bug where global pointers to global variables were not dereferenced correctly for display
      New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
      Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
      Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
       of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
       addresses that generate file address children UNLESS we have a live process)
      Updated help text for summary-string
      Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
      Edited the syntax and help for some commands to have proper argument types
      
      llvm-svn: 139160
      9128ee2f
  30. Aug 24, 2011
  31. Aug 23, 2011
    • Sean Callanan's avatar
      Added support for persistent types to the · bccce813
      Sean Callanan authored
      expression parser.  You can use a persistent
      type like this:
      
      (lldb) expr struct $foo { int a; int b; };
      (lldb) struct $foo i; i.a = 2; i.b = 3; i
      ($foo) $0 = {
        (int) a = 2
        (int) b = 3
      }
      
      typedefs work similarly.
      
      This patch affects the following files:
      
      test/expression_command/persistent_types/*
        A test case for persistent types,
        in particular structs and typedefs.
      
      ClangForward.h
        Added TypeDecl, needed to declare some
        functions in ASTResultSynthesizer.h
      
      ClangPersistentVariables.[h,cpp]
        Added a list of persistent types to the
        persistent variable store.
      
      ASTResultSynthesizer.[h,cpp]
        Made the AST result synthesizer iterate
        across TypeDecls in the expression, and
        record any persistent types found.  Also
        made a minor documentation fix.
      
      ClangUserExpression.[h,cpp]
        Extended the user expression class to
        keep the state needed to report the
        persistent variable store for the target
        to the AST result synthesizers. 
      
        Also introduced a new error code for
        expressions that executed normally but
        did not return a result.
      
      CommandObjectExpression.cpp
        Improved output for expressions (like 
        declarations of new persistent types) that
        don't return a result.  This is no longer
        treated as an error.
      
      llvm-svn: 138383
      bccce813
  32. Aug 04, 2011
  33. Aug 01, 2011
  34. Jul 29, 2011
  35. Jul 12, 2011
    • Johnny Chen's avatar
      Passing in os.ctermid() as the arg for SBTarget.Launch(...) for stdin_path,... · 1d3e880c
      Johnny Chen authored
      Passing in os.ctermid() as the arg for SBTarget.Launch(...) for stdin_path, stdout_path, and stderr_path
      is just wrong and resulted in the inferior's output getting mixed into the GDB remote communication's
      log file.  Change all test cases to not pass os.ctermid() and either use SBTarget.LaunchSimple() or
      SBTarget.Launch() and pass None as stdin_path/stdout_path/srderr_path to use a pseudo terminal.
      
      rdar://problem/9716499 program output is getting mixed into the GDB remote communications
      
      llvm-svn: 134940
      1d3e880c
  36. Jul 11, 2011
Loading