Skip to content
  1. Sep 14, 2010
    • Sean Callanan's avatar
      Added code to support use of "this" and "self" in · 44096b1a
      Sean Callanan authored
      expressions.  This involved three main changes:
      
       - In ClangUserExpression::ClangUserExpression(),
         we now insert the following lines into the
         expression:
           #define this ___clang_this
           #define self ___clang_self
      
       - In ClangExpressionDeclMap::GetDecls(), we
         special-case ___clang_(this|self) and instead
         look up "this" or "self"
      
       - In ClangASTSource, we introduce the capability
         to generate Decls with a different, overridden,
         name from the one that was requested, e.g.
         this for ___clang_this.
      
      llvm-svn: 113866
      44096b1a
    • Greg Clayton's avatar
      95112df6
    • Greg Clayton's avatar
      Fixed an issue that was always causing an extra empty argument to be sent · a52c155e
      Greg Clayton authored
      to any inferior process because the code was checking if no run args were
      set and then adding and empty string. This was happening for environment
      vars as well.
      
      llvm-svn: 113831
      a52c155e
    • Greg Clayton's avatar
      Fixed the implementation of "bool Block::Contains (const Block *block) const" · 6f00abd5
      Greg Clayton authored
      to return the correct result.
      
      Fixed "bool Variable::IsInScope (StackFrame *frame)" to return the correct
      result when there are no location lists.
      
      Modified the "frame variable" command such that:
      - if no arguments are given (dump all frame variables), then we only show
        variables that are currently in scope
      - if some arguments are given, we show an error if the variable is out of 
        scope
      
      llvm-svn: 113830
      6f00abd5
    • Greg Clayton's avatar
      Looking at some of the test suite failures in DWARF in .o files with the · 016a95eb
      Greg Clayton authored
      debug map showed that the location lists in the .o files needed some 
      refactoring in order to work. The case that was failing was where a function
      that was in the "__TEXT.__textcoal_nt" in the .o file, and in the 
      "__TEXT.__text" section in the main executable. This made symbol lookup fail
      due to the way we were finding a real address in the debug map which was
      by finding the section that the function was in in the .o file and trying to
      find this in the main executable. Now the section list supports finding a
      linked address in a section or any child sections. After fixing this, we ran
      into issue that were due to DWARF and how it represents locations lists. 
      DWARF makes a list of address ranges and expressions that go along with those
      address ranges. The location addresses are expressed in terms of a compile
      unit address + offset. This works fine as long as nothing moves around. When
      stuff moves around and offsets change between the remapped compile unit base
      address and the new function address, then we can run into trouble. To deal
      with this, we now store supply a location list slide amount to any location
      list expressions that will allow us to make the location list addresses into
      zero based offsets from the object that owns the location list (always a
      function in our case). 
      
      With these fixes we can now re-link random address ranges inside the debugger
      for use with our DWARF + debug map, incremental linking, and more.
      
      Another issue that arose when doing the DWARF in the .o files was that GCC
      4.2 emits a ".debug_aranges" that only mentions functions that are externally
      visible. This makes .debug_aranges useless to us and we now generate a real
      address range lookup table in the DWARF parser at the same time as we index
      the name tables (that are needed because .debug_pubnames is just as useless).
      llvm-gcc doesn't generate a .debug_aranges section, though this could be 
      fixed, we aren't going to rely upon it.
      
      Renamed a bunch of "UINT_MAX" to "UINT32_MAX".
      
      llvm-svn: 113829
      016a95eb
    • Johnny Chen's avatar
      Fixed an error in Debugger::UpdateExecutionContext() where an invalid index ID 0 · c13ee52c
      Johnny Chen authored
      was used to set the selected thread if none was selected.  Use a more robust
      API to accomplish the task.
      
      Also fixed an error found, while investigating, in CommandObjectThreadSelect::
      Execute() where the return status was not properly set if successful.
      
      As a result, both the stl step-in test cases with expectedFailure decorators now
      passed.
      
      llvm-svn: 113825
      c13ee52c
  2. Sep 13, 2010
    • Sean Callanan's avatar
      Bugfixes to the expression parser. Fixes include: · 9e6ed53e
      Sean Callanan authored
       - If you put a semicolon at the end of an expression,
         this no longer causes the expression parser to
         error out.  This was a two-part fix: first,
         ClangExpressionDeclMap::Materialize now handles
         an empty struct (such as when there is no return
         value); second, ASTResultSynthesizer walks backward
         from the end of the ASTs until it reaches something
         that's not a NullStmt.
      
       - ClangExpressionVariable now properly byte-swaps when
         printing itself.
      
       - ClangUtilityFunction now cleans up after itself when
         it's done compiling itself.
      
       - Utility functions can now use external functions just
         like user expressions.
      
       - If you end your expression with a statement that does
         not return a value, the expression now runs correctly
         anyway.
      
      Also, added the beginnings of an Objective-C object
      validator function, which is neither installed nor used
      as yet.
      
      llvm-svn: 113789
      9e6ed53e
    • Johnny Chen's avatar
      Extend the build mechanism to allow for specifying the compiler used to build · 1394a4b7
      Johnny Chen authored
      the binaries.
      
      If the build* function is passed the compiler argument, for example, 'llvm-gcc',
      it is passed as a make variable to the make command.  Otherwise, we check the
      LLDB_CC environment variable; if it is defined, it is passed as a make variable
      to the make command.
      
      If neither the compiler keyword argument nor the LLDB_CC environment variable is
      specified, no CC make variable is passed to the make command.  The Makefile gets
      to define the default CC being used.
      
      --------------------------------------------------------------------------------
      Example usage follows:
      
      o Via the keyword argument:
      
      class ArrayTypesTestCase(TestBase):
      
          mydir = "array_types"
      
          @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
          def test_with_dsym_and_run_command(self):
              """Test 'frame variable var_name' on some variables with array types."""
              self.buildDsym(compiler='llvm-gcc')
              self.array_types()
      ...
      
      o Via LLDB_CC environment variable:
      
      $ LLDB_CC=llvm-gcc ./dotest.py -v -t array_types
      ----------------------------------------------------------------------
      Collected 4 tests
      
      test_with_dsym_and_python_api (TestArrayTypes.ArrayTypesTestCase)
      Use Python APIs to inspect variables with array types. ... 
      os command: [['/bin/sh', '-c', 'make clean; make MAKE_DSYM=YES CC=llvm-gcc']]
      output: rm -rf "a.out" "a.out.dSYM"  main.o main.d
      llvm-gcc -arch x86_64 -gdwarf-2 -O0 -arch x86_64 -gdwarf-2 -O0  -c -o main.o main.c
      llvm-gcc -arch x86_64 -gdwarf-2 -O0  main.o -o "a.out"
      /usr/bin/dsymutil  -o "a.out.dSYM" "a.out"
      
      ...
      
      llvm-svn: 113781
      1394a4b7
    • Johnny Chen's avatar
      Updated the expected matching strings. · 9440d1c0
      Johnny Chen authored
      llvm-svn: 113756
      9440d1c0
    • Johnny Chen's avatar
      Updated the expected matching strings. · 661f8069
      Johnny Chen authored
      llvm-svn: 113755
      661f8069
    • Johnny Chen's avatar
      Updated the expected matching strings, and added a radar comment. · 8458405a
      Johnny Chen authored
      llvm-svn: 113753
      8458405a
    • Johnny Chen's avatar
      Updated the expected matching strings. · e00234e0
      Johnny Chen authored
      llvm-svn: 113751
      e00234e0
    • Johnny Chen's avatar
    • Johnny Chen's avatar
      9aae728e
    • Caroline Tice's avatar
      Clean up help text. · 8830091a
      Caroline Tice authored
      llvm-svn: 113738
      8830091a
    • Greg Clayton's avatar
      Fixed an assertion that happened when debugging DWARF in .o files with debug · ffc1d667
      Greg Clayton authored
      map on macosx.
      
      llvm-svn: 113737
      ffc1d667
    • Greg Clayton's avatar
      Make sure we have a variable list so we don't crash when a frame has no · 9df87c17
      Greg Clayton authored
      frame variables.
      
      llvm-svn: 113736
      9df87c17
    • Greg Clayton's avatar
      Added the summary values for function pointers so we can show where they · 737b9329
      Greg Clayton authored
      point to.
      
      llvm-svn: 113735
      737b9329
    • Greg Clayton's avatar
      Removed unused variable. · 5804fa41
      Greg Clayton authored
      llvm-svn: 113734
      5804fa41
    • Greg Clayton's avatar
      Added a work in the DWARF parser when we parse an array that ends up having · a134cc1b
      Greg Clayton authored
      no elements so that they at least have 1 element. 
      
      Added the ability to show the declaration location of variables to the 
      "frame variables" with the "--show-declaration" option ("-c" for short).
      
      Changed the "frame variables" command over to use the value object code
      so that we use the same code path as the public API does when accessing and
      displaying variable values.
      
      llvm-svn: 113733
      a134cc1b
    • Greg Clayton's avatar
      A few modifications to the class arrays test case. · 0c5550a9
      Greg Clayton authored
      llvm-svn: 113732
      0c5550a9
    • Greg Clayton's avatar
      I made this example after noting that I was unable to display an unsized · ac32b4dd
      Greg Clayton authored
      static class array. It turns out that gcc 4.2 will emit DWARF that correctly
      describes the PointType, but it will incorrectly emit debug info for the
      "g_points" array where the following things are wrong:
       - the DW_TAG_array_type won't have a subrange info
       - the DW_TAG_variable for "g_points" won't have a valid byte size, so even
         though we know the size of PointType, we can't infer the actual size
         of the array by dividing the size of the variable by the number of
         elements.
      
      We want to make sure clang and llvm-gcc handle this correctly.
      
      llvm-svn: 113730
      ac32b4dd
    • Greg Clayton's avatar
      Fixed a crash that would happen when using "frame variables" on any struct, · 83ff3898
      Greg Clayton authored
      union, or class that contained an enumeration type. When I was creating
      the clang enumeration decl, I wasn't calling "EnumDecl::setIntegerType (QualType)" 
      which means that if the enum decl was ever asked to figure out it's bit width
      (getTypeInfo()) it would crash. We didn't run into this with enum types that 
      weren't inside classes because the DWARF already told us how big the type was
      and when we printed an enum we would never need to calculate the size, we
      would use the pre-cached byte size we got from the DWARF. When the enum was 
      in a struct/union/class and we tried to layout the struct, the layout code
      would attempt to get the type info and segfault.
      
      llvm-svn: 113729
      83ff3898
  3. Sep 12, 2010
  4. Sep 11, 2010
  5. Sep 10, 2010
Loading