- Sep 02, 2010
-
-
Greg Clayton authored
function statics, file globals and static variables) that a frame contains. The StackFrame objects can give out ValueObjects instances for each variable which allows us to track when a variable changes and doesn't depend on variable names when getting value objects. StackFrame::GetVariableList now takes a boolean to indicate if we want to get the frame compile unit globals and static variables. The value objects in the stack frames can now correctly track when they have been modified. There are a few more tweaks needed to complete this work. The biggest issue is when stepping creates partial stacks (just frame zero usually) and causes previous stack frames not to match up with the current stack frames because the previous frames only has frame zero. We don't really want to require that all previous frames be complete since stepping often must check stack frames to complete their jobs. I will fix this issue tomorrow. llvm-svn: 112800
-
Sean Callanan authored
expressions. If an expression dereferences an invalid pointer, there will still be a crash - just now the crash will be in the function ___clang_valid_pointer_check(). llvm-svn: 112785
-
Jim Ingham authored
llvm-svn: 112782
-
- Sep 01, 2010
-
-
Jim Ingham authored
Stream::Printf doesn't add a newline, so it needs to be added to all the error messages in CommandObjectExpression::EvaluateExpression. llvm-svn: 112731
-
Sean Callanan authored
expressions. Values used by the expression are checked by validation functions which cause the program to crash if the values are unsafe. Major changes: - Added IRDynamicChecks.[ch], which contains the core code related to this feature - Modified CommandObjectExpression to install the validator functions into the target process. - Added an accessor to Process that gets/sets the helper functions llvm-svn: 112690
-
Jim Ingham authored
llvm-svn: 112679
-
- Aug 31, 2010
-
-
Greg Clayton authored
were not needed and fixed a merge issue. llvm-svn: 112626
-
Greg Clayton authored
is disabled by default, and can be enabled using: (lldb) set disable-aslr 0 llvm-svn: 112616
-
Jim Ingham authored
llvm-svn: 112614
-
Jim Ingham authored
llvm-svn: 112558
-
Sean Callanan authored
persistent variables were staying around too long. This caused the following problem: - A persistent result variable is created for the result of an expression. The pointer to the corresponding Decl is stored in the variable. - The persistent variable is looked up during struct generation (correctly) using its Decl. - Another expression defines a new result variable which happens to have a Decl in the same place as the original result variable. - The persistent variable is looked up during struct generation using its Decl, but the old result variable appears first in the list and has the same Decl pointer. The fix is to destroy parser-specific data when it is no longer valid. Also improved some logging as I diagnosed the bug. llvm-svn: 112540
-
Greg Clayton authored
is launched with the -e option on Mac OS X. llvm-svn: 112536
-
- Aug 30, 2010
-
-
Sean Callanan authored
storing pointers to objects inside a std::vector. These objects can move around as the std::vector changes, invalidating the pointers. llvm-svn: 112527
-
Jim Ingham authored
Added a way to open the current source file & line in an external editor, and you can turn this on with: lldb -e llvm-svn: 112502
-
Greg Clayton authored
documentation. Symbol now inherits from the symbol context scope so that the StackID can use a "SymbolContextScope *" instead of a blockID (which could have been the same as some other blockID from another symbol file). Modified the stacks that are created on subsequent stops to reuse the previous stack frame objects which will allow for some internal optimization using pointer comparisons during stepping. llvm-svn: 112495
-
- Aug 28, 2010
-
-
Greg Clayton authored
llvm-svn: 112331
-
Sean Callanan authored
debugger to insert self-contained functions for use by expressions (mainly for error-checking). In order to support detecting whether a crash occurred in one of these helpers -- currently our preferred way of reporting that an error-check failed -- added a bit of support for getting the extent of a JITted function in addition to just its base. llvm-svn: 112324
-
Johnny Chen authored
o Fixed a crasher when getting it via SBTarget.GetExecutable(). >>> filespec = target.GetExecutable() Segmentation fault o And renamed SBFileSpec::GetFileName() to GetFilename() to be consistent with FileSpec::GetFilename(). llvm-svn: 112308
-
- Aug 27, 2010
-
-
Greg Clayton authored
swaps on the variable list, value object list, and disassembly. This avoids us having to try and update frame indexes and other things that were getting out of sync. llvm-svn: 112301
-
Greg Clayton authored
instead of trying to maintain the real frame list (unwind frames) and an inline frame list. The information is cheap to produce when we already have looked up a block and was making stack frame uniquing difficult when trying to use the previous stack when making the current stack. We now maintain the previous value object lists for common frames between a previous and current frames so we will be able to tell when variable values change. llvm-svn: 112277
-
Sean Callanan authored
The goal is to separate the parser's data from the data belonging to the parser's clients. This allows clients to use the parser to obtain (for example) a JIT compiled function or some DWARF code, and then discard the parser state. Previously, parser state was held in ClangExpression and used liberally by ClangFunction, which inherited from ClangExpression. The main effects of this refactoring are: - reducing ClangExpression to an abstract class that declares methods that any client must expose to the expression parser, - moving the code specific to implementing the "expr" command from ClangExpression and CommandObjectExpression into ClangUserExpression, a new class, - moving the common parser interaction code from ClangExpression into ClangExpressionParser, a new class, and - making ClangFunction rely only on ClangExpressionParser and not depend on the internal implementation of ClangExpression. Side effects include: - the compiler interaction code has been factored out of ClangFunction and is now in an AST pass (ASTStructExtractor), - the header file for ClangFunction is now fully documented, - several bugs that only popped up when Clang was deallocated (which never happened, since the lifetime of the compiler was essentially infinite) are now fixed, and - the developer-only "call" command has been disabled. I have tested the expr command and the Objective-C step-into code, which use ClangUserExpression and ClangFunction, respectively, and verified that they work. Please let me know if you encounter bugs or poor documentation. llvm-svn: 112249
-
Jim Ingham authored
bt all show the backtrace for all threads, and: bt 1 3 4 show the backtrace for threads 1, 3 and 4. If we want to come up with some fancier syntax for thread lists later, that will be great, but this will do for now. llvm-svn: 112248
-
Jim Ingham authored
Change the "-S", "-F" and "-M" options to take their arguments directly, rather than requiring the -n option. This means you can't "or" together the types (i.e. set a breakpoint on a method or selector called "whatever". But that is a pretty uncommon operation, and having to provide two flags for the more common "set a breakpoint on this selector" is annoying. llvm-svn: 112245
-
Jim Ingham authored
llvm-svn: 112243
-
Greg Clayton authored
a section offset address. Fixed up some very inefficient STL code. llvm-svn: 112230
-
- Aug 26, 2010
-
-
Jim Ingham authored
Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected. llvm-svn: 112221
-
Jim Ingham authored
llvm-svn: 112217
-
Greg Clayton authored
code stepping. Also we now store the stack frames for the current and previous stops in the thread in std::auto_ptr objects. When we create a thread stack frame list we pass the previous frame into it so it can re-use the frames and maintain will allow for variable changes to be detected. I will implement the stack frame reuse next. llvm-svn: 112152
-
- Aug 25, 2010
-
-
Greg Clayton authored
functionality into StackFrameList. This will allow us to copy the previous stack backtrace from the previous stop into another variable so we can re-use as much as possible from the previous stack backtrace. llvm-svn: 112007
-
Greg Clayton authored
has inlined functions that all started at the same address, then the inlined backtrace would not produce correct stack frames. Also cleaned up and inlined a lot of stuff in lldb_private::Address. Added a function to StackFrame to detect if the frame is a concrete frame so we can detect the difference between actual frames and inlined frames. llvm-svn: 111989
-
- Aug 24, 2010
-
-
Greg Clayton authored
complex inlined examples. StackFrame classes don't have a "GetPC" anymore, they have "GetFrameCodeAddress()". This is because inlined frames will have a PC value that is the same as the concrete frame that owns the inlined frame, yet the code locations for the frame can be different. We also need to be able to get the real PC value for a given frame so that variables evaluate correctly. To get the actual PC value for a frame you can use: addr_t pc = frame->GetRegisterContext()->GetPC(); Some issues with the StackFrame stomping on its own symbol context were resolved which were causing the information to change for a frame when the stack ID was calculated. Also the StackFrame will now correctly store the symbol context resolve flags for any extra bits of information that were looked up (if you ask for a block only and you find one, you will alwasy have the compile unit and function). llvm-svn: 111964
-
Greg Clayton authored
which is now on by default. Frames are gotten from the unwinder as concrete frames, then if inline frames are to be shown, extra information to track and reconstruct these frames is cached with each Thread and exanded as needed. I added an inline height as part of the lldb_private::StackID class, the class that helps us uniquely identify stack frames. This allows for two frames to shared the same call frame address, yet differ only in inline height. Fixed setting breakpoint by address to not require addresses to resolve. A quick example: % cat main.cpp % ./build/Debug/lldb test/stl/a.out Current executable set to 'test/stl/a.out' (x86_64). (lldb) breakpoint set --address 0x0000000100000d31 Breakpoint created: 1: address = 0x0000000100000d31, locations = 1 (lldb) r Launching 'a.out' (x86_64) (lldb) Process 38031 Stopped * thread #1: tid = 0x2e03, pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280, stop reason = breakpoint 1.1, queue = com.apple.main-thread 277 278 _CharT* 279 _M_data() const 280 -> { return _M_dataplus._M_p; } 281 282 _CharT* 283 _M_data(_CharT* __p) (lldb) bt thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread frame #0: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280 frame #1: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_rep() const at /usr/include/c++/4.2.1/bits/basic_string.h:288 frame #2: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::size() const at /usr/include/c++/4.2.1/bits/basic_string.h:606 frame #3: pc = 0x0000000100000d31, where = a.out`main [inlined] operator<< <char, std::char_traits<char>, std::allocator<char> > at /usr/include/c++/4.2.1/bits/basic_string.h:2414 frame #4: pc = 0x0000000100000d31, where = a.out`main + 33 at /Volumes/work/gclayton/Documents/src/lldb/test/stl/main.cpp:14 frame #5: pc = 0x0000000100000d08, where = a.out`start + 52 Each inline frame contains only the variables that they contain and each inlined stack frame is treated as a single entity. llvm-svn: 111877
-
Sean Callanan authored
ClangExpressionVariables for found external variables as well as for struct members, replacing the Tuple and StructMember data structures. llvm-svn: 111859
-
- Aug 23, 2010
-
-
Johnny Chen authored
thread name but the static map instance had already been destructed. rdar://problem/8153284 llvm-svn: 111812
-
- Aug 21, 2010
-
-
Greg Clayton authored
to spawn a thread for each process that is being monitored. Previously LLDB would spawn a single thread that would wait for any child process which isn't ok to do as a shared library (LLDB.framework on Mac OSX, or lldb.so on linux). The old single thread used to call wait4() with a pid of -1 which could cause it to reap child processes that it shouldn't have. Re-wrote the way Function blocks are handles. Previously I attempted to keep all blocks in a single memory allocation (in a std::vector). This made the code somewhat efficient, but hard to work with. I got rid of the old BlockList class, and went to a straight parent with children relationship. This new approach will allow for partial parsing of the blocks within a function. llvm-svn: 111706
-
- Aug 20, 2010
-
-
Jim Ingham authored
Added "source list -n" so you can list by symbol name. Moved "--count" from "-n" to "-c". Added a -s option so you can restrict the source listing to a particular shared library. llvm-svn: 111608
-
Jim Ingham authored
llvm-svn: 111607
-
Jim Ingham authored
Add methods to Function to get the first and last source lines of the function, and to get whether this Function is an inlined instance or not. llvm-svn: 111606
-
Jim Ingham authored
Remove redundant call to ParseCompileUnitLineTable. The call to sc.comp_unit->GetLineTable() will parse the line table if it hasn't been read in. llvm-svn: 111605
-
Sean Callanan authored
expression parser. There shouldn't be four separate classes encapsulating a variable. ClangExpressionVariable is now meant to be the container for all variable information. It has several optional components that hold data for different subsystems. ClangPersistentVariable has been removed; we now use ClangExpressionVariable instead. llvm-svn: 111600
-