Skip to content
  1. Sep 21, 2010
    • Caroline Tice's avatar
      Re-write/clean up code that generated Python breakpoint commands. · 650b9268
      Caroline Tice authored
      Add a warning if no command was attached to the breakpoint.
      Update the help slightly.
      
      llvm-svn: 114467
      650b9268
    • Johnny Chen's avatar
      Decorated PersistentVariablesTestCase.test_persistent_variables() with · 2989bfa8
      Johnny Chen authored
      @expectedFailure as of r114384.
      
      llvm-svn: 114466
      2989bfa8
    • Sean Callanan's avatar
      Removed the hacky "#define this ___clang_this" handler · fc55f5d1
      Sean Callanan authored
      for C++ classes.  Replaced it with a less hacky approach:
      
       - If an expression is defined in the context of a
         method of class A, then that expression is wrapped as
         ___clang_class::___clang_expr(void*) { ... }
         instead of ___clang_expr(void*) { ... }.
      
       - ___clang_class is resolved as the type of the target
         of the "this" pointer in the method the expression
         is defined in.
      
       - When reporting the type of ___clang_class, a method
         with the signature ___clang_expr(void*) is added to
         that class, so that Clang doesn't complain about a
         method being defined without a corresponding
         declaration.
      
       - Whenever the expression gets called, "this" gets
         looked up, type-checked, and then passed in as the
         first argument.
      
      This required the following changes:
      
       - The ABIs were changed to support passing of the "this"
         pointer as part of trivial calls.
      
       - ThreadPlanCallFunction and ClangFunction were changed
         to support passing of an optional "this" pointer.
      
       - ClangUserExpression was extended to perform the
         wrapping described above.
      
       - ClangASTSource was changed to revert the changes
         required by the hack.
      
       - ClangExpressionParser, IRForTarget, and
         ClangExpressionDeclMap were changed to handle
         different manglings of ___clang_expr flexibly.  This
         meant no longer searching for a function called
         ___clang_expr, but rather looking for a function whose
         name *contains* ___clang_expr.
      
       - ClangExpressionParser and ClangExpressionDeclMap now
         remember whether "this" is required, and know how to
         look it up as necessary.
      
      A few inheritance bugs remain, and I'm trying to resolve
      these.  But it is now possible to use "this" as well as
      refer implicitly to member variables, when in the proper
      context.
      
      llvm-svn: 114384
      fc55f5d1
    • Johnny Chen's avatar
      Changed the order of two assignment stmts. · 958da040
      Johnny Chen authored
      llvm-svn: 114381
      958da040
    • Johnny Chen's avatar
      Added the capability to source the configFile specified via the "-c" option in · 209cdbef
      Johnny Chen authored
      order to customize the running of the test suite.  For the time being, the
      supported customizations are:
      
      o redirecting stdout and/or stderr
      o specifying a list of compilers to build the test programs
      o specifying a list of architectures to build the test programs for
      
      Also checked into the examples/test directory some example files which
      demonstrate the usage for the above customizations.
      
      $ ./dotest.py -v -c ~/.lldbtest-config persistent_variables
      $ cat ~/.lldbtest-config
      sys.stderr = open("/tmp/lldbtest-stderr", "w")
      sys.stdout = open("/tmp/lldbtest-stdout", "w")
      compilers = ["gcc", "llvm-gcc"]
      archs = ["x86_64", "i386"]
      $ cat /tmp/lldbtest-stderr
      ----------------------------------------------------------------------
      Collected 1 test
      
      
      Configuration: arch=x86_64 compiler=gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.397s
      
      OK
      
      Configuration: arch=x86_64 compiler=llvm-gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.282s
      
      OK
      
      Configuration: arch=i386 compiler=gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.297s
      
      OK
      
      Configuration: arch=i386 compiler=llvm-gcc
      test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
      Test that lldb persistent variables works correctly. ... ok
      
      ----------------------------------------------------------------------
      Ran 1 test in 1.269s
      
      OK
      $ cat /tmp/lldbtest-stdout
      $ 
      
      llvm-svn: 114380
      209cdbef
    • Johnny Chen's avatar
      Changed this breakpoint callback function to print to the stdout instead of · dba0a0fb
      Johnny Chen authored
      stderr so as not to disrupt the information emitted by the unittest framework.
      
      llvm-svn: 114377
      dba0a0fb
  2. Sep 20, 2010
  3. Sep 19, 2010
    • Johnny Chen's avatar
      Added @expectedFailure decorator for test_set_term_width(). · 8409284a
      Johnny Chen authored
      llvm-svn: 114307
      8409284a
    • Greg Clayton's avatar
      Added code that will allow completely customizable prompts for use in · 1b654882
      Greg Clayton authored
      replacing the "(lldb)" prompt, the "frame #1..." displays when doing
      stack backtracing and the "thread #1....". This will allow you to see 
      exactly the information that you want to see where you want to see it.
      This currently isn't hookup up to the prompts yet, but it will be soon.
      
      So what is the format of the prompts? Prompts can contain variables that
      have access to the current program state. Variables are text that appears
      in between a prefix of "${" and ends with a "}". Some of the interesting
      variables include:
      
      // The frame index (0, 1, 2, 3...)
      ${frame.index}
      
      // common frame registers with generic names
      ${frame.pc}
      ${frame.sp}
      ${frame.fp}
      ${frame.ra}
      ${frame.flags}
      
      // Access to any frame registers by name where REGNAME is any register name:
      ${frame.reg.REGNAME}
      
      // The current compile unit file where the frame is located
      ${file.basename}
      ${file.fullpath}
      
      // Function information
      ${function.name}
      ${function.pc-offset}
      
      // Process info
      ${process.file.basename}
      ${process.file.fullpath}
      ${process.id}
      ${process.name}
      
      // Thread info
      ${thread.id}
      ${thread.index}
      ${thread.name}
      ${thread.queue}
      ${thread.stop-reason}
      
      // Target information
      ${target.arch}
      
      // The current module for the current frame (the shared library or executable
      // that contains the current frame PC value):
      ${module.file.basename}
      ${module.file.fullpath}
      
      // Access to the line entry for where the current frame is when your thread
      // is stopped:
      ${line.file.basename}
      ${line.file.fullpath}
      ${line.number}
      ${line.start-addr}
      ${line.end-addr}
      
      Many times the information that you might have in your prompt might not be
      available and you won't want it to print out if it isn't valid. To take care
      of this you can enclose everything that must resolve into a scope. A scope
      is starts with '{' and ends with '}'. For example in order to only display
      the current file and line number when the information is available the format
      would be:
      
      "{ at {$line.file.basename}:${line.number}}"
      
      Broken down this is:
      
      start the scope: "{"
      
      format whose content will only be displayed if all information is available:
              "at {$line.file.basename}:${line.number}"
      
      end the scope: "}"
      
      We currently can represent the infomration we see when stopped at a frame:
      
      frame #0: 0x0000000100000e85 a.out`main + 4 at test.c:19
      
      with the following format:
      
      "frame #${frame.index}: ${frame.pc} {${module.file.basename}`}{${function.name}{${function.pc-offset}}{ at ${line.file.basename}:${line.number}}\n"
      
      This breaks down to always print:
      
              "frame #${frame.index}: ${frame.pc} "
      
      only print the module followed by a tick if we have a valid module:
      
              "{${module.file.basename}`}"
              
      print the function name with optional offset:
              "{${function.name}{${function.pc-offset}}"
      
      print the line info if it is available:
              
              "{ at ${line.file.basename}:${line.number}}"
      
      then finish off with a newline:
      
              "\n"
      
      Notice you can also put newlines ("\n") and tabs and everything else you
      are used to putting in a format string when desensitized with the \ character.
      
      Cleaned up some of the user settings controller subclasses. All of them 
      do not have any global settings variables and were all implementing stubs
      for the get/set global settings variable. Now there is a default version
      in UserSettingsController that will do nothing.
      
      llvm-svn: 114306
      1b654882
    • Johnny Chen's avatar
      Removed the @expectedFailure decorators; it was fixed with r114258. · dd4da82c
      Johnny Chen authored
      llvm-svn: 114305
      dd4da82c
  4. Sep 18, 2010
    • Greg Clayton's avatar
      Added a better error message to the "frame variable" when you try to view · 340b2baa
      Greg Clayton authored
      frame variables and are not stopped in a valid frame.
      
      llvm-svn: 114267
      340b2baa
    • Greg Clayton's avatar
      Fixed an issue with: · f5fb427d
      Greg Clayton authored
      (lldb) frame variable --location
      
      Where the address of variables wasn't being formatted consistently.
      
      llvm-svn: 114266
      f5fb427d
    • Greg Clayton's avatar
      General command line help cleanup: · ed8a705c
      Greg Clayton authored
      - All single character options will now be printed together
      - Changed all options that contains underscores to contain '-' instead
      - Made the help come out a little flatter by showing the long and short
        option on the same line.
      - Modified the short character for "--ignore-count" options to "-i"
      
      llvm-svn: 114265
      ed8a705c
    • Greg Clayton's avatar
      Bug #: 8447030 · 6ba78151
      Greg Clayton authored
      Fixed an issue with ClangASTContext::GetIndexOfChildMemberWithName() 
      where objective C ivars were not being found correctly if they were
      the second or higher child.
      
      llvm-svn: 114258
      6ba78151
    • Greg Clayton's avatar
      Fixed the way set/show variables were being accessed to being natively · a7015092
      Greg Clayton authored
      accessed by the objects that own the settings. The previous approach wasn't
      very usable and made for a lot of unnecessary code just to access variables
      that were already owned by the objects.
      
      While I fixed those things, I saw that CommandObject objects should really
      have a reference to their command interpreter so they can access the terminal
      with if they want to output usaage. Fixed up all CommandObjects to take
      an interpreter and cleaned up the API to not need the interpreter to be
      passed in.
      
      Fixed the disassemble command to output the usage if no options are passed
      down and arguments are passed (all disassebmle variants take options, there
      are no "args only").
      
      llvm-svn: 114252
      a7015092
    • Johnny Chen's avatar
      Added a hook for the test driver to take an optional config file to customize · 49b415de
      Johnny Chen authored
      the running of the test suite.  Right now, it doesn't do anything with the
      config file.
      
      Pass "-c myConfigFile" to specify the config file.
      
      llvm-svn: 114245
      49b415de
    • Johnny Chen's avatar
      Fixed a typo and supplied a more appropriate assert message. · aa902921
      Johnny Chen authored
      llvm-svn: 114232
      aa902921
    • Johnny Chen's avatar
      Added test cases to FoundationTestCase to exercise lookup of objc data types and · b330786d
      Johnny Chen authored
      to evaluate expressions.  Marked with @expectedFailure decorators for the time
      being.
      
      Enhanced the lldbtest.TestBase.expect() API to allow an additional keyword arg
      named "error".  If the client passes "error=True", it signifies that an error
      while running the command is expected.  The golden input is then compared
      against the return object's error output.
      
      llvm-svn: 114228
      b330786d
  5. Sep 17, 2010
  6. Sep 16, 2010
Loading