History log of /llvm-project/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (Results 51 – 75 of 222)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 12489b54 20-Apr-2020 David Blaikie <dblaikie@gmail.com>

llvm-dwarfdump: Fix UB (unsequenced writes) introduced in e0fd87cc64d5

Unsequenced write due to "x &= f()" where 'f()' modifies 'x'.

Detected by the llvm-clang-x86_64-expensive-checks-win buildbot.

llvm-dwarfdump: Fix UB (unsequenced writes) introduced in e0fd87cc64d5

Unsequenced write due to "x &= f()" where 'f()' modifies 'x'.

Detected by the llvm-clang-x86_64-expensive-checks-win buildbot.
Investigated/identified by Galina - thanks!

show more ...


# 208a11ab 14-Apr-2020 David Blaikie <dblaikie@gmail.com>

Reapply "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries""

Originally committed as 416fa7720e30750939c53935051c6c750dfad2c2
Reverted (due to buildbot failure - breaking

Reapply "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries""

Originally committed as 416fa7720e30750939c53935051c6c750dfad2c2
Reverted (due to buildbot failure - breaking lldb) in 7a45aeacf3a23449039ef2efcf476995ae1c7007.

I still can't seem to build lldb locally, but Pavel Labath has kindly
provided a potential fix to preserve the old behavior in lldb by
registering a simple recoverable error handler there that prints to the
desired stream in lldb, rather than stderr.

show more ...


# 7a45aeac 11-Apr-2020 David Blaikie <dblaikie@gmail.com>

Revert "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries"

Broke an LLDB build bot & I can't seem to build LLDB locally to fix
forward...
http://lab.llvm.org:8011/builder

Revert "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries"

Broke an LLDB build bot & I can't seem to build LLDB locally to fix
forward...
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/15567/steps/test/logs/stdio

This reverts commit 416fa7720e30750939c53935051c6c750dfad2c2.

show more ...


# 416fa772 11-Apr-2020 David Blaikie <dblaikie@gmail.com>

llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries

This probably isn't ideal - the error was being printed specifically
inline with the dumping that was more legible - but

llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries

This probably isn't ideal - the error was being printed specifically
inline with the dumping that was more legible - but then the error
wasn't reported to stderr and didn't produce a non-zero exit code.

Probably the error message could be improved by adding more context now
that it isn't printed in-situ of the DIE dumping as much.

show more ...


# b1849231 10-Apr-2020 Fangrui Song <maskray@google.com>

[llvm-dwarfdump] Interface cleanup. NFC

This patch moves interface declarations into llvm-dwarfdump.h and wrap
declarations in anonymous namespaces as appropriate. At the same time,
the externals ar

[llvm-dwarfdump] Interface cleanup. NFC

This patch moves interface declarations into llvm-dwarfdump.h and wrap
declarations in anonymous namespaces as appropriate. At the same time,
the externals are moved into the `llvm::dwarfdump` namespace`.

Reviewed By: djtodoro

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

show more ...


# e0fd87cc 10-Apr-2020 David Blaikie <dblaikie@gmail.com>

llvm-dwarfdump: Return non-zero on error

Makes it easier to test "this doesn't produce an error" (& indeed makes
that the implied default so we don't accidentally write tests that have
silent/sneaky

llvm-dwarfdump: Return non-zero on error

Makes it easier to test "this doesn't produce an error" (& indeed makes
that the implied default so we don't accidentally write tests that have
silent/sneaky errors as well as the positive behavior we're testing for)

Though the support for applying relocations is patchy enough that a
bunch of tests treat lack of relocation application as more of a warning
than an error - so rather than me trying to figure out how to add
support for a bunch of relocation types, let's degrade that to a warning
to match the usage (& indeed, it's sort of more of a tool warning anyway
- it's not that the DWARF is wrong, just that the tool can't fully cope
with it - and it's not like the tool won't dump the DWARF, it just won't
follow/render certain relocations - I guess in the most general case it
might try to render an unrelocated value & instead render something
bogus... but mostly seems to be about interesting relocations used in
eh_frame (& honestly it might be nice if we were lazier about doing this
relocation resolution anyway - if you're not dumping eh_frame, should we
really be erroring about the relocations in it?))

show more ...


# 5e508b9b 02-Apr-2020 Djordje Todorovic <djordje.todorovic@syrmia.com>

[llvm-dwarfdump] Add the --show-sections-sizes option

Add an option to llvm-dwarfdump to calculate the bytes within
the debug sections. Dump this numbers when using --statistics
option as well.

Thi

[llvm-dwarfdump] Add the --show-sections-sizes option

Add an option to llvm-dwarfdump to calculate the bytes within
the debug sections. Dump this numbers when using --statistics
option as well.

This is an initial patch (e.g. we should support other units,
since we only support 'bytes' now).

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

show more ...


Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4
# 3e47f87e 10-Mar-2020 Djordje Todorovic <djordje.todorovic@syrmia.com>

[NFC][llvm-dwarfdump] Always use 'const Twine &'

According to the Twine.h comment, the Twines should only
be used as const references in arguments.

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

[NFC][llvm-dwarfdump] Always use 'const Twine &'

According to the Twine.h comment, the Twines should only
be used as const references in arguments.

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

show more ...


Revision tags: llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3
# d9466653 10-Dec-2019 Jonas Devlieghere <jonas@devlieghere.com>

[llvm/dwarfdump] Use the architecture string to filter.

Currently dwarfdump uses the ArchType to filter out architectures, which
is problematic for architectures like arm64e and x86_64h that map bac

[llvm/dwarfdump] Use the architecture string to filter.

Currently dwarfdump uses the ArchType to filter out architectures, which
is problematic for architectures like arm64e and x86_64h that map back
to arm64 and x86_64 respectively. The result is that the filter doesn't
work for these architectures because it matches all the variants. This
is especially bad because usually these architectures are the reason to
use the filter in the first place.

Instead, we should match the architecture based on the string name. This
means the filter works for the values printed by dwarfdump. It has the
unfortunate side effect of not working for aliases, like AArch64, but I
think that's worth the trade-off.

rdar://53653014

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

show more ...


Revision tags: llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1
# c9ddda84 08-Oct-2019 Kai Nacke <kai.nacke@redstar.de>

[Tools] Mark output of tools as text if it is text

Several LLVM tools write text files/streams without using OF_Text.
This can cause problems on platforms which distinguish between
text and binary o

[Tools] Mark output of tools as text if it is text

Several LLVM tools write text files/streams without using OF_Text.
This can cause problems on platforms which distinguish between
text and binary output. This PR adds the OF_Text flag for the
following tools:

- llvm-dis
- llvm-dwarfdump
- llvm-mca
- llvm-mc (assembler files only)
- opt (assembler files only)
- RemarkStreamer (used e.g. by opt)

Reviewers: rnk, vivekvpandya, Bigcheese, andreadb

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

llvm-svn: 374024

show more ...


Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3
# 9485b265 21-Jun-2019 James Henderson <jh7370@my.bristol.ac.uk>

[binutils] Add response file option to help and docs

Many LLVM-based tools already support response files (i.e. files
containing a list of options, specified with '@'). This change simply
updates th

[binutils] Add response file option to help and docs

Many LLVM-based tools already support response files (i.e. files
containing a list of options, specified with '@'). This change simply
updates the documentation and help text for some of these tools to
include it. I haven't attempted to fix all tools, just a selection that
I am interested in.

I've taken the opportunity to add some tests for --help behaviour, where
they were missing. We could expand these tests, but I don't think that's
within scope of this patch.

This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and
https://bugs.llvm.org/show_bug.cgi?id=42236.

Reviewed by: grimar, MaskRay, jkorous

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

llvm-svn: 364036

show more ...


# beb2493f 21-Jun-2019 James Henderson <jh7370@my.bristol.ac.uk>

[llvm-dwarfdump] Remove unnecessary explicit -h behaviour

--help and -h are automatically supported by the command-line parser,
unless overridden by the tool. The behaviour of the PrintHelpMessage
b

[llvm-dwarfdump] Remove unnecessary explicit -h behaviour

--help and -h are automatically supported by the command-line parser,
unless overridden by the tool. The behaviour of the PrintHelpMessage
being used for -h prior to this patch is subtly different to that
provided by --help automatically (it omits certain elements of help text
and options, such as --help-list), so overriding the default is not
desirable, without good reason. This patch removes the explicit
specification of -h and its behaviour, so that the default behaviour is
used.

Reviewed by: hintonda

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

llvm-svn: 364029

show more ...


# 891cdaab 14-Jun-2019 James Henderson <jh7370@my.bristol.ac.uk>

[docs][llvm-dwarfdump] Make the --show-parents and --show-children help text and docs more consistent and correct

The docs and help text for --show-parents and --show-children were a bit
inconsisten

[docs][llvm-dwarfdump] Make the --show-parents and --show-children help text and docs more consistent and correct

The docs and help text for --show-parents and --show-children were a bit
inconsistent. The help text claimed they had an effect when "=<offset>"
was used, whereas the doc said it had an effect when "--find" or
"--name" were used. This change changes the doc to mention "=<offset>"
and removes this reference from the help text, to avoid having a very
long description in the help text (it still says "when selectively
printing entries").

Reviewed by: JDevlieghere, aprantl

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

llvm-svn: 363380

show more ...


# 94879632 11-Jun-2019 James Henderson <jh7370@my.bristol.ac.uk>

[llvm-dwarfdump] Simplify --ignore-case help text and documentation

There was a typo in the --ignore-case help text that was copied into the
llvm-dwarfdump command-guide. Additionally, this patch si

[llvm-dwarfdump] Simplify --ignore-case help text and documentation

There was a typo in the --ignore-case help text that was copied into the
llvm-dwarfdump command-guide. Additionally, this patch simplifies the
wording, since it was unnecessarily verbose: the switch applies for
searching in general and doesn't need explicitly stating different
search modes (which might go out-of-date as options are added or
removed).

Reviwed by: JDevlieghere

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

llvm-svn: 363066

show more ...


# d5f38dae 11-Jun-2019 James Henderson <jh7370@my.bristol.ac.uk>

[llvm-dwarfdump] Add -o to help text and remove --out-file from doc

-o is in the documentation, but not in the llvm-dwarfdump help text.
This patch adds it by inverting the -o and --out-file aliasin

[llvm-dwarfdump] Add -o to help text and remove --out-file from doc

-o is in the documentation, but not in the llvm-dwarfdump help text.
This patch adds it by inverting the -o and --out-file aliasing. It also
removes --out-file from the documentation, since we don't really want
people to be using this switch in practice.

Reviewed by: aprantl, JDevlieghere, dblaikie

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

llvm-svn: 363044

show more ...


Revision tags: llvmorg-8.0.1-rc2
# 0da8160d 24-May-2019 Jonas Devlieghere <jonas@devlieghere.com>

[dwarfdump] Add flag to limit the number of parents DIEs

This adds `-parent-recurse-depth` which limits the number of parent DIEs
being dumped.

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

[dwarfdump] Add flag to limit the number of parents DIEs

This adds `-parent-recurse-depth` which limits the number of parent DIEs
being dumped.

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

llvm-svn: 361671

show more ...


Revision tags: llvmorg-8.0.1-rc1
# b5f39845 24-Apr-2019 Fangrui Song <maskray@google.com>

[CommandLine] Provide parser<unsigned long> instantiation to allow cl::opt<uint64_t> on LP64 platforms

Summary:
And migrate opt<unsigned long long> to opt<uint64_t>

Fixes PR19665

Differential Revi

[CommandLine] Provide parser<unsigned long> instantiation to allow cl::opt<uint64_t> on LP64 platforms

Summary:
And migrate opt<unsigned long long> to opt<uint64_t>

Fixes PR19665

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

llvm-svn: 359068

show more ...


# ce2d45e7 04-Apr-2019 Adrian Prantl <aprantl@apple.com>

llvm-dwarfdump: Support alternative architecture names in the -arch filter

<rdar://problem/47918606>

llvm-svn: 357706


# 95db9572 27-Mar-2019 Fangrui Song <maskray@google.com>

[llvm-dwarfdump] Simplify -o handling

ToolOutputFile handles '-' so no need to specialize here.
Also, we neither reassign the variable nor pass it around, thus no need
to use std::unique_ptr<ToolOut

[llvm-dwarfdump] Simplify -o handling

ToolOutputFile handles '-' so no need to specialize here.
Also, we neither reassign the variable nor pass it around, thus no need
to use std::unique_ptr<ToolOutputFile>.

exit(1) -> return 1; to call the destructor of raw_fd_stream

llvm-svn: 357051

show more ...


Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3
# 77fc1f60 27-Feb-2019 Alexey Lapshin <a.v.lapshin@mail.ru>

[DebugInfo] add SectionedAddress to DebugInfo interfaces.

That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
"wrong line number info for obj file compiled with -ffunction

[DebugInfo] add SectionedAddress to DebugInfo interfaces.

That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
"wrong line number info for obj file compiled with -ffunction-sections"
bug. The problem happened with only .o files. If object file contains
several .text sections then line number information showed incorrectly.
The reason for this is that DwarfLineTable could not detect section which
corresponds to specified address(because address is the local to the
section). And as the result it could not select proper sequence in the
line table. The fix is to pass SectionIndex with the address. So that it
would be possible to differentiate addresses from various sections. With
this fix llvm-objdump shows correct line numbers for disassembled code.

Differential review: https://reviews.llvm.org/D58194

llvm-svn: 354972

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 ...


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3
# 6db3a6a4 23-Nov-2018 Luke Cheeseman <luke.cheeseman@arm.com>

Revert r347490 as it breaks address sanitizer builds

llvm-svn: 347499


# d6dbd641 23-Nov-2018 Luke Cheeseman <luke.cheeseman@arm.com>

Revert r343341

- Cannot reproduce the build failure locally and the build logs have
been deleted.

llvm-svn: 347490


Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1
# 73766ccf 24-Oct-2018 Paul Robinson <paul.robinson@sony.com>

Make llvm-dwarfdump -name work on type units.

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

llvm-svn: 345203


# 3ef53e10 23-Oct-2018 Jonas Devlieghere <jonas@devlieghere.com>

[dwarfdump] Make incompatibility between -diff and -verbose explicit.

Using -diff and -verbose together doesn't work today. We should audit
where these two options interact and fix them. In the mean

[dwarfdump] Make incompatibility between -diff and -verbose explicit.

Using -diff and -verbose together doesn't work today. We should audit
where these two options interact and fix them. In the meantime we error
out when the user try to specify both.

llvm-svn: 345084

show more ...


123456789