- Jul 19, 2011
-
-
Enrico Granata authored
Code cleanup: - The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...) are contained. The wrapper code always remains in Debugger.{h|cpp} - Several leftover fields, methods and comments from previous design choices have been removed type category subcommands (enable, disable, delete) now can take a list of category names as input - for type category enable, saying "enable A B C" is the same as saying enable C enable B enable A (the ordering is relevant in enabling categories, and it is expected that a user typing enable A B C wants to look into category A, then into B, then into C and not the other way round) - for the other two commands, the order is not really relevant (however, the same inverted ordering is used for consistency) llvm-svn: 135494
-
- Jul 17, 2011
-
-
Greg Clayton authored
method so process plug-ins that are requested by name can answer yes when asked if they can debug a target that might not have any file in the target. Modified the ConnectionFileDescriptor to have both a read and a write file descriptor. This allows us to support UDP, and eventually will allow us to support pipes. The ConnectionFileDescriptor class also has a file descriptor type for each of the read and write file decriptors so we can use the correct read/recv/recvfrom call when reading, or write/send/sendto for writing. Finished up an initial implementation of UDP where you can use the "udp://" URL to specify a host and port to connect to: (lldb) process connect --plugin kdp-remote udp://host:41139 This will cause a ConnectionFileDescriptor to be created that can send UDP packets to "host:41139", and it will also bind to a localhost port that can be given out to receive the connectionless UDP reply. Added the ability to get to the IPv4/IPv6 socket port number from a ConnectionFileDescriptor instance if either file descriptor is a socket. The ProcessKDP can now successfully connect to a remote kernel and detach using the above "processs connect" command!!! So far we have the following packets working: KDP_CONNECT KDP_DISCONNECT KDP_HOSTINFO KDP_VERSION KDP_REATTACH Now that the packets are working, adding new packets will go very quickly. llvm-svn: 135363
-
- Jul 12, 2011
-
-
Greg Clayton authored
by name by adding an extra parameter to the lldb_private::Target breakpoint setting functions. Added a function in the DWARF symbol file plug-in that can dump errors and prints out which DWARF file the error is happening in so we can track down what used to be assertions easily. Fixed the MacOSX kernel plug-in to properly read the kext images and set the kext breakpoint to watch for kexts as they are loaded. llvm-svn: 134990
-
- Jul 11, 2011
-
-
Greg Clayton authored
with the "target modules lookup --address <addr>" command. The variable ID's, names, types, location for the address, and declaration is displayed. This can really help with crash logs since we get, on MacOSX at least, the registers for the thread that crashed so it is often possible to figure out some of the variable contents. llvm-svn: 134886
-
- Jul 09, 2011
-
-
Greg Clayton authored
llvm-svn: 134826
-
Jim Ingham authored
llvm-svn: 134780
-
- Jul 08, 2011
-
-
Greg Clayton authored
be detected yet, but most of the initial code is there and needs to be debugged more. llvm-svn: 134672
-
- Jul 07, 2011
-
-
Greg Clayton authored
variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
-
- Jul 06, 2011
-
-
Greg Clayton authored
instructions if they are conditional. Also fixed issues where the PC wasn't getting bit zero stripped for ARM targets when a stack frame was thumb. We now properly call through the GetOpcodeLoadAddress() functions to make sure the addresses are properly stripped for any targets that may decorate up their addresses. We now don't pass the SIGSTOP signals along. We can revisit this soon, but currently this was interfering with debugging some older ARM targets that don't have vCont support in the GDB server. llvm-svn: 134461
-
Enrico Granata authored
- ${*expr} now simply means to dereference expr before actually using it - bitfields, array ranges and pointer ranges now work in a (hopefully) more natural and language-compliant way a new class TypeHierarchyNavigator replicates the behavior of the FormatManager in going through type hierarchies when one-lining summary strings, children's summaries can be used as well as values llvm-svn: 134458
-
- Jun 29, 2011
-
-
Jim Ingham authored
looking up what we needed by address, which is much faster. llvm-svn: 134090
-
- Jun 25, 2011
-
-
Jim Ingham authored
llvm-svn: 133831
-
- Jun 22, 2011
-
-
Jim Ingham authored
llvm-svn: 133647
-
Jim Ingham authored
Reverting switch to the AsyncOutputStream for the Thread Trace Logger. This change caused the logger to crash. Presumably we're printing at a time the debugger isn't ready to print. llvm-svn: 133629
-
Greg Clayton authored
process entry point. llvm-svn: 133598
-
Greg Clayton authored
contained the current line marker. This is now an option which is not enabled for the API disassembly call. llvm-svn: 133597
-
- Jun 20, 2011
-
-
Jim Ingham authored
Use the dyld_mode, image_infos & image_infos_count passed into the shared library notification function to update libraries rather than reading the whole all_imaage_infos structure every time we get notified. llvm-svn: 133448
-
- Jun 18, 2011
-
-
Greg Clayton authored
issue in the way block variables are marked as parsed. In the DWARF parser we always parse all blocks for a function at once, so we can mark all blocks as having all variables parsed and avoid recursive function calls to try and reparse things that have already been handled. Fixed an issue with how variables get scoped into blocks. The DWARF parser can now handle abtract class definitions that contain concrete static variables. When the concrete instance of the class functions get instantiated, they will track down the concrete block for the abtract block and add the variable to each block. llvm-svn: 133302
-
- Jun 17, 2011
-
-
Greg Clayton authored
libraries and headers exist. This can be specified using the platform select function: platform select --sysroot /Volumes/remote-root remote-macosx Each platform subclass is free to interpret the sysroot as needed. Expose the new SDK root directory through the SBDebugger class. Fixed an issue with the GDB remote protocol where unimplemented packets were not being handled correctly. llvm-svn: 133231
-
- Jun 15, 2011
-
-
Caroline Tice authored
Replace direct uses of the Debugger's output stream with uses of the asynchronous stream. llvm-svn: 133076
-
- Jun 04, 2011
-
-
Greg Clayton authored
cleaned up all base classes that had their own copy. Added a SetDescription accessor to the StopInfo class. llvm-svn: 132615
-
Greg Clayton authored
the thread we were running on (other thread crashed or had exceptional stop reason). llvm-svn: 132599
-
- Jun 03, 2011
-
-
Peter Collingbourne authored
llvm-svn: 132588
-
Peter Collingbourne authored
llvm-svn: 132586
-
Jim Ingham authored
Added Debugger::GetAsync{Output/Error}Stream, and use it to print parse errors when we go to run a breakpoint condition. llvm-svn: 132517
-
- Jun 02, 2011
-
-
Jim Ingham authored
llvm-svn: 132440
-
- May 30, 2011
-
-
Greg Clayton authored
they don't update correctly. Currently if a variable is unavailable due to a register not being available in a higher frame or due to the PC value not being a valid location list value, "<unknown type>" will get displayed as the variable type. I am not sure what other things will fail, so I am disabling it for now just by letting the default enumeration value default to it being disabled. llvm-svn: 132303
-
- May 23, 2011
-
-
Greg Clayton authored
of duplicated code from appearing all over LLDB: lldb::addr_t Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error); bool Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error); size_t Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error); size_t Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error); in lldb_private::Process the following functions were renamed: From: uint64_t Process::ReadUnsignedInteger (lldb::addr_t load_addr, size_t byte_size, Error &error); To: uint64_t Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr, size_t byte_size, uint64_t fail_value, Error &error); Cleaned up a lot of code that was manually doing what the above functions do to use the functions listed above. Added the ability to get a scalar value as a buffer that can be written down to a process (byte swapping the Scalar value if needed): uint32_t Scalar::GetAsMemoryData (void *dst, uint32_t dst_len, lldb::ByteOrder dst_byte_order, Error &error) const; The "dst_len" can be smaller that the size of the scalar and the least significant bytes will be written. "dst_len" can also be larger and the most significant bytes will be padded with zeroes. Centralized the code that adds or removes address bits for callable and opcode addresses into lldb_private::Target: lldb::addr_t Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; lldb::addr_t Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; All necessary lldb_private::Address functions now use the target versions so changes should only need to happen in one place if anything needs updating. Fixed up a lot of places that were calling : addr_t Address::GetLoadAddress(Target*); to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress() as needed. There were many places in the breakpoint code where things could go wrong for ARM if these weren't used. llvm-svn: 131878
-
- May 22, 2011
-
-
Jim Ingham authored
action the second time the event is removed (the first is the internal -> external transition, the second when it is pulled off the public event queue, and further times when it is put back because we are faking a stop reason to hide the expression evaluation stops. llvm-svn: 131869
-
- May 19, 2011
-
-
Greg Clayton authored
StoppointLocation.h. Added a new lldb_private::Address function: addr_t Address::GetOpcodeLoadAddress (Target *target) const; This will strip any special bits from an address to make sure it is suitable for use in addressing an opcode. Often ARM addresses have an extra bit zero that can be set to indicate ARM vs Thumb addresses (gotten from return address registers, or symbol addresses that may be marked up specially). We need to strip these bits off prior to setting breakpoints, so we can centralized the place to do this inside the Address class. llvm-svn: 131658
-
Peter Collingbourne authored
llvm-svn: 131647
-
Greg Clayton authored
Fixed ThreadPlanCallFunction::ReportRegisterState(...) to only dump when verbose logging is enabled and fixed the function to use the new RegisterValue method of reading registers. Fixed the GDB remote client to not send a continue packet after receiving stdout or stderr from the inferior process. llvm-svn: 131628
-
- May 18, 2011
-
-
Greg Clayton authored
bool SectionLoadList::ResolveLoadAddress (addr_t load_addr, Address &so_addr) const; Where if the address is in the last map entry, we need to look it up correctly. My previous fix was incorrect where it looked in the first if there were no addresses in the map that were > load_addr. Now we correctly look in the last entry if our std::map::lower_bound search returns the end of the collection. llvm-svn: 131550
-
Greg Clayton authored
bool Address::SetLoadAddress (lldb::addr_t load_addr, Target *target); Added an == and != operator to RegisterValue. Modified the ThreadPlanTracer to use RegisterValue objects to store the register values when single stepping. Also modified the output to be a bit less wide. Fixed the ABIMacOSX_arm to not overwrite stuff on the stack. Also made the trivial function call be able to set the ARM/Thumbness of the target correctly, and also sets the return value ARM/Thumbness. Fixed the encoding on the arm s0-s31 and d16 - d31 registers when the default register set from a standard GDB server register sets. llvm-svn: 131517
-
Jim Ingham authored
and then reset it to the original value when done. llvm-svn: 131498
-
- May 17, 2011
-
-
Greg Clayton authored
loaded section in the section load list. llvm-svn: 131472
-
Greg Clayton authored
over when running JITed expressions. The allocated memory cache will cache allocate memory a page at a time for each permission combination and divvy up the memory and hand it out in 16 byte increments. llvm-svn: 131453
-
Jim Ingham authored
give the reason for the interrupt. Also make sure it we don't want to unwind from the evaluation we print something if it is interrupted. llvm-svn: 131448
-
- May 16, 2011
-
-
Greg Clayton authored
packets in GDB remote. Also fixed a compiler warning for an unhandled case for a switch. llvm-svn: 131397
-
- May 15, 2011
-
-
Greg Clayton authored
thread plan. In order to get the return value, you can call: void ThreadPlanCallFunction::RequestReturnValue (lldb::ValueSP &return_value_sp); This registers a shared pointer to a return value that will get filled in if everything goes well. After the thread plan is run the return value will be extracted for you. Added an ifdef to be able to switch between the LLVM MCJIT and the standand JIT. We currently have the standard JIT selected because we have some work to do to get the MCJIT fuctioning properly. Added the ability to call functions with 6 argument in the x86_64 ABI. Added the ability for GDBRemoteCommunicationClient to detect if the allocate and deallocate memory packets are supported and to not call allocate memory ("_M") or deallocate ("_m") if we find they aren't supported. Modified the ProcessGDBRemote::DoAllocateMemory(...) and ProcessGDBRemote::DoDeallocateMemory(...) to be able to deal with the allocate and deallocate memory packets not being supported. If they are not supported, ProcessGDBRemote will switch to calling "mmap" and "munmap" to allocate and deallocate memory instead using our trivial function call support. Modified the "void ProcessGDBRemote::DidLaunchOrAttach()" to correctly ignore the qHostInfo triple information if any was specified in the target. Currently if the target only specifies an architecture when creating the target: (lldb) target create --arch i386 a.out Then the vendor, os and environemnt will be adopted by the target. If the target was created with any triple that specifies more than the arch: (lldb) target create --arch i386-unknown-unknown a.out Then the target will maintain its triple and not adopt any new values. This can be used to help force bare board debugging where the dynamic loader for static files will get used and users can then use "target modules load ..." to set addressses for any files that are desired. Added back some convenience functions to the lldb_private::RegisterContext class for writing registers with unsigned values. Also made all RegisterContext constructors explicit to make sure we know when an integer is being converted to a RegisterValue. llvm-svn: 131370
-