- Jan 18, 2011
-
-
Jim Ingham authored
llvm-svn: 123784
-
Greg Clayton authored
Use generic CPU types instead of hard coding to mach-o when getting default byte order (patch from Stephen Wilson). llvm-svn: 123781
-
Greg Clayton authored
llvm-svn: 123780
-
Greg Clayton authored
llvm-svn: 123779
-
Greg Clayton authored
I added support for asking if the GDB remote server supports thread suffixes for packets that should be thread specific (register read/write packets) because the way the GDB remote protocol does it right now is to have a notion of a current thread for register and memory reads/writes (set via the "$Hg%x" packet) and a current thread for running ("$Hc%x"). Now we ask the remote GDB server if it supports adding the thread ID to the register packets and we enable that feature in LLDB if supported. This stops us from having to send a bunch of packets that update the current thread ID to some value which is prone to error, or extra packets. llvm-svn: 123762
-
Jim Ingham authored
In ThreadPlanCallFunction, do the Takedown right when the thread plan gets popped. When the function call is discarded (e.g. when it crashes and discard_on_error is true) the plan gets discarded. You need to make sure that the stack gets restored right then, and not wait till you start again and the thread plan stack is cleared. llvm-svn: 123716
-
Sean Callanan authored
and Enums inside classes. llvm-svn: 123710
-
Sean Callanan authored
Apple's Objective-C 2.0 runtime. They are enabled if the Objective-C runtime has the proper version. llvm-svn: 123694
-
Jim Ingham authored
llvm-svn: 123693
-
- Jan 17, 2011
-
-
Caroline Tice authored
allowing timeouts & informing the user when the lock is unavailable. Fixed problem where Debugger::Terminate was clearing the debugger list even when the global ref count was greater than zero. llvm-svn: 123674
-
Greg Clayton authored
bool RegisterContextLLDB::GetPC (addr_t& pc); to: bool RegisterContextLLDB::ReadPC (addr_t& pc); To avoid confusion with the GetPC() function that is part of the lldb_private::RegisterContext: uint64_t RegisterContext::GetPC (uint64_t fail_value); Bad things could happen if the two got intermixed and the wrong one got called. Fixed inifinite loop detection by watching for two frames where the RegisterContextLLDB::CursorSP contains the same start_pc and cfa. llvm-svn: 123673
-
Greg Clayton authored
Removed commented out code since it was incorrect code to begin with and we don't want anyone thinking they should put it back in. llvm-svn: 123672
-
Sean Callanan authored
we were setting a forward-declared Objective-C class type as being completed using an ExternalSemaSource, but this is neither legal nor necessary. llvm-svn: 123671
-
Greg Clayton authored
llvm-svn: 123617
-
Greg Clayton authored
long strings in "char *" (with any combo if qualifiers). llvm-svn: 123616
-
Greg Clayton authored
V2 and we only have gdb_class_getClass, then make sure the isa isn't NULL before trying to call gdb_class_getClass otherwise we end up deadlocking the objective C runtime. llvm-svn: 123615
-
Greg Clayton authored
llvm-svn: 123614
-
Greg Clayton authored
the way LLDB lazily gets complete definitions for types within the debug info. When we run across a class/struct/union definition in the DWARF, we will only parse the full definition if we need to. This works fine for top level types that are assigned directly to variables and arguments, but when we have a variable with a class, lets say "A" for this example, that has a member: "B *m_b". Initially we don't need to hunt down a definition for this class unless we are ever asked to do something with it ("expr m_b->getDecl()" for example). With my previous approach to lazy type completion, we would be able to take a "A *a" and get a complete type for it, but we wouldn't be able to then do an "a->m_b->getDecl()" unless we always expanded all types within a class prior to handing out the type. Expanding everything is very costly and it would be great if there were a better way. A few months ago I worked with the llvm/clang folks to have the ExternalASTSource class be able to complete classes if there weren't completed yet: class ExternalASTSource { .... virtual void CompleteType (clang::TagDecl *Tag); virtual void CompleteType (clang::ObjCInterfaceDecl *Class); }; This was great, because we can now have the class that is producing the AST (SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources and the object that creates the forward declaration types can now also complete them anywhere within the clang type system. This patch makes a few major changes: - lldb_private::Module classes now own the AST context. Previously the TypeList objects did. - The DWARF parsers now sign up as an external AST sources so they can complete types. - All of the pure clang type system wrapper code we have in LLDB (ClangASTContext, ClangASTType, and more) can now be iterating through children of any type, and if a class/union/struct type (clang::RecordType or ObjC interface) is found that is incomplete, we can ask the AST to get the definition. - The SymbolFileDWARFDebugMap class now will create and use a single AST that all child SymbolFileDWARF classes will share (much like what happens when we have a complete linked DWARF for an executable). We will need to modify some of the ClangUserExpression code to take more advantage of this completion ability in the near future. Meanwhile we should be better off now that we can be accessing any children of variables through pointers and always be able to resolve the clang type if needed. llvm-svn: 123613
-
- Jan 16, 2011
-
-
Stephen Wilson authored
This patch is enough to have shared objects recognized by LLDB. We can handle position independent executables. We can handle dynamically loaded modules brought in via dlopen. The DYLDRendezvous class provides an interface to a structure present in the address space of ELF-based processes. This structure provides the address of a function which is called by the linker each time a shared object is loaded and unloaded (thus a breakpoint at that address will let LLDB intercept such events), a list of entries describing the currently loaded shared objects, plus a few other things. On Linux, processes are brought up with an auxiliary vector on the stack. One element in this vector contains the (possibly dynamic) entry address of the process. One does not need to walk the stack to find this information as it is also available under /proc/<pid>/auxv. The new AuxVector class provides a convenient read-only view of this auxiliary vector information. We use the dynamic entry address and the address as specified in the object file to compute the actual load address of the inferior image. This strategy works for both normal executables and PIE's. llvm-svn: 123592
-
Stephen Wilson authored
llvm-svn: 123583
-
- Jan 15, 2011
-
-
Greg Clayton authored
llvm-svn: 123509
-
Greg Clayton authored
stuff soon when we get a fix for looking up the "OBJC_IVAR_$_Class.ivar" style symbols into IRForTarget::ResolveExternals() next week. llvm-svn: 123507
-
Stephen Wilson authored
This patch simply allows the tree to build. A proper implementation still needs to be provided. llvm-svn: 123504
-
Stephen Wilson authored
llvm-svn: 123503
-
Stephen Wilson authored
Propagate the environment if one is not provided. Also, do not allocate the monitor threads launch arguments on the stack. llvm-svn: 123502
-
Stephen Wilson authored
llvm-svn: 123500
-
Stephen Wilson authored
llvm-svn: 123499
-
Stephen Wilson authored
The previous check on header type ET_EXEC is not general enough. Position independent executables have type ET_DYN. llvm-svn: 123498
-
Stephen Wilson authored
llvm-svn: 123496
-
Stephen Wilson authored
llvm-svn: 123495
-
- Jan 14, 2011
-
-
Caroline Tice authored
when handling one-liner commands that contain escaped characters. In order to deal with the new namespace/dictionary stuff, the command was being embedded within a second string, which messed up the escaping. This fixes the problem by handling one-liners in a different manner, so they no longer need to be embedded within another string, and can still be processed in the proper namespace/dictionary context. llvm-svn: 123467
-
Stephen Wilson authored
Setting m_private_state_thread to an invalid value when the child thread exits results in a race condition between calls to ThreadCancel and ThreadJoin. llvm-svn: 123465
-
Stephen Wilson authored
llvm-svn: 123464
-
Greg Clayton authored
llvm-svn: 123455
-
Greg Clayton authored
Anytime we had a valid python list that was trying to go from Python down into our C++ API, it was allocating too little memory and it ended up smashing whatever was next to the allocated memory. Added typemap conversions for "void *, size_t" so we can get SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t" so we can get SBProcess::WriteMemory() to work. Fixed an issue in the DWARF parser where we weren't correctly calculating the DeclContext for all types and classes. We now should be a lot more accurate. Fixes include: enums should now be setting their parent decl context correctly. We saw a lot of examples where enums in classes were not being properly namespace scoped. Also, classes within classes now get properly scoped. Fixed the objective C runtime pointer checkers to let "nil" pointers through since these are accepted by compiled code. We also now don't call "abort()" when a pointer doesn't validate correctly since this was wreaking havoc on the process due to the way abort() works. We now just dereference memory which should give us an exception from which we can easily and reliably recover. llvm-svn: 123428
-
Caroline Tice authored
exist within the same process (one script interpreter object per debugger object). The python script interpreter objects are all using the same global Python script interpreter; they use separate dictionaries to keep their data separate, and mutex's to prevent any object attempting to use the global Python interpreter when another object is already using it. llvm-svn: 123415
-
- Jan 13, 2011
-
-
Sean Callanan authored
variables. llvm-svn: 123398
-
Sean Callanan authored
by LLDB. Instead of being materialized into the input structure passed to the expression, variables are left in place and pointers to them are materialzied into the structure. Variables not resident in memory (notably, registers) get temporary memory regions allocated for them. Persistent variables are the most complex part of this, because they are made in various ways and there are different expectations about their lifetime. Persistent variables now have flags indicating their status and what the expectations for longevity are. They can be marked as residing in target memory permanently -- this is the default for result variables from expressions entered on the command line and for explicitly declared persistent variables (but more on that below). Other result variables have their memory freed. Some major improvements resulting from this include being able to properly take the address of variables, better and cleaner support for functions that return references, and cleaner C++ support in general. One problem that remains is the problem of explicitly declared persistent variables; I have not yet implemented the code that makes references to them into indirect references, so currently materialization and dematerialization of these variables is broken. llvm-svn: 123371
-
Greg Clayton authored
llvm-svn: 123357
-
Greg Clayton authored
Call SetFile instead of constructing a temp object and assigning to g_program_filespec for Free BSD port. llvm-svn: 123356
-