- Nov 21, 2011
-
-
Peter Collingbourne authored
llvm-svn: 145020
-
- Nov 19, 2011
-
-
Greg Clayton authored
1 - the DIE collections no longer have the NULL tags which saves up to 25% of the memory on typical C++ code 2 - faster parsing by not having to run the SetDIERelations() function anymore it is done when parsing the DWARF very efficiently. llvm-svn: 144983
-
Jim Ingham authored
Handle stepping through a trampoline where the jump target is calculated a runtime - and so doesn't match the name of the PLT entry. This solution assumes a naming convention agreed upon by us and the system folks, and isn't general. The general solution requires actually finding & calling the resolver function if it hasn't been called yet. That's more tricky. llvm-svn: 144981
-
- Nov 18, 2011
-
-
Greg Clayton authored
from a process and hooked it up to the new packet that was recently added to our GDB remote executable named debugserver. Now Process has the following new calls: virtual Error Process::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info); virtual uint32_t GetLoadAddressPermissions (lldb::addr_t load_addr); Only the first one needs to be implemented by subclasses that can add this support. Cleaned up the way the new packet was implemented in debugserver to be more useful as an API inside debugserver. Also found an error where finding a region for an address actually will pick up the next region that follows the address in the query so we also need ot make sure that the address we requested the region for falls into the region that gets returned. llvm-svn: 144976
-
Greg Clayton authored
we say that the vectors of DWARFDebugInfoEntry objects were the highest on the the list. With these changes we cut our memory usage by 40%!!! I did this by reducing the size of the DWARFDebugInfoEntry from a previous: uint32_t offset uint32_t parent_idx uint32_t sibling_idx Abbrev * abbrev_ptr which was 20 bytes, but rounded up to 24 bytes due to alignment. Now we have: uint32_t offset uint32_t parent_idx uint32_t sibling_idx uint32_t abbr_idx:15, // 32767 possible abbreviation codes has_children:1, // 0 = no children, 1 = has children tag:16; // DW_TAG_XXX value This gets us down to 16 bytes per DIE. I tested some VERY large DWARF files (900MB) and found there were only ~700 unique abbreviations, so 32767 should be enough for any sane compiler. If it isn't there are built in assertions that will fire off and tell us. llvm-svn: 144975
-
- Nov 17, 2011
-
-
Greg Clayton authored
file actions have been specified. llvm-svn: 144922
-
Greg Clayton authored
turned out to be unitialized data in the ProcessLaunchInfo default constructor. Turning on MallocScribble in the environment helped track this down. When we launch and attach using the host layer, we now inform the process that it shouldn't detach when by calling an accessor. llvm-svn: 144882
-
- Nov 16, 2011
-
-
Greg Clayton authored
After recent changes we weren't reaping child processes resulting in many zombie processes. This was fixed by adding more settings to the ProcessLaunchOptions class that allow clients to specify a callback function and baton to be notified when their process dies. If one is not supplied a default callback will be used that "does the right thing". Cleaned up a race condition in the ProcessGDBRemote class that would attempt to monitor when debugserver died. Added an extra boolean to the process monitor callbacks that indicate if a process exited or not. If your process exited with a zero exit status and no signal, both items could be zero. Modified the process monitor functions to not require a callback function in order to reap the child process. llvm-svn: 144780
-
- Nov 15, 2011
-
-
Greg Clayton authored
info for us to attach by pid, or by name and will also allow us to eventually do a lot more powerful attaches. If you look at the options for the "platform process list" command, there are many options which we should be able to specify. This will allow us to do things like "attach to a process named 'tcsh' that has a parent process ID of 123", or "attach to a process named 'x' which has an effective user ID of 345". I finished up the --shell implementation so that it can be used without the --tty option in "process launch". The "--shell" option now can take an optional argument which is the path to the shell to use (or a partial name like "sh" which we will find using the current PATH environment variable). Modified the Process::Attach to use the new ProcessAttachInfo as the sole argument and centralized a lot of code that was in the "process attach" Execute function so that everyone can take advantage of the powerful new attach functionality. llvm-svn: 144615
-
- Nov 13, 2011
-
-
rdar://problem/10103980Greg Clayton authored
A long time ago we started to centralized the STDOUT in lldb_private::Process but we missed a few things still in ProcessGDBRemote. llvm-svn: 144491
-
rdar://problem/10338439Greg Clayton authored
This is the actual fix for the above radar where global variables that weren't initialized were not being shown correctly when leaving the DWARF in the .o files. Global variables that aren't intialized have symbols in the .o files that specify they are undefined and external to the .o file, yet document the size of the variable. This allows the compiler to emit a single copy, but makes it harder for our DWARF in .o files with the executable having a debug map because the symbol for the global in the .o file doesn't exist in a section that we can assign a fixed up linked address to, and also the DWARF contains an invalid address in the "DW_OP_addr" location (always zero). This means that the DWARF is incorrect and actually maps all such global varaibles to the first file address in the .o file which is usually the first function. So we can fix this in either of two ways: make a new fake section in the .o file so that we have a file address in the .o file that we can relink, or fix the the variable as it is created in the .o file DWARF parser and actually give it the file address from the executable. Each variable contains a SymbolContextScope, or a single pointer that helps us to recreate where the variables came from (which module, file, function, etc). This context helps us to resolve any file addresses that might be in the location description of the variable by pointing us to which file the file address comes from, so we can just replace the SymbolContextScope and also fix up the location, which we would have had to do for the other case as well, and update the file address. Now globals display correctly. The above changes made it possible to determine if a variable is a global or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag for each variable (local, global, or static), yet DWARF provides no way for us to classify these variables into these categories. We can now detect when a variable has a simple address expressions as its location and this will help us classify these correctly. While making the above changes I also noticed that we had two symbol types: eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same thing: the symbol is not defined in the current object file. Symbol objects also have a bit that specifies if a symbol is externally visible, so I got rid of the eSymbolTypeExtern symbol type and moved all code locations that used it to use the eSymbolTypeUndefined type. llvm-svn: 144489
-
- Nov 12, 2011
-
-
Greg Clayton authored
the --tty option. So you can now get shell expansion and file redirection: (lldb) process launch --tty --shell -- *.jpg < in.txt > out.txt Again, the "--tty" is mandatory for now until we hook this up to other functions. The shell is also currently hard coded to "/bin/bash" and not the "SHELL" variable. "/bin/tcsh" was causing problems which I need to dig into. llvm-svn: 144443
-
Jim Ingham authored
llvm-svn: 144440
-
- Nov 11, 2011
-
-
Greg Clayton authored
invalid information. This will help us perfect the tables that are emitted by clang. llvm-svn: 144359
-
- Nov 10, 2011
-
-
Greg Clayton authored
string to avoid possible later crashes. Modified the locations that do set the crash description to NULL out the string when they are done doing their tasks. llvm-svn: 144297
-
rdar://problem/10338439Greg Clayton authored
Fixed an issue where if you had an initialized global variable, we would not link it up correctly in the debug info if the .o file had the symbols as UNDF + EXT (undefined external). We now properly link the globals. llvm-svn: 144259
-
- Nov 05, 2011
-
-
Greg Clayton authored
Joel Dillon that fixed 64 debugging for Linux. I also added a patch to fix up the ProcessLinux::DoLaunch() to be up to date. I wasn't able to verify it compiles, but it should b really close. llvm-svn: 143772
-
- Nov 04, 2011
-
-
Greg Clayton authored
- If you download and build the sources in the Xcode project, x86_64 builds by default using the "llvm.zip" checkpointed LLVM. - If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the Xcode project will download the right LLVM sources and build them from scratch - If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib" directory, we will use the sources you have placed in the LLDB directory. Python can now be disabled for platforms that don't support it. Changed the way the libllvmclang.a files get used. They now all get built into arch specific directories and never get merged into universal binaries as this was causing issues where you would have to go and delete the file if you wanted to build an extra architecture slice. llvm-svn: 143678
-
- Nov 03, 2011
-
-
Greg Clayton authored
on internal only (public API hasn't changed) to simplify the paramter list to the launch calls down into just one argument. Also all of the argument, envronment and stdio things are now handled in a much more centralized fashion. llvm-svn: 143656
-
- Nov 02, 2011
-
-
Sean Callanan authored
generated special member functions (constructors, destructors, etc.) for classes that don't really have them. We needed to mark these as artificial to reflect the debug information; this bug does that for constructors and destructors. The "etc." case (certain assignment operators, mostly) remains to be fixed. llvm-svn: 143526
-
- Nov 01, 2011
-
-
Sean Callanan authored
method as __attribute__ ((used)) when adding it to a class. This functionality is useful when stopped in anonymous namespaces: expressions attached to classes in anonymous namespaces are typically elided by Clang's CodeGen because they have no namespaces are intended not to be externally visible. __attribute__ ((used)) forces CodeGen to emit the function. Right now, __attribute__ ((used)) causes the JIT not to emit the function, so we're not enabling it until we fix that. llvm-svn: 143469
-
Jason Molenda authored
RegisterContextLLDBs it contains. Previously RegisterContextLLDB objects had a pointer to their "next" frame down the stack. e.g. stack starts at frame 0; frame 3 has a pointer to frame 2. This is used to retreive callee saved register values. When debugging an inferior that has blown out its own stack, however, this could result in lldb blowing out its own stack while recursing down to retrieve register values. RegisterContextLLDB no longer has a pointer to its next frame; it has a reference to the UnwindLLDB which contains it. When it needs to retrieve a reg value, it asks the UnwindLLDB for that reg value and UnwindLLDB iterates through the frames until it finds a location. llvm-svn: 143423
-
Jim Ingham authored
"object borked"... Also made the error when the checker fails reflect this fact rather than report a crash at 0x0. Also a little cleanup: - StopInfoMachException had a redundant copy of the description string. - ThreadPlanCallFunction had a redundant copy of the thread, and had a copy of the process that it didn't really need. llvm-svn: 143419
-
Greg Clayton authored
settings. Also fixed an issue where we weren't creating anonymous namepaces correctly: <rdar://problem/10371295> llvm-svn: 143403
-
Daniel Dunbar authored
llvm-svn: 143398
-
Daniel Dunbar authored
llvm-svn: 143397
-
- Oct 31, 2011
-
-
Daniel Dunbar authored
llvm-svn: 143389
-
Daniel Dunbar authored
llvm-svn: 143388
-
Daniel Dunbar authored
llvm-svn: 143387
-
Daniel Dunbar authored
llvm-svn: 143381
-
Daniel Dunbar authored
llvm-svn: 143380
-
Daniel Dunbar authored
llvm-svn: 143376
-
Daniel Dunbar authored
llvm-svn: 143375
-
rdar://problem/10368163Greg Clayton authored
Fixed an issue where if a mach-o symbol table was corrupt and had a string table offset that is invalid, we could crash. We now properly check the string table offset and ignore any symbols with invalid strings. llvm-svn: 143362
-
- Oct 29, 2011
-
-
Jim Ingham authored
when setting breakpoints, but only if no module is specified. The Darwin platform uses this to not set breakpoints in dyld. llvm-svn: 143249
-
- Oct 28, 2011
-
-
Greg Clayton authored
llvm-svn: 143225
-
Jim Ingham authored
debugserver being responsive to shut down. llvm-svn: 143174
-
Sean Callanan authored
InstructionLLVM class dropped its instruction handle on the floor instead of releasing it correctly. llvm-svn: 143156
-
rdar://problem/10357230Greg Clayton authored
Fixed an issue where async packets were incurring a delay even though they were sent correctly. We now properly broadcast the private run state being resumed correctly. Also fixed logging to reflect what is happening. llvm-svn: 143154
-
- Oct 27, 2011
-
-
Greg Clayton authored
in the same hashed format as the ".apple_names", but they map objective C class names to all of the methods and class functions. We need to do this because in the DWARF the methods for Objective C are never contained in the class definition, they are scattered about at the translation unit level and they don't even have attributes that say the are contained within the class itself. Added 3 new formats which can be used to display data: eFormatAddressInfo eFormatHexFloat eFormatInstruction eFormatAddressInfo describes an address such as function+offset and file+line, or symbol + offset, or constant data (c string, 2, 4, 8, or 16 byte constants). The format character for this is "A", the long format is "address". eFormatHexFloat will print out the hex float format that compilers tend to use. The format character for this is "X", the long format is "hex float". eFormatInstruction will print out disassembly with bytes and it will use the current target's architecture. The format character for this is "i" (which used to be being used for the integer format, but the integer format also has "d", so we gave the "i" format to disassembly), the long format is "instruction". Mate the lldb::FormatterChoiceCriterion enumeration private as it should have been from the start. It is very specialized and doesn't belong in the public API. llvm-svn: 143114
-