| #
c7bece56 |
| 25-Jan-2013 |
Greg Clayton <[email protected]> |
<rdar://problem/13069948>
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our
<rdar://problem/13069948>
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.
So I defined a new "lldb::offset_t" which should be used for all file offsets.
After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.
Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.
llvm-svn: 173463
show more ...
|
| #
e05b2efe |
| 09-Jan-2013 |
Greg Clayton <[email protected]> |
Fixed an issue the "process plugin" proxy object was trying to use the m_exe_ctx when it wasn't ok to do so.
llvm-svn: 172014
|
| #
f9fc609f |
| 09-Jan-2013 |
Greg Clayton <[email protected]> |
Expanded the flags that can be set for a command object in lldb_private::CommandObject. This list of available flags are:
enum { //---------------------------------------------------------------
Expanded the flags that can be set for a command object in lldb_private::CommandObject. This list of available flags are:
enum { //---------------------------------------------------------------------- // eFlagRequiresTarget // // Ensures a valid target is contained in m_exe_ctx prior to executing // the command. If a target doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidTargetDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidTargetDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresTarget = (1u << 0), //---------------------------------------------------------------------- // eFlagRequiresProcess // // Ensures a valid process is contained in m_exe_ctx prior to executing // the command. If a process doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidProcessDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidProcessDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresProcess = (1u << 1), //---------------------------------------------------------------------- // eFlagRequiresThread // // Ensures a valid thread is contained in m_exe_ctx prior to executing // the command. If a thread doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidThreadDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidThreadDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresThread = (1u << 2), //---------------------------------------------------------------------- // eFlagRequiresFrame // // Ensures a valid frame is contained in m_exe_ctx prior to executing // the command. If a frame doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidFrameDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidFrameDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresFrame = (1u << 3), //---------------------------------------------------------------------- // eFlagRequiresRegContext // // Ensures a valid register context (from the selected frame if there // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx) // is availble from m_exe_ctx prior to executing the command. If a // target doesn't exist or is invalid, the command will fail and // CommandObject::GetInvalidRegContextDescription() will be returned as // the error. CommandObject subclasses can override the virtual function // for GetInvalidRegContextDescription() to provide custom strings when // needed. //---------------------------------------------------------------------- eFlagRequiresRegContext = (1u << 4), //---------------------------------------------------------------------- // eFlagTryTargetAPILock // // Attempts to acquire the target lock if a target is selected in the // command interpreter. If the command object fails to acquire the API // lock, the command will fail with an appropriate error message. //---------------------------------------------------------------------- eFlagTryTargetAPILock = (1u << 5), //---------------------------------------------------------------------- // eFlagProcessMustBeLaunched // // Verifies that there is a launched process in m_exe_ctx, if there // isn't, the command will fail with an appropriate error message. //---------------------------------------------------------------------- eFlagProcessMustBeLaunched = (1u << 6), //---------------------------------------------------------------------- // eFlagProcessMustBePaused // // Verifies that there is a paused process in m_exe_ctx, if there // isn't, the command will fail with an appropriate error message. //---------------------------------------------------------------------- eFlagProcessMustBePaused = (1u << 7) };
Now each command object contains a "ExecutionContext m_exe_ctx;" member variable that gets initialized prior to running the command. The validity of the target objects in m_exe_ctx are checked to ensure that any target/process/thread/frame/reg context that are required are valid prior to executing the command. Each command object also contains a Mutex::Locker m_api_locker which gets used if eFlagTryTargetAPILock is set. This centralizes a lot of checking code that was previously and inconsistently implemented across many commands.
llvm-svn: 171990
show more ...
|
|
Revision tags: llvmorg-3.2.0 |
|
| #
f00b7511 |
| 18-Dec-2012 |
Daniel Malea <[email protected]> |
Fix typo in error message (print requested URL instead of command name when plugin missing)
llvm-svn: 170447
|
| #
bf4b7be6 |
| 13-Dec-2012 |
Sean Callanan <[email protected]> |
Removed the == and != operators from ArchSpec, since equality can be strict or loose and we want code to explicitly choose one or the other.
Also renamed the Compare function to IsEqualTo, to avoid
Removed the == and != operators from ArchSpec, since equality can be strict or loose and we want code to explicitly choose one or the other.
Also renamed the Compare function to IsEqualTo, to avoid confusion.
<rdar://problem/12856749>
llvm-svn: 170152
show more ...
|
|
Revision tags: llvmorg-3.2.0-rc3 |
|
| #
93a64300 |
| 05-Dec-2012 |
Daniel Malea <[email protected]> |
Fix Linux build warnings due to redefinition of macros: - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up)
Fix Linux build warnings due to redefinition of macros: - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up)
Patch by Matt Kopec!
llvm-svn: 169341
show more ...
|
| #
3bcdfc0e |
| 04-Dec-2012 |
Greg Clayton <[email protected]> |
<rdar://problem/12798131>
Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added
<rdar://problem/12798131>
Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.
This fix does the following: - make sure all short options are treated as "int" - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value
llvm-svn: 169189
show more ...
|
|
Revision tags: llvmorg-3.2.0-rc2 |
|
| #
d01b2953 |
| 29-Nov-2012 |
Daniel Malea <[email protected]> |
Resolve printf formatting warnings on Linux: - use macros from inttypes.h for format strings instead of OS-specific types
Patch from Matt Kopec!
llvm-svn: 168945
|
|
Revision tags: llvmorg-3.2.0-rc1 |
|
| #
3154255f |
| 24-Oct-2012 |
Sean Callanan <[email protected]> |
This is a fix for the command option parser.
There was a generic catch-all type for path arguments called "eArgTypePath," and a specialized version called "eArgTypeFilename." It turns out all the c
This is a fix for the command option parser.
There was a generic catch-all type for path arguments called "eArgTypePath," and a specialized version called "eArgTypeFilename." It turns out all the cases where we used eArgTypePath we could have used Filename or we explicitly meant a directory.
I changed Path to DirectoryName, made it use the directory completer, and rationalized the uses of Path.
<rdar://problem/12559915>
llvm-svn: 166533
show more ...
|
| #
a0ca6601 |
| 18-Oct-2012 |
Greg Clayton <[email protected]> |
<rdar://problem/12462048> <rdar://problem/12068650>
More fixes to how we handle paths that are used to create a target.
This modification centralizes the location where and how what the user specif
<rdar://problem/12462048> <rdar://problem/12068650>
More fixes to how we handle paths that are used to create a target.
This modification centralizes the location where and how what the user specifies gets resolved. Prior to this fix, the TargetList::CreateTarget variants took a FileSpec object which meant everyone had the opportunity to resolve the path their own way. Now both CreateTarget variants take a "const char *use_exe_path" which allows the TargetList::CreateTarget to centralize where the resolving happens and "do the right thing".
llvm-svn: 166186
show more ...
|
| #
45392553 |
| 17-Oct-2012 |
Greg Clayton <[email protected]> |
<rdar://problem/12462048>
LLDB changes argv[0] when debugging a symlink. Now we have the notion of argv0 in the target settings:
target.arg0 (string) =
There is also the program argument that are
<rdar://problem/12462048>
LLDB changes argv[0] when debugging a symlink. Now we have the notion of argv0 in the target settings:
target.arg0 (string) =
There is also the program argument that are separate from the first argument that have existed for a while:
target.run-args (arguments) =
When running "target create <exe>", we will place the untouched "<exe>" into target.arg0 to ensure when we run, we run with what the user typed. This has been added to the ProcessLaunchInfo and all other needed places so we always carry around the: - resolved executable path - argv0 - program args
Some systems may not support separating argv0 from the resolved executable path and the ProcessLaunchInfo needs to carry all of this information along so that each platform can make that decision.
llvm-svn: 166137
show more ...
|
| #
998255bf |
| 13-Oct-2012 |
Greg Clayton <[email protected]> |
<rdar://problem/12491387>
I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override:
virtual CommandObject * GetPluginComma
<rdar://problem/12491387>
I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override:
virtual CommandObject * GetPluginCommandObject();
This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented!
llvm-svn: 165861
show more ...
|
| #
4bd4e7e3 |
| 29-Sep-2012 |
Jason Molenda <[email protected]> |
Add support for debugging KASLR kernels via kdp (the kernel being loaded at a random offset).
To get the kernel's UUID and load address I need to send a kdp packet so I had to implement the kernel r
Add support for debugging KASLR kernels via kdp (the kernel being loaded at a random offset).
To get the kernel's UUID and load address I need to send a kdp packet so I had to implement the kernel relocation (and attempt to find the kernel if none was provided to lldb already) in ProcessKDP -- but this code really properly belongs in DynamicLoaderDarwinKernel.
I also had to add an optional Stream to ConnectRemote so ProcessKDP::DoConnectRemote can print feedback about the remote kernel's UUID, load address, and notify the user if we auto-loaded the kernel via the UUID.
<rdar://problem/7714201>
llvm-svn: 164881
show more ...
|
| #
c1b1f1ea |
| 14-Sep-2012 |
Greg Clayton <[email protected]> |
<rdar://problem/11374963>
When attaching on ARM hosted debuggers we were incorrectly setting the triple to "arm-apple-ios". This was happening because in the post attach code, we would lookup the pr
<rdar://problem/11374963>
When attaching on ARM hosted debuggers we were incorrectly setting the triple to "arm-apple-ios". This was happening because in the post attach code, we would lookup the process info through the platform, and if successful, we would get the architecture of the process. This code uses sysctl() calls, but we can only get the CPU type, not the subtype, so we would get ARM for CPU type and nothing for the cpu subtype, so this would map to "arm-apple-ios". I fixed the code to get the cpu subtype from "hw.cpusubtype" which is what we really want for ARM, and not the architecture is already correct. "add-dsym" then works like a charm. I also improved the command output when the architecture changes to show the entire triple instead of just the arch name.
llvm-svn: 163868
show more ...
|
| #
41f2b940 |
| 10-Sep-2012 |
Jim Ingham <[email protected]> |
Fixed a few places where we were doing:
uint32_t size = ThreadList.GetSize(); for (i=0; i < size; ++i)
without grabbing the thread list mutex.
llvm-svn: 163541
|
| #
1f746071 |
| 29-Aug-2012 |
Greg Clayton <[email protected]> |
<rdar://problem/11757916>
Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implem
<rdar://problem/11757916>
Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile()
Cleaned up header includes a bit as well.
llvm-svn: 162860
show more ...
|
| #
67cc0636 |
| 22-Aug-2012 |
Greg Clayton <[email protected]> |
Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting v
Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads
Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".
llvm-svn: 162366
show more ...
|
| #
0e41084a |
| 11-Aug-2012 |
Jim Ingham <[email protected]> |
Add an option to "process continue" to ignore the next <N> crossings of the breakpoint under the currently selected thread.
<rdar://problem/10458225>
llvm-svn: 161723
|
| #
e9ce62b6 |
| 10-Aug-2012 |
Jim Ingham <[email protected]> |
Use the file completer for "process launch" arguments. <rdar://problem/11274012>
llvm-svn: 161704
|
| #
cfc0935e |
| 27-Jul-2012 |
Jim Ingham <[email protected]> |
Added an lldb_private & equivalent SB API to send an AsyncInterrupt to the event loop. Convert from calling Halt in the lldb Driver.cpp's input reader's sigint handler to sending this AsyncInterrupt
Added an lldb_private & equivalent SB API to send an AsyncInterrupt to the event loop. Convert from calling Halt in the lldb Driver.cpp's input reader's sigint handler to sending this AsyncInterrupt so it can be handled in the event loop. If you are attaching and get an async interrupt, abort the attach attempt. Also remember to destroy the process if get interrupted while attaching. Getting this to work also required handing the eBroadcastBitInterrupt in a few more places in Process WaitForEvent & friends.
<rdar://problem/10792425>
llvm-svn: 160903
show more ...
|
| #
cd16df91 |
| 20-Jul-2012 |
Jim Ingham <[email protected]> |
Add "vAttachOrWait" to debugserver, so you can implement "attach to the process if it exists OR wait for it" without race conditions. Use that in lldb.
llvm-svn: 160578
|
| #
5a988416 |
| 08-Jun-2012 |
Jim Ingham <[email protected]> |
Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an Execute which was never going to get run and another ExecuteRawCommandString. Took the knowled
Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs.
Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for the overall command and moved them into the .cpp file.
Made the CommandObject flags work for raw as well as parsed commands.
Made "expr" use the flags so that it requires you to be paused to run "expr".
llvm-svn: 158235
show more ...
|
| #
4ce37abb |
| 01-Jun-2012 |
Johnny Chen <[email protected]> |
Fix a typo for 'waitfor' option help wording.
llvm-svn: 157853
|
| #
5bcaf583 |
| 31-May-2012 |
Sean Callanan <[email protected]> |
Fixed a missed case in the patch to make HandleCommand take a LazyBool instead of a bool.
llvm-svn: 157728
|
| #
a95ce623 |
| 24-May-2012 |
Johnny Chen <[email protected]> |
rdar://problem/11457634
Supports the use-case scenario of immediately continuing the process once attached. Add a simple completion test case from "process attach --con" to "process attach --continu
rdar://problem/11457634
Supports the use-case scenario of immediately continuing the process once attached. Add a simple completion test case from "process attach --con" to "process attach --continue ".
llvm-svn: 157361
show more ...
|