History log of /llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (Results 126 – 150 of 366)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 70355ace 12-Feb-2019 Jonas Devlieghere <jonas@devlieghere.com>

Remove redundant ::get() for smart pointer. (NFC)

This commit removes redundant calls to smart pointer’s ::get() method.

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartpt

Remove redundant ::get() for smart pointer. (NFC)

This commit removes redundant calls to smart pointer’s ::get() method.

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html

llvm-svn: 353795

show more ...


# bd334efd 11-Feb-2019 Pavel Labath <pavel@labath.sk>

Simplify ObjectFile::GetUUID

instead of returning the UUID through by-ref argument and a boolean
value indicating success, we can just return it directly. Since the UUID
class already has an invalid

Simplify ObjectFile::GetUUID

instead of returning the UUID through by-ref argument and a boolean
value indicating success, we can just return it directly. Since the UUID
class already has an invalid state, it can be used to denote the failure
without the additional bool.

llvm-svn: 353714

show more ...


Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1
# 2946cd70 19-Jan-2019 Chandler Carruth <chandlerc@gmail.com>

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the ne

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636

show more ...


# 43ddbc0b 11-Jan-2019 Pavel Labath <pavel@labath.sk>

ELF: Fix base address computation code for files generated by yaml2obj

The code was assuming that the elf file will have a PT_LOAD segment
starting from the first byte of the file. While this is tru

ELF: Fix base address computation code for files generated by yaml2obj

The code was assuming that the elf file will have a PT_LOAD segment
starting from the first byte of the file. While this is true for files
generated by most linkers (it's a way of saving space), it is not a
requirement. And files not satisfying this constraint can still be
perfectly executable. yaml2obj is one of the tools which produces files
like this.

This patch relaxes the check in ObjectFileELF to take the address of the
first PT_LOAD segment as the base address of the object (instead of the
one with the offset 0). Since the PT_LOAD segments are supposed to be
sorted according to the VM address, this entry will also be the one with
the lowest VM address.

If we ever run into files which don't have the PT_LOAD segments sorted,
we can easily change this code to return the lowest VM address as the
base address (if that is the correct thing to do for these files).

llvm-svn: 350923

show more ...


# 976af43b 10-Jan-2019 Pavel Labath <pavel@labath.sk>

Implement ObjectFileELF::GetBaseAddress

Summary:
The concept of a base address was already present in the implementation
(it's needed for computing section load addresses properly), but it was
never

Implement ObjectFileELF::GetBaseAddress

Summary:
The concept of a base address was already present in the implementation
(it's needed for computing section load addresses properly), but it was
never exposed through this function. This fixes that.

llvm-svn: 350804

show more ...


# f55aea73 09-Jan-2019 Pavel Labath <pavel@labath.sk>

ELF: create "container" sections from PT_LOAD segments

Summary:
This is the result of the discussion in D55356, where it was suggested
as a solution to representing the addresses that logically belo

ELF: create "container" sections from PT_LOAD segments

Summary:
This is the result of the discussion in D55356, where it was suggested
as a solution to representing the addresses that logically belong to a
module in memory, but are not a part of any of its sections.

The ELF PT_LOAD segments are similar to the MachO "load commands",
except that the relationship between them and the object file sections
is a bit weaker. While in the MachO case, the sections belonging to a
specific segment are placed directly inside it in the object file
logical structur, in the ELF case, the sections and segments form two
separate hierarchies. This means that it is in theory possible to create
an elf file where only a part of a section would belong to some segment
(and another part to a different one). However, I am not aware of any
tool which would produce such a file (and most tools will have problems
ingesting them), so this means it is still possible to follow the MachO
model and make sections children of the PT_LOAD segments.

In case we run into (corrupt?) files with overlapping sections, I have
added code (and tests) which adjusts the sizes and/or drops the offending
sections in order to present a reasonable image to the upper layers of
LLDB. This is mostly done for completeness, as I don't anticipate
running into this situation in the real world. However, if we do run
into it, and the current behavior is not suitable for some reason, we
can implement this logic differently.

Reviewers: clayborg, jankratochvil, krytarowski, joerg, espindola

Subscribers: emaste, arichardson, lldb-commits

Differential Revision: https://reviews.llvm.org/D55998

llvm-svn: 350742

show more ...


# f760f5ae 03-Jan-2019 Pavel Labath <pavel@labath.sk>

Simplify ObjectFile::GetArchitecture

Summary:
instead of returning the architecture through by-ref argument and a
boolean value indicating success, we can just return the ArchSpec
directly. Since th

Simplify ObjectFile::GetArchitecture

Summary:
instead of returning the architecture through by-ref argument and a
boolean value indicating success, we can just return the ArchSpec
directly. Since the ArchSpec already has an invalid state, it can be
used to denote the failure without the additional bool.

Reviewers: clayborg, zturner, espindola

Subscribers: emaste, arichardson, JDevlieghere, lldb-commits

Differential Revision: https://reviews.llvm.org/D56129

llvm-svn: 350291

show more ...


# 0d38e4fd 18-Dec-2018 Pavel Labath <pavel@labath.sk>

ELF: Don't create sections for section header index 0

Summary:
The first section header does not define a real section. Instead it is
used for various elf extensions. This patch skips creation of a

ELF: Don't create sections for section header index 0

Summary:
The first section header does not define a real section. Instead it is
used for various elf extensions. This patch skips creation of a section
for index 0.

This has one furtunate side-effect, in that it allows us to use the section
header index as the Section ID (where 0 is also invalid). This way, we
can get rid of a lot of spurious +1s in the ObjectFileELF code.

Reviewers: clayborg, krytarowski, joerg, espindola

Subscribers: emaste, lldb-commits, arichardson

Differential Revision: https://reviews.llvm.org/D55757

llvm-svn: 349498

show more ...


# 62a8254f 15-Dec-2018 Pavel Labath <pavel@labath.sk>

ELF: more section creation cleanup

Summary:
This patch attempts to move as much code as possible out of the
CreateSections function to make room for future improvements there. Some
of this may be sl

ELF: more section creation cleanup

Summary:
This patch attempts to move as much code as possible out of the
CreateSections function to make room for future improvements there. Some
of this may be slightly over-engineered (VMAddressProvider), but I
wanted to keep the logic of this function very simple, because once I
start taking segment headers into acount (as discussed in D55356), the
function is going to grow significantly.

While in there, I also added tests for various bits of functionality.

This should be NFC, except that I changed the order of hac^H^Heuristicks
for determining section type slightly. Previously, name-based deduction
(.symtab -> symtab) would take precedence over type-based (SHT_SYMTAB ->
symtab) one. In fact we would assert if we ran into a .text section with
type SHT_SYMTAB. Though unlikely to matter in practice, this order
seemed wrong to me, so I have inverted it.

Reviewers: clayborg, krytarowski, espindola

Subscribers: emaste, arichardson, lldb-commits

Differential Revision: https://reviews.llvm.org/D55706

llvm-svn: 349268

show more ...


# a6682a41 15-Dec-2018 Jonas Devlieghere <jonas@devlieghere.com>

Simplify Boolean expressions

This patch simplifies boolean expressions acorss LLDB. It was generated
using clang-tidy with the following command:

run-clang-tidy.py -checks='-*,readability-simplify-

Simplify Boolean expressions

This patch simplifies boolean expressions acorss LLDB. It was generated
using clang-tidy with the following command:

run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD

Differential revision: https://reviews.llvm.org/D55584

llvm-svn: 349215

show more ...


# ef8683ab 12-Dec-2018 Pavel Labath <pavel@labath.sk>

ELF: Clean up section type computation

Move code into a separate function, and replace the if-else chain with
llvm::StringSwitch.

A slight behavioral change is that now I use the section flags
(SHF

ELF: Clean up section type computation

Move code into a separate function, and replace the if-else chain with
llvm::StringSwitch.

A slight behavioral change is that now I use the section flags
(SHF_TLS) instead of the section name to set the thread-specific
property. There is no explanation in the original commit introducing
this (r153537) as to why that was done this way, but the new behavior
should be more correct.

llvm-svn: 348936

show more ...


# 5ea7ecdb 12-Dec-2018 Pavel Labath <pavel@labath.sk>

ELF: Simplify program header iteration

Instead of GetProgramHeaderCount+GetProgramHeaderByIndex, expose an
ArrayRef of all program headers, to enable range-based iteration.
Instead of GetSegmentData

ELF: Simplify program header iteration

Instead of GetProgramHeaderCount+GetProgramHeaderByIndex, expose an
ArrayRef of all program headers, to enable range-based iteration.
Instead of GetSegmentDataByIndex, expose GetSegmentData, taking a
program header (reference).

This makes the code simpler by enabling range-based loops and also
allowed to remove some null checks, as it became locally obvious that
some pointers can never be null.

llvm-svn: 348928

show more ...


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3
# 004bcb78 14-Nov-2018 George Rimar <grimar@accesssoftek.com>

[LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.".

Test cases were updated to not use the local compilation dir which
is different between development pc and build bots.

Ori

[LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.".

Test cases were updated to not use the local compilation dir which
is different between development pc and build bots.

Original commit message:

[LLDB] - Support the single file split DWARF.

DWARF5 spec describes a single file split dwarf case
(when .dwo sections are in the .o files).

Problem is that LLDB does not work correctly in that case.
The issue is that, for example, both .debug_info and .debug_info.dwo
has the same type: eSectionTypeDWARFDebugInfo. And when code searches
section by type it might find the regular debug section
and not the .dwo one.

The patch fixes that. With it, LLDB is able to work with
output compiled with -gsplit-dwarf=single flag correctly.

Differential revision: https://reviews.llvm.org/D52403

llvm-svn: 346855

show more ...


# 7cdb22b1 14-Nov-2018 George Rimar <grimar@accesssoftek.com>

Revert r346848 "[LLDB] - Support the single file split DWARF."

It broke BB:
http://green.lab.llvm.org/green/job/lldb-cmake/12522/testReport/junit/LLDB/Breakpoint/single_file_split_dwarf_test/

llvm-

Revert r346848 "[LLDB] - Support the single file split DWARF."

It broke BB:
http://green.lab.llvm.org/green/job/lldb-cmake/12522/testReport/junit/LLDB/Breakpoint/single_file_split_dwarf_test/

llvm-svn: 346853

show more ...


# 98963db5 14-Nov-2018 George Rimar <grimar@accesssoftek.com>

[LLDB] - Support the single file split DWARF.

DWARF5 spec describes a single file split dwarf case
(when .dwo sections are in the .o files).

Problem is that LLDB does not work correctly in that cas

[LLDB] - Support the single file split DWARF.

DWARF5 spec describes a single file split dwarf case
(when .dwo sections are in the .o files).

Problem is that LLDB does not work correctly in that case.
The issue is that, for example, both .debug_info and .debug_info.dwo
has the same type: eSectionTypeDWARFDebugInfo. And when code searches
section by type it might find the regular debug section
and not the .dwo one.

The patch fixes that. With it, LLDB is able to work with
output compiled with -gsplit-dwarf=single flag correctly.

Differential revision: https://reviews.llvm.org/D52296

llvm-svn: 346848

show more ...


# b37f1ec8 06-Nov-2018 Davide Italiano <davide@freebsd.org>

[ObjectFileELF] Fix misaligned read/writes caught by UBSan.

llvm-svn: 346244


# 6868d2dd 05-Nov-2018 Nathan Lanza <nathan@lanza.io>

Add a relocation to ObjectFileELF::ApplyRelocations and a test

Summary:
pcm files can end up being processed by lldb with relocations to be
made for the .debug_info section. When a R_AARCH64_ABS64 r

Add a relocation to ObjectFileELF::ApplyRelocations and a test

Summary:
pcm files can end up being processed by lldb with relocations to be
made for the .debug_info section. When a R_AARCH64_ABS64 relocation
was required lldb would hit an `assert(false)` and die.

Add R_AARCH64_ABS64 relocations to the S+A 64 bit width code path. Add
a test for R_AARCH64_ABS64 and R_AARCH64_ABS32 .rela.debug_info
relocations in a pcm file.

Reviewers: sas, xiaobai, davide, javed.absar, espindola

Reviewed By: davide

Subscribers: labath, zturner, emaste, mgorny, arichardson, kristof.beyls

Differential Revision: https://reviews.llvm.org/D51566

llvm-svn: 346171

show more ...


# 407c6910 02-Nov-2018 Davide Italiano <davide@freebsd.org>

Revert "[Symbol] Search symbols with name and type in a symbol file"

It broke MacOS buildbots.

llvm-svn: 346045


Revision tags: llvmorg-7.0.1-rc2
# 15da7684 02-Nov-2018 Aleksandr Urakov <aleksandr.urakov@jetbrains.com>

[Symbol] Search symbols with name and type in a symbol file

Summary:
This patch adds possibility of searching a public symbol with name and type in a
symbol file. It is helpful when working with PE,

[Symbol] Search symbols with name and type in a symbol file

Summary:
This patch adds possibility of searching a public symbol with name and type in a
symbol file. It is helpful when working with PE, because PE's symtabs contain
only imported / exported symbols only. Such a search is required for e.g.
evaluation of an expression that calls some function of the debuggee.

Reviewers: zturner, asmith, labath, clayborg, espindola

Reviewed By: clayborg

Subscribers: emaste, arichardson, aleksandr.urakov, jingham, lldb-commits, stella.stamenova

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D53368

llvm-svn: 345957

show more ...


Revision tags: llvmorg-7.0.1-rc1
# 8f3be7a3 01-Nov-2018 Jonas Devlieghere <jonas@devlieghere.com>

[FileSystem] Move path resolution logic out of FileSpec

This patch removes the logic for resolving paths out of FileSpec and
updates call sites to rely on the FileSystem class instead.

Differential

[FileSystem] Move path resolution logic out of FileSpec

This patch removes the logic for resolving paths out of FileSpec and
updates call sites to rely on the FileSystem class instead.

Differential revision: https://reviews.llvm.org/D53915

llvm-svn: 345890

show more ...


# 59b78bcb 01-Nov-2018 Jonas Devlieghere <jonas@devlieghere.com>

[FileSystem] Remove GetByteSize() from FileSpec

This patch removes the GetByteSize method from FileSpec and updates its
uses with calls to the FileSystem.

Differential revision: https://reviews.llv

[FileSystem] Remove GetByteSize() from FileSpec

This patch removes the GetByteSize method from FileSpec and updates its
uses with calls to the FileSystem.

Differential revision: https://reviews.llvm.org/D53788

llvm-svn: 345812

show more ...


# e4dee269 23-Oct-2018 George Rimar <grimar@accesssoftek.com>

[LLDB] - Implement the support for the .debug_loclists section.

This implements the support for .debug_loclists section, which is
DWARF 5 version of .debug_loc.

Currently, clang is able to emit it

[LLDB] - Implement the support for the .debug_loclists section.

This implements the support for .debug_loclists section, which is
DWARF 5 version of .debug_loc.

Currently, clang is able to emit it with the use of D53365.

Differential revision: https://reviews.llvm.org/D53436

llvm-svn: 345016

show more ...


# 6e357123 10-Oct-2018 George Rimar <grimar@accesssoftek.com>

[LLDB] - Add basic support for .debug_rnglists section (DWARF5)

This adds a basic support of the .debug_rnglists section.
Only the DW_RLE_start_length and DW_RLE_end_of_list entries are supported.

[LLDB] - Add basic support for .debug_rnglists section (DWARF5)

This adds a basic support of the .debug_rnglists section.
Only the DW_RLE_start_length and DW_RLE_end_of_list entries are supported.

Differential revision: https://reviews.llvm.org/D52981

llvm-svn: 344119

show more ...


Revision tags: llvmorg-7.0.0
# c6c7bfc4 13-Sep-2018 George Rimar <grimar@accesssoftek.com>

[LLDB] - Improved DWARF5 support.

This patch improves the support of DWARF5.
Particularly the reporting of source code locations.

Differential revision: https://reviews.llvm.org/D51935

llvm-svn: 3

[LLDB] - Improved DWARF5 support.

This patch improves the support of DWARF5.
Particularly the reporting of source code locations.

Differential revision: https://reviews.llvm.org/D51935

llvm-svn: 342153

show more ...


Revision tags: llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2
# 9e2fe8be 17-Aug-2018 Stephane Sezer <sas@cd80.net>

Add a relocation for R_AARCH64_ABS32 in ObjectFileELF

Summary:
.rela.debug_info relocations are being done via
ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case
that iterates o

Add a relocation for R_AARCH64_ABS32 in ObjectFileELF

Summary:
.rela.debug_info relocations are being done via
ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case
that iterates over the relocation type is only implemented for a few
different types and `assert(false)`es over the rest.

Implement the relocation for R_AARCH64_ABS32 in ApplyRelocations

Reviewers: sas, xiaobai, javed.absar, espindola

Reviewed By: sas

Subscribers: emaste, arichardson, kristof.beyls

Differential Revision: https://reviews.llvm.org/D50369

Change by Nathan Lanza <lanza@fb.com>

llvm-svn: 339974

show more ...


12345678910>>...15