Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3 |
|
#
a6d5464c |
| 02-Dec-2017 |
Zachary Turner <zturner@google.com> |
Add a symbols subcommand to lldb-test.
Differential Revision: https://reviews.llvm.org/D40745
llvm-svn: 319599
|
Revision tags: llvmorg-5.0.1-rc2 |
|
#
5f19b907 |
| 13-Nov-2017 |
Pavel Labath <labath@google.com> |
Move ArchSpec to the Utility module
The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module.
This
Move ArchSpec to the Utility module
The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module.
This commit touches many files, but most of it is just renaming of #include lines. In a couple of cases, I removed the #include ArchSpec line altogether, as the file was not using it. In one or two places, this necessitated adding other #includes like lldb-private-defines.h.
llvm-svn: 318048
show more ...
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
d13f691f |
| 02-Oct-2017 |
Ed Maste <emaste@freebsd.org> |
Improve FreeBSD kernel debugging
FreeBSD kernel modules are actually relocatable (.o) ELF files and this previously caused some issues for LLDB. This change addresses these when using lldb to symbol
Improve FreeBSD kernel debugging
FreeBSD kernel modules are actually relocatable (.o) ELF files and this previously caused some issues for LLDB. This change addresses these when using lldb to symbolicate FreeBSD kernel backtraces.
The major problems:
- Relocations were not being applied to the DWARF debug info despite there being code to do this. Several issues prevented it from working:
- Relocations are computed at the same time as the symbol table, but in the case of split debug files, symbol table parsing always redirects to the primary object file, meaning that relocations would never be applied in the debug file.
- There's actually no guarantee that the symbol table has been parsed yet when trying to parse debug information.
- When actually applying relocations, it will segfault because the object files are not mapped with MAP_PRIVATE and PROT_WRITE.
- LLDB returned invalid results when performing ordinary address-to- symbol resolution. It turned out that the addresses specified in the section headers were all 0, so LLDB believed all the sections had overlapping "file addresses" and would sometimes return a symbol from the wrong section.
Patch by Brian Koropoff
Differential Revision: https://reviews.llvm.org/D38142
llvm-svn: 314672
show more ...
|
#
e1a6074b |
| 14-Sep-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove uses of std::auto_ptr, it's going away in C++17.
std::unique_ptr is pretty much a drop-in replacement here. Also remove nullptr checks that are doing nothing.
llvm-svn: 313265
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3 |
|
#
963ce483 |
| 25-Aug-2017 |
Tamas Berghammer <tberghammer@google.com> |
Add support for the DWP debug info format
Summary: The DWP (DWARF package) format is used to pack multiple dwo files generated by split-dwarf into a single ELF file to make distributing them easier.
Add support for the DWP debug info format
Summary: The DWP (DWARF package) format is used to pack multiple dwo files generated by split-dwarf into a single ELF file to make distributing them easier. It is part of the DWARFv5 spec and can be generated by dwp or llvm-dwp from a set of dwo files.
Caviats: * Only the new version of the dwp format is supported (v2 in GNU numbering schema and v5 in the DWARF spec). The old version (v1) is already deprecated but binutils 2.24 still generates that one. * Combining DWP files with module debugging is not yet supported.
Subscribers: emaste, mgorny, aprantl
Differential Revision: https://reviews.llvm.org/D36062
llvm-svn: 311775
show more ...
|
#
8ac63e8f |
| 14-Aug-2017 |
Nitesh Jain <nitesh.jain@imgtec.com> |
[LLDB][MIPS] Set the Section's file address for ELF section to LLDB_INVALID_ADDRESS if SHF_ALLOC is not set.
Reviewers: labath, clayborg
Subscribers: jaydeep, bhushan, lldb-commits
Differential Re
[LLDB][MIPS] Set the Section's file address for ELF section to LLDB_INVALID_ADDRESS if SHF_ALLOC is not set.
Reviewers: labath, clayborg
Subscribers: jaydeep, bhushan, lldb-commits
Differential Revision: https://reviews.llvm.org/D35784
llvm-svn: 310855
show more ...
|
Revision tags: llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
38d0632e |
| 29-Jun-2017 |
Pavel Labath <labath@google.com> |
Move Timer and TraceOptions from Core to Utility
Summary: The classes have no dependencies, and they are used both by lldb and lldb-server, so it makes sense for them to live in the lowest layers.
Move Timer and TraceOptions from Core to Utility
Summary: The classes have no dependencies, and they are used both by lldb and lldb-server, so it makes sense for them to live in the lowest layers.
Reviewers: zturner, jingham
Subscribers: emaste, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D34746
llvm-svn: 306682
show more ...
|
#
d16a6e32 |
| 23-Jun-2017 |
Mehdi Amini <joker.eph@gmail.com> |
Fix typo: using && instead of & when evaluating a mask
Summary: Reported by coverity, I don't know how to provide a test.
Reviewers: zturner
Subscribers: lldb-commits, emaste
Differential Revisio
Fix typo: using && instead of & when evaluating a mask
Summary: Reported by coverity, I don't know how to provide a test.
Reviewers: zturner
Subscribers: lldb-commits, emaste
Differential Revision: https://reviews.llvm.org/D34550
llvm-svn: 306134
show more ...
|
#
df1a0d11 |
| 20-Jun-2017 |
Pavel Labath <labath@google.com> |
[linux] Change the way we load vdso pseudo-module
Summary: This is basically a revert of D16107 and parts of D10800, which were trying to get vdso loading working. They did this by implementing a ge
[linux] Change the way we load vdso pseudo-module
Summary: This is basically a revert of D16107 and parts of D10800, which were trying to get vdso loading working. They did this by implementing a generic load-an-elf-file from memory approach, which is not correct, since we cannot assume that an elf file is loaded in memory in full (it usually isn't, as there's no need to load section headers for example). This meant that we would read garbage instead of section sizes, and if that garbage happened to be a large number, we would crash while trying to allocate a buffer to accomodate the hypothetical section.
Instead of this, I add a bit of custom code to load the vdso to DynamicLoaderPOSIXDYLD (which already needed to handle the vdso specially). I determine the size of the memory to read using Process::GetMemoryRegionInfo, which is information coming from the OS, and cannot be forged by a malicious/misbehaving application.
Reviewers: eugene, clayborg
Subscribers: lldb-commits, ravitheja, tberghammer, emaste
Differential Revision: https://reviews.llvm.org/D34352
llvm-svn: 305780
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2 |
|
#
f9d16476 |
| 15-May-2017 |
Pavel Labath <labath@google.com> |
Remove an expensive lock from Timer
The Timer destructor would grab a global mutex in order to update execution time. Add a class to define a category once, statically; the class adds itself to an a
Remove an expensive lock from Timer
The Timer destructor would grab a global mutex in order to update execution time. Add a class to define a category once, statically; the class adds itself to an atomic singly linked list, and thus subsequent updates only need to use an atomic rather than grab a lock and perform a hashtable lookup.
Differential Revision: https://reviews.llvm.org/D32823 Patch by Scott Smith <scott.smith@purestorage.com>.
llvm-svn: 303058
show more ...
|
#
97206d57 |
| 12-May-2017 |
Zachary Turner <zturner@google.com> |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that h
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious.
llvm-svn: 302872
show more ...
|
#
efddda3d |
| 02-May-2017 |
Pavel Labath <labath@google.com> |
ObjectFileELF: Fix symbol lookup in bss section
Summary: If we have symbol information in a separate file, we need to be very careful about presenting a unified section view of module to the rest of
ObjectFileELF: Fix symbol lookup in bss section
Summary: If we have symbol information in a separate file, we need to be very careful about presenting a unified section view of module to the rest of the debugger. ObjectFileELF had code to handle that, but it was being overly cautious -- the section->GetFileSize()!=0 meant that the unification would fail for sections which do not occupy any space in the object file (e.g., .bss). In my case, that manifested itself as not being able to display the values of .bss variables properly as the section associated with the variable did not have it's load address set (because it was not present in the unified section list).
I test this by making sure the unified section list and the variables refer to the same section.
Reviewers: eugene, zturner
Subscribers: tberghammer, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D32434
llvm-svn: 301917
show more ...
|
#
4d35d6b3 |
| 02-May-2017 |
Pavel Labath <labath@google.com> |
Change UniqueCStringMap to use ConstString as the key
Summary: UniqueCStringMap "sorts" the entries for fast lookup, but really it only cares about uniqueness. ConstString can be compared by pointe
Change UniqueCStringMap to use ConstString as the key
Summary: UniqueCStringMap "sorts" the entries for fast lookup, but really it only cares about uniqueness. ConstString can be compared by pointer alone, rather than with strcmp, resulting in much faster comparisons. Change the interface to take ConstString instead, and propagate use of the type to the callers where appropriate.
Reviewers: #lldb, clayborg
Reviewed By: clayborg
Subscribers: labath, jasonmolenda, lldb-commits
Differential Revision: https://reviews.llvm.org/D32316 Patch by Scott Smith <scott.smith@purestorage.com>.
llvm-svn: 301908
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
706c5205 |
| 31-Mar-2017 |
Nitesh Jain <nitesh.jain@imgtec.com> |
[LLDB][MIPS] Fix Core file Architecture and OS information.
Reviewers: labath, clayborg
Subscribers: jaydeep, bhushan, lldb-commits, slthakur
Differential Revision: https://reviews.llvm.org/D31280
[LLDB][MIPS] Fix Core file Architecture and OS information.
Reviewers: labath, clayborg
Subscribers: jaydeep, bhushan, lldb-commits, slthakur
Differential Revision: https://reviews.llvm.org/D31280
llvm-svn: 299199
show more ...
|
#
12801f1e |
| 26-Mar-2017 |
Kamil Rytarowski <n54@gmx.com> |
[LLDB] OpenBSD support
Summary: Add basic OpenBSD support. This is enough to be able to analyze core dumps for OpenBSD/amd64, OpenBSD/arm, OpenBSD/arm64 and OpenBSD/i386.
Note that part of the chan
[LLDB] OpenBSD support
Summary: Add basic OpenBSD support. This is enough to be able to analyze core dumps for OpenBSD/amd64, OpenBSD/arm, OpenBSD/arm64 and OpenBSD/i386.
Note that part of the changes to source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp fix a bug that probably affects other platforms as well. The GetProgramHeaderByIndex() interface use 1-based indices, but in some case when looping over the headers the, the loop starts at 0 and misses the last header. This caused problems on OpenBSD since OpenBSD core dumps have the PT_NOTE segment as the last program header.
Reviewers: joerg, labath, krytarowski
Reviewed By: krytarowski
Subscribers: aemerson, emaste, rengolin, srhines, krytarowski, mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D31131
llvm-svn: 298810
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4 |
|
#
7f6a7a37 |
| 06-Mar-2017 |
Zachary Turner <zturner@google.com> |
Remove FileSpec::ReadFileContents.
This functionality is subsumed by DataBufferLLVM, which is also more efficient since it will try to mmap. However, we don't yet support mmaping writable private s
Remove FileSpec::ReadFileContents.
This functionality is subsumed by DataBufferLLVM, which is also more efficient since it will try to mmap. However, we don't yet support mmaping writable private sections, and in some cases we were using ReadFileContents and then modifying the buffer. To address that I've added a flag to the DataBufferLLVM methods that allow you to map privately, which disables the mmaping path entirely. Eventually we should teach DataBufferLLVM to use mmap with writable private, but that is orthogonal to this effort.
Differential Revision: https://reviews.llvm.org/D30622
llvm-svn: 297095
show more ...
|
#
666cc0b2 |
| 04-Mar-2017 |
Zachary Turner <zturner@google.com> |
Move DataBuffer / DataExtractor and friends from Core -> Utility.
llvm-svn: 296943
|
#
6f9e6901 |
| 03-Mar-2017 |
Zachary Turner <zturner@google.com> |
Move Log from Core -> Utility.
All references to Host and Core have been removed, so this class can now safely be lowered into Utility.
Differential Revision: https://reviews.llvm.org/D30559
llvm-
Move Log from Core -> Utility.
All references to Host and Core have been removed, so this class can now safely be lowered into Utility.
Differential Revision: https://reviews.llvm.org/D30559
llvm-svn: 296909
show more ...
|
Revision tags: llvmorg-4.0.0-rc3 |
|
#
3f4a4b36 |
| 24-Feb-2017 |
Zachary Turner <zturner@google.com> |
Delete DataBufferMemoryMap.
After a series of patches on the LLVM side to get the mmaping code up to compatibility with LLDB's needs, it is now ready to go, which means LLDB's custom mmapping code i
Delete DataBufferMemoryMap.
After a series of patches on the LLVM side to get the mmaping code up to compatibility with LLDB's needs, it is now ready to go, which means LLDB's custom mmapping code is redundant. So this patch deletes it all and uses LLVM's code instead.
In the future, we could take this one step further and delete even the lldb DataBuffer base class and rely entirely on LLVM's facilities, but this is a job for another day.
Differential Revision: https://reviews.llvm.org/D30054
llvm-svn: 296159
show more ...
|
Revision tags: llvmorg-4.0.0-rc2 |
|
#
bf9a7730 |
| 02-Feb-2017 |
Zachary Turner <zturner@google.com> |
Move classes from Core -> Utility.
This moves the following classes from Core -> Utility.
ConstString Error RegularExpression Stream StreamString
The goal here is to get lldbUtility into a state w
Move classes from Core -> Utility.
This moves the following classes from Core -> Utility.
ConstString Error RegularExpression Stream StreamString
The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem.
Differential Revision: https://reviews.llvm.org/D29427
llvm-svn: 293941
show more ...
|
#
23ccc291 |
| 31-Jan-2017 |
Pavel Labath <labath@google.com> |
Open ELF core dumps with more than 64K sections
Summary: Problem:
There are three filelds in the ELF header - e_phnum, e_shnum, and e_shstrndx - that could be bigger than 64K and therefore do not f
Open ELF core dumps with more than 64K sections
Summary: Problem:
There are three filelds in the ELF header - e_phnum, e_shnum, and e_shstrndx - that could be bigger than 64K and therefore do not fit in 16 bits reserved for them in the header. If this happens, pretty often there is a special section at index 0 which contains their real values for these fields in the section header in the fields sh_info, sh_size, and sh_link respectively.
Fix:
- Rename original fields in the header declaration. We want to have them around just in case.
- Reintroduce these fields as 32-bit members at the end of the header. By default they are initialized from the header in Parse() method.
- In Parse(), detect the situation when the header might have been extended into section info #0 and try to read it from the same data source.
- ObjectFileELF::GetModuleSpecifications accesses some of these fields but the original parse uses too small data source. Re-parse the header if necessary using bigger data source.
- ProcessElfCore::CreateInstance uses header with potentially sentinel values, but it does not access these fields, so a comment here is enough.
Reviewers: labath
Reviewed By: labath
Subscribers: davidb, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D29095 Author: Eugene Birukov <eugenebi@hotmail.com>
llvm-svn: 293714
show more ...
|
#
b1554311 |
| 20-Jan-2017 |
Hafiz Abid Qadeer <hafiz_abid@mentor.com> |
Fix more unused variable warnings when asserts are disabled.
llvm-svn: 292598
|
Revision tags: llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3 |
|
#
a08ba42f |
| 05-Dec-2016 |
Alexander Shaposhnikov <shal1t712@gmail.com> |
[lldb] Update the check for Linux or FreeBSD in SymbolFileDWARF::FindFunctions
This diff 1. Adds a comment to ObjectFileELF.cpp about the current approach to determining the OS. 2. Replaces the chec
[lldb] Update the check for Linux or FreeBSD in SymbolFileDWARF::FindFunctions
This diff 1. Adds a comment to ObjectFileELF.cpp about the current approach to determining the OS. 2. Replaces the check in SymbolFileDWARF.cpp with a more robust one.
Test plan: Built (on Linux) a test binary linked to a c++ shared library which contains just an implementation of a function TestFunction, the library (the binary itself) doesn't contain ELF notes and EI_OSABI is set to System V. Checked in lldb that now "p TestFunction()" works fine (and doesn't work without this patch).
Differential revision: https://reviews.llvm.org/D27380
llvm-svn: 288687
show more ...
|
Revision tags: llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
771ef6d4 |
| 02-Nov-2016 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233
l
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233
llvm-svn: 285855
show more ...
|
#
a0c82e18 |
| 13-Oct-2016 |
Richard Chamberlain <richard_chamberlain@uk.ibm.com> |
[lldb] Improve identification of Linux core dumps. Fix for bug #30485.
Summary: ObjectFileELF::RefineModuleDetailsFromNote() identifies Linux core dumps by searching for library paths starting with
[lldb] Improve identification of Linux core dumps. Fix for bug #30485.
Summary: ObjectFileELF::RefineModuleDetailsFromNote() identifies Linux core dumps by searching for library paths starting with /lib/x86_64-linux-gnu or /lib/i386-linux-gnu. This change widens the test to allow for linux installations which have addition directories in the path.
Reviewers: ted, hhellyer, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25179
llvm-svn: 284114
show more ...
|