History log of /external/lldb/source/Host/common/FileSpec.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1c638ac2613cb6825adab78021a53b7114121ef6 13-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't depend on set being transitively included.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
99447a6d31d5574bc63d4ec5efd4c5ac949f151f 13-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Update for llvm change.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
15c17749851fb645a63bb649318076375ee6ce4e 12-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the global functions instead of the Program methods.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
0c2921f5b9dab2ca1832bb746ab3aa3f66fdd0b5 15-May-2013 Jim Ingham <jingham@apple.com> Fixed a few obvious errors pointed out by the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
5581a7e69714aa6c08833e060de85237ec2a690a 06-May-2013 Jason Molenda <jmolenda@apple.com> A few small fixes to make things like image list not
print "//mach_kernel" if you are debugging an executable
in the top level directory.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
08f60c88b61c42c35abf3233f0cbe19d29fbe814 04-May-2013 Jason Molenda <jmolenda@apple.com> fix a couple of clang static analyzer warnings.
Most important was a new[] + delete mismatch in ScanFormatDescriptor()
and a couple of possible memory leaks in FileSpec::EnumerateDirectory().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
30518e01f8e264a310050cfc0e2857637fa32063 29-Apr-2013 Greg Clayton <gclayton@apple.com> Don't return a reference to a local variable, and removed a redundant API.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
bf1fa97ab9a28890478daf70cdf6b8177ae3bbae 29-Apr-2013 Jason Molenda <jmolenda@apple.com> Add a few new methods to FileSpec to make it a little easier to work
with directories, without increasing the size of the FileSpec object.
GetPath() returns a std::string of the full pathname of the file.
IsDirectory(), IsPipe(), IsRegularFile(), IsSocket(), and IsSymbolicLink()
can be used instead of getting the FileType() and comparing it to an enum.

Update PlatformDarwinKernel to use these new methods.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
683cb6970b55100f0f3aa9501b0c0ee8358a9c8c 20-Apr-2013 Greg Clayton <gclayton@apple.com> Fixed being able to mmap an entire file by letting the default args "do the right thing".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
81a96aa6242f7b559770f5dc62316253cb8cb0d4 18-Apr-2013 Greg Clayton <gclayton@apple.com> Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++.

Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
6f9236af19e2d1916630efca7003788bc0ad955d 04-Apr-2013 Jason Molenda <jmolenda@apple.com> Change EnumerateDirectory from using readdir() to using readdir_r()
so it can be re-entered while iterating over a directory safely.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
d35b7b3bfd21f4fd6b048693563eef1b772ae197 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> More Linux warnings fixes (remove default labels as needed):
- as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
9b8550ee5ca4bb85b67352e1c63a1abf7f4a3809 03-Nov-2012 Jim Ingham <jingham@apple.com> Fix a little think-o. In FileSpec::operator== we were trying to figure out whether the rhs file was resolved or not by comparing
the resolved version of the rhs FileSpec's directory name with the lhs FileSpec's directory name. We really meant to compare it
with the rhs FileSpec's directory name...

<rdar://problem/12438838>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
fb2d05b85d8185f06d97d2c5444652fa74c246c3 03-Nov-2012 Enrico Granata <egranata@apple.com> Caught two cases where we were passing a Stream* without checking for NULL

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
ed0a0fbd021e44727469d6fa20cc337c58bd04c3 18-Oct-2012 Greg Clayton <gclayton@apple.com> <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".




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
fc04d2463ad654c28f9ee2ee836174cc86b7f8b8 30-Aug-2012 Greg Clayton <gclayton@apple.com> OptionValueFileSpec had an accessor to read the contents of the file and return the data. This can end up being used to get the string contents of a text file and could end up not being NULL terminated. I added accessors to get the file contents raw, or with a null terminator. Added the needed calls to make this happen in the FileSpec and File classes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
49ce8969d3154e1560106cfe530444c09410f217 29-Aug-2012 Greg Clayton <gclayton@apple.com> <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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
73844aa19a7360b662e2be710fc3c969d6c86606 22-Aug-2012 Greg Clayton <gclayton@apple.com> 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".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
4b23ab33d221eaadf40f65a5b5fe3ca4475ff761 06-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10652336>

Fixed a crasher when trying to load an expression prefix file:

% touch /tmp/carp.txt
% xcrun lldb
(lldb) settings set target.expr-prefix /tmp/carp.txt
Segmentation fault



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
2f28ece553d2ef0d7b3e8d1419020591ec3818f9 04-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10507811>

Be better at detecting when DWARF changes and handle this more
gracefully than asserting and exiting.

Also fixed up a bunch of system calls that weren't properly checking
for EINTR.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
cbed99955c9a7cadc457fd8af2ec6946124fa9a1 18-Oct-2011 Johnny Chen <johnny.chen@apple.com> Fix build under gcc.

Patch from Dawn.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
59df36f99b76e33852e6848a162f5c2851074ea2 17-Oct-2011 Enrico Granata <granata.enrico@gmail.com> this patch introduces a new command script import command which takes as input a filename for a Python script and imports the module contained in that file. the containing directory is added to the Python path such that dependencies are honored. also, the module may contain an __lldb_init_module(debugger,dict) function, which gets called after importing, and which can somehow initialize the module's interaction with lldb

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
d6d47976b71187907c1cdeea86fabf7d5534314f 23-Sep-2011 Jim Ingham <jingham@apple.com> Added the ability to restrict breakpoints by function name, function regexp, selector
etc to specific source files.
Added SB API's to specify these source files & also more than one module.
Added an "exact" option to CompileUnit's FindLineEntry API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
31cf0e7c5ff8233eccef28ca22d025d7b490cb7a 12-Sep-2011 Greg Clayton <gclayton@apple.com> Changed to using an "operator bool" instead of an "operator void*"
and avoid returning a pointer to the current object. In the new
"operator bool" implementation, check the filename object first
since many times we have FileSpec objects with a filename, yet no
directory.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
2bc9eb3ba78efc64a273729b480bafc3bbaa433a 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Patch by Matt Johnson to silence G++ warnings!
Used hand merge to apply the diffs. I did not apply the diffs for FormatManager.h and
the diffs for memberwise initialization for ValueObject.cpp because they changed since.
I will ask my colleague to apply them later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
ff44ab42e9f5d8e4d550e11d1b69413e0bc75b71 23-Apr-2011 Greg Clayton <gclayton@apple.com> Fixed the SymbolContext::DumpStopContext() to correctly indent and dump
inline contexts when the deepest most block is not inlined.

Added source path remappings to the lldb_private::Target class that allow it
to remap paths found in debug info so we can find source files that are elsewhere
on the current system.

Fixed disassembly by function name to disassemble inline functions that are
inside other functions much better and to show enough context before the
disassembly output so you can tell where things came from.

Added the ability to get more than one address range from a SymbolContext
class for the case where a block or function has discontiguous address ranges.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
257082556976558deb1cb246d45c2ae1bdd7b34c 01-Apr-2011 Greg Clayton <gclayton@apple.com> Some OpenBSD patches from Amit Kulkarni.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
158842ca982c53aca6c5ad7345d7b261e309292d 09-Feb-2011 Jim Ingham <jingham@apple.com> Add FileSpec::ResolvePartialUsername, and use it in CommandCompletions to isolate pwd.h in the Host layer.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
82cfaed47126a17b4fa21e42e05546e7a041b9e3 08-Feb-2011 Greg Clayton <gclayton@apple.com> A bit more cleanup with respect to using LLDB_CONFIG_XXX defines outside of
the lldb/source/Host/*.cpp and lldb/source/Host/*/*.cpp directories. The only
offenders are the command completion and the StreamFile.cpp.

I will soon modify StreamFile.cpp to use a lldb/source/Host/File.cpp so that
all file open, close, read, write, seek, are abstracted into the host layer
as well, then this will be gone.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp
5f54ac373b119a4c6693e4875c48aa761fba0c86 08-Feb-2011 Greg Clayton <gclayton@apple.com> Moved FileSpec into the Host layer since it will vary from host to host.
We have a common unix implementation in lldb/source/Host/common/FileSpec.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Host/common/FileSpec.cpp