summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Updated to the LLVM/Clang of 2010-11-17 at 3:30pm.Sean Callanan2010-11-184-10/+33
| | | | llvm-svn: 119677
* The thread plan destructors may call Thread virtual methods. That means ↵Jim Ingham2010-11-185-3/+24
| | | | | | they have to get cleaned up in the derived class's destructor. Make sure that happens. llvm-svn: 119675
* Added support for constant strings of the form @"this-is-a-string".Sean Callanan2010-11-171-39/+349
| | | | | | | They are replaced with calls to the CoreFoundation function CFStringCreateWithBytes() by a portion of the IRForTarget pass. llvm-svn: 119582
* Whitespace fix.Sean Callanan2010-11-171-1/+0
| | | | llvm-svn: 119581
* Add a missing newline to the ThreadPlanAssemblyTracer output.Jim Ingham2010-11-171-1/+1
| | | | llvm-svn: 119553
* Add a ThreadPlanAssemblyTracer that takes just a thread (since that's how we ↵Jim Ingham2010-11-171-1/+15
| | | | | | call it from ThreadPlanBase...) llvm-svn: 119549
* Added an "Interrupted" bit to the ProcessEventData. Halt now generates an eventJim Ingham2010-11-178-93/+170
| | | | | | | | | with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events. DoHalt is changed to ensure that the stop even is processed, and an event with the Interrupted event is posted. Finally ClangFunction is rationalized to use this facility so the that Halt is handled more deterministically. llvm-svn: 119453
* Use different qualifier enums on the request of a clang engineer.Greg Clayton2010-11-161-2/+2
| | | | llvm-svn: 119396
* Make processes use InputReaders for their input. Move the processCaroline Tice2010-11-165-53/+150
| | | | | | | | | ReadThread stuff into the main Process class (out of the Process Plugins). This has the (intended) side effect of disabling the command line tool from reading input/commands while the process is running (the input is directed to the running process rather than to the command interpreter). llvm-svn: 119329
* Add an UnwindPlan Row for the last instruction of a function whenJason Molenda2010-11-161-1/+38
| | | | | | | | we're using the stack pointer to define the CFA again. Makes unwinds while sitting at the 'ret' instruction work, assuming we have accurate function address bounds. llvm-svn: 119327
* First attempt and getting "const" C++ method function signatures correct.Greg Clayton2010-11-164-9/+75
| | | | | | | It currently isn't working, but it should be close. I will work on this more when I figure out what I am not doing correctly. llvm-svn: 119324
* Added quotes around names that are being lookup up or inspected in the Greg Clayton2010-11-151-26/+26
| | | | | | | | | | | expression logging. Added some properties to the "objc" test. The expression parser can currently display properties that are backed by the default functions "expr myStr.string" will work. But it won't currently work when the property is backed by a different function such as "expr myStr.date". llvm-svn: 119103
* Added recursive name lookup logging with depth which is commented out and is ↵Greg Clayton2010-11-151-0/+4
| | | | | | currently only enabled when we blow the stack. llvm-svn: 119101
* Added the address of operator for the "frame variable" command. Greg Clayton2010-11-151-12/+25
| | | | llvm-svn: 119100
* Just like functions can have a basename and a mangled/demangled name, variableGreg Clayton2010-11-147-68/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | can too. So now the lldb_private::Variable class has support for this. Variables now have support for having a basename ("i"), and a mangled name ("_ZN12_GLOBAL__N_11iE"), and a demangled name ("(anonymous namespace)::i"). Nowwhen searching for a variable by name, users might enter the fully qualified name, or just the basename. So new test functions were added to the Variable and Mangled classes as: bool NameMatches (const ConstString &name); bool NameMatches (const RegularExpression &regex); I also modified "ClangExpressionDeclMap::FindVariableInScope" to also search for global variables that are not in the current file scope by first starting with the current module, then moving on to all modules. Fixed an issue in the DWARF parser that could cause a varaible to get parsed more than once. Now, once we have parsed a VariableSP for a DIE, we cache the result even if a variable wasn't made so we don't do any re-parsing. Some DW_TAG_variable DIEs don't have locations, or are missing vital info that stops a debugger from being able to display anything for it, we parse a NULL variable shared pointer for these DIEs so we don't keep trying to reparse it. llvm-svn: 119085
* Fixed an issue where we were trying to resolve lldb_private::Type encodingGreg Clayton2010-11-141-9/+12
| | | | | | | types to their full definitions more than we needed to. This caused an assertion in the DWARF parser to fire -- which is an indication that we are parsing too much. llvm-svn: 119020
* Fixed a crasher (an assert was firing in the DWARF parser) when settingGreg Clayton2010-11-143-18/+94
| | | | | | | | | | | breakpoints on inlined functions by name. This involved fixing the DWARF parser to correctly back up and parse the concrete function when we find inlined functions by name, then grabbing any appropriate inlined blocks and returning symbol contexts with the block filled in. After this was fixed, the breakpoint by name resolver needed to correctly deal with symbol contexts that had the inlined block filled in in the symbol contexts. llvm-svn: 119017
* Fixed an issue where we might not find global variables by name when we haveGreg Clayton2010-11-132-20/+91
| | | | | | | | | | | | | | | a debug map with DWARF in the .o files due to the attemted shortcut that was being taken where the global variables were being searched for by looking in the symbol table. The problem with the symbols in the symbol table is we don't break apart the symbol names for symbols when they are mangled into basename and the fully mangled name since this would take a lot of CPU time to chop up the mangled names and try and find the basenames. The DWARF info typically has this broken up for us where the basename of the variable is in a the DW_AT_name attribute, and the mangled name is in the DW_AT_MIPS_linkage_name attribute. Now we correctly find globals by searching all OSO's for the information so we can take advantage of this split information. llvm-svn: 119012
* Got namespace lookup working and was able to print a complex "this" as anGreg Clayton2010-11-132-10/+19
| | | | | | | | | | | | | | expression. This currently takes waaaayyyyy too much time to evaluate. We will need to look at the expression parser and find ways to optimize the info we provide and get this to evaluate quicker. I believe the performance issue is currently related to us always providing a complete C++ class type when asked about a C++ class which can cause a lot of information to be pulled since all classes will be fully created (methods, base classes, members, all their types). We will need to give the classes back the parser and mark them as having external sources and get parser (Sema) to query us when it needs more info. This should bring things up to an acceptable level. llvm-svn: 118979
* Modified the lldb_private::Type clang type resolving code to handle threeGreg Clayton2010-11-1329-268/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | cases when getting the clang type: - need only a forward declaration - need a clang type that can be used for layout (members and args/return types) - need a full clang type This allows us to partially parse the clang types and be as lazy as possible. The first case is when we just need to declare a type and we will complete it later. The forward declaration happens only for class/union/structs and enums. The layout type allows us to resolve the full clang type _except_ if we have any modifiers on a pointer or reference (both R and L value). In this case when we are adding members or function args or return types, we only need to know how the type will be laid out and we can defer completing the pointee type until we later need it. The last type means we need a full definition for the clang type. Did some renaming of some enumerations to get rid of the old "DC" prefix (which stands for DebugCore which is no longer around). Modified the clang namespace support to be almost ready to be fed to the expression parser. I made a new ClangNamespaceDecl class that can carry around the AST and the namespace decl so we can copy it into the expression AST. I modified the symbol vendor and symbol file plug-ins to use this new class. llvm-svn: 118976
* I'm not thrilled with how I structured this but RegisterContextLLDBJason Molenda2010-11-123-21/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | needs to use the current pc and current offset in two ways: To determine which function we are currently executing, and the decide how much of that function has executed so far. For the former use, we need to back up the saved pc value by one byte if we're going to use the correct function's unwind information -- we may be executing a CALL instruction at the end of a function and the following instruction belongs to a new function, or we may be looking at unwind information which only covers the call instruction and not the subsequent instruction. But when we're talking about deciding which row of an UnwindPlan to execute, we want to use the actual byte offset in the function, not the byte offset - 1. Right now RegisterContextLLDB is tracking both the "real" offset and an "offset minus one" and different parts of the class have to know which one to use and they need to be updated/set in tandem. I want to revisit this at some point. The second change made in looking up eh_frame information; it was formerly done by looking for the start address of the function we are currently executing. But it is possible to have unwind information for a function which only covers a small section of the function's address range. In which case looking up by the start pc value may not find the eh_frame FDE. The hand-written _sigtramp() unwind info on Mac OS X, which covers exactly one instruction in the middle of the function, happens to trigger both of these issues. I still need to get the UnwindPlan runner to handle arbitrary dwarf expressions in the FDE but there's a good chance it will be easy to reuse the DWARFExpression class to do this. llvm-svn: 118882
* Added a thread plan tracer that prints lines ofSean Callanan2010-11-121-0/+205
| | | | | | assembly as well as registers that changed. llvm-svn: 118879
* Temporary extension of the timeout for Objective-CSean Callanan2010-11-121-1/+1
| | | | | | | object diagnostic expressions while we work on the logic for handling the timeout. llvm-svn: 118873
* Removed redundant code for object introspection.Sean Callanan2010-11-124-251/+0
| | | | llvm-svn: 118872
* Excised a version of the low-level function callingSean Callanan2010-11-122-87/+0
| | | | | | | | | logic that supported calling functions with arbitrary arguments. We use ClangFunction for this, and the low-level logic is only required to support one or two pointer arguments. llvm-svn: 118871
* Fixed an issue with Function::GetPrologueByteSize() where if a function's ↵Greg Clayton2010-11-111-1/+10
| | | | | | first line table entry didn't have the same address as the start address of the function itself, we could end up returning and incorrect value. llvm-svn: 118830
* Add ThreadPlanTracer class to allow instruction step tracing of execution.Jim Ingham2010-11-1118-67/+233
| | | | | | Also changed eSetVarTypeBool to eSetVarTypeBoolean to make it consistent with eArgTypeBoolean. llvm-svn: 118824
* Fixed an issue where we might not be able to track down a real definition ofGreg Clayton2010-11-111-0/+1
| | | | | | | a forward declaration to a struct and hangle it gracefully (don't crash trying to ask clang how many children an empty record has). llvm-svn: 118770
* Disable the debug logging I accidentally left enabled.Greg Clayton2010-11-111-1/+1
| | | | llvm-svn: 118758
* Added initial support to the lldb_private::SymbolFile for findingGreg Clayton2010-11-106-111/+207
| | | | | | | | | | | | | | | namespaces by name given an optional symbol context. I might end up dressing up the "clang::NamespaceDecl" into a lldb_private::Namespace class if we need to do more than is currenlty required of namespaces. Currently we only need to be able to lookup a namespace by name when parsing expressions, so I kept it simple for now. The idea here is even though we are passing around a "clang::NamespaceDecl *", that we always have it be an opaque pointer (it is forward declared inside of "lldb/Core/ClangForward.h") and we only use clang::NamespaceDecl implementations inside of ClangASTContext, or ClangASTType when we need to extract information from the namespace decl object. llvm-svn: 118737
* Silence a bunch of clang warnings.Benjamin Kramer2010-11-103-3/+3
| | | | llvm-svn: 118710
* Don't keep appending to the current crash description with each formatted ↵Greg Clayton2010-11-101-0/+1
| | | | | | crash description call. llvm-svn: 118703
* Move the embedded Python interpreter onto a separate thread, to preventCaroline Tice2010-11-102-9/+121
| | | | | | | main thread from having to wait on it (which was causing some I/O hangs). llvm-svn: 118700
* Trivial fix for an error message.Johnny Chen2010-11-101-1/+1
| | | | llvm-svn: 118697
* Remove an obsolete reference to immediate plans.Jim Ingham2010-11-101-1/+1
| | | | llvm-svn: 118691
* Modified lldb_private::SymboleFile to be able to override where its TypeListGreg Clayton2010-11-109-81/+259
| | | | | | | | | | | | | | | | | | | | | | | | | comes from by using a virtual function to provide it from the Module's SymbolVendor by default. This allows the DWARF parser, when being used to parse DWARF in .o files with a parent DWARF + debug map parser, to get its type list from the DWARF + debug map parser so when we go and find full definitions for types (that might come from other .o files), we can use the type list from the debug map parser. Otherwise we ended up mixing clang types from one .o file (say a const pointer to a forward declaration "class A") with the a full type from another .o file. This causes expression parsing, when copying the clang types from those parsed by the DWARF parser into the expression AST, to fail -- for good reason. Now all types are created in the same list. Also added host support for crash description strings that can be set before doing a piece of work. On MacOSX, this ties in with CrashReporter support that allows a string to be dispalyed when the app crashes and allows LLDB.framework to print a description string in the crash log. Right now this is hookup up the the CommandInterpreter::HandleCommand() where each command notes that it is about to be executed, so if we crash while trying to do this command, we should be able to see the command that caused LLDB to exit. For all other platforms, this is a nop. llvm-svn: 118672
* Fixed a bug where the LLVM disassembler wasSean Callanan2010-11-101-1/+1
| | | | | | ignoring the show_address parameter. llvm-svn: 118666
* Did a lot of code cleanup.Greg Clayton2010-11-0910-200/+86
| | | | | | | | Fixed the DWARF plug-in such that when it gets all attributes for a DIE, that it omits the DW_AT_sibling and DW_AT_declaration when getting attributes from a DW_AT_abstract_origin or DW_AT_specification DIE. llvm-svn: 118654
* Added a named container for the source QualTypeSean Callanan2010-11-091-2/+5
| | | | | | | in the type copy routine to make type problems easier to debug. llvm-svn: 118638
* Fixed an issue in the DWARF parser that was causing forward declarationsGreg Clayton2010-11-093-68/+68
| | | | | | | | | | | | to not get resolved. Fixed the "void **isa_ptr" variable inside the objective C verifier to start with a '$' character so we don't go looking for it in our program. Moved the lookup for "$__lldb_class" into the part that knows we are looking for internal types that start with a '$'. llvm-svn: 118488
* Implement RegisterContext::WriteRegisterBytes in RegisterContextLLDB.Jason Molenda2010-11-092-8/+84
| | | | | | | | | | | I only did a tiny bit of testing; in the one case I tried changing the contents of a radar in the middle of a stack and it was still current in the live register context so it filtered down to frame 0 and was handed over to the live register set RegisterContext. I need to test a case where a register is saved on the stack in memory before I check this one off. llvm-svn: 118486
* Refactor UnwindLLDB so it doesn't populate the entire stack unlessJason Molenda2010-11-092-79/+111
| | | | | | | | | | | | | the frame count is requested or each frame is individually requested. In practice this doesn't seem to help anything because we have functions like StackFrameList::GetNumFrames() which is going to request each frame anyway. And classes like ThreadPlanStepRange and ThreadPlanStepOverRange get the stack depth in their ctor forcing a full stack walk. But at least UnwindLLDB will delay doing a full walk if it can. llvm-svn: 118477
* Fix thinko in UnwindTable.cpp where it wouldn't provde a Jason Molenda2010-11-093-9/+10
| | | | | | | | | | FuncUnwinders object if the eh_frame section was missing from an objfile. Worked fine on x86_64 but on i386 where eh_frame is unusual, that resulted in the arch default UnwindPlan being used all the time instead of picking up an assembly profile based unwindplan. llvm-svn: 118467
* Minor comment fix.Johnny Chen2010-11-081-1/+1
| | | | llvm-svn: 118450
* Cleaned up the pseudo terminal code in ProcessGDBRemote as it was spawningGreg Clayton2010-11-083-50/+34
| | | | | | | | | | | | | | a pseudo terminal even when the process being attached to. Fixed a possible crasher in the in: bool ClangASTContext::IsAggregateType (clang_type_t clang_type); It seems that if you pass in a record decl, enum decl, or objc class decl and ask it if it is an aggregate type, clang will crash. llvm-svn: 118404
* Added more logging so we see the register stateSean Callanan2010-11-083-18/+56
| | | | | | | | | when a function starts and ends, and also the disassembly for anything that is a client of ClangExpressionParser after it has been JIT compiled. llvm-svn: 118401
* Fixed an issue where if you try and run something in a TTY that isn'tGreg Clayton2010-11-081-2/+6
| | | | | | | | the same architecture as a default program, the attach architecture auto detection would change the architecture to the architecture of the darwin-debug (which was always x86_64) and hose up your debug session. llvm-svn: 118399
* Fixed some type parsing that was causing types to thing they were forwardGreg Clayton2010-11-081-27/+56
| | | | | | declarations when they should have been. llvm-svn: 118393
* Made variable resolution more robust by handlingSean Callanan2010-11-081-25/+27
| | | | | | | | | every external variable reference in the module, and returning a clean error (instead of letting LLVM issue a fatal error) if the variable could not be resolved. llvm-svn: 118388
* Fixed FileSpec's operator == to deal with equivalent paths such as "/tmp/a.c"Greg Clayton2010-11-082-11/+74
| | | | | | | | | | | | | | and "/private/tmp/a.c". This was done by adding a "mutable bool m_is_resolved;" member to FileSpec and then modifying the equal operator to check if the filenames are equal, and if they are, then check the directories. If they are not equal, then both paths are checked to see if they have been resolved. If they have been resolved, we resolve the paths in temporary FileSpec objects and set each of the m_is_resolved bools to try (for lhs and rhs) if the paths match what is contained in the path. This allows us to do more intelligent compares without having to resolve all paths found in the debug info (which can quickly get costly if the files are on remote NFS mounts). llvm-svn: 118387
OpenPOWER on IntegriCloud