Commit Graph

1075 Commits

Author SHA1 Message Date
Timm Baeder
cfe26358e3 Reapply "[clang] Avoid re-evaluating field bitwidth" (#122289) 2025-01-11 07:12:37 +01:00
Michael Buch
ac50294995 Revert "[lldb][test] Add test-coverage for DW_AT_APPLE_objc_complete_type parsing (#120279)"
This reverts commit 000febd029.

This is failing on the macOS public buildbots. It's unclear
to me why (I can't reproduce the failure on my local M1 machine).
I suspect the test might be relying on some non-deterministic
linker properties (such as order of entries in the debug-map
or something like that). The failure is as follows:
```
CHECK-NEXT: expected string not found in input
              ^
<stdin>:25:7: note: scanning from here
 y = 2
      ^
<stdin>:27:4: note: possible intended match here
(lldb) exit
   ^

Input file: <stdin>
Check file: /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/Shell/Expr/TestObjCHiddenIvars.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
          20: (lldb) expression *f
          21: (Foo) $0 = {
          22:  NSObject = {
          23:  isa = Foo
          24:  }
          25:  y = 2
next:21'0           X error: no match found
          26: }
next:21'0     ~~
          27: (lldb) exit
next:21'0     ~~~~~~~~~~~~
next:21'1        ?         possible intended match
>>>>>>
```
2024-12-23 10:43:35 +00:00
Michael Buch
000febd029 [lldb][test] Add test-coverage for DW_AT_APPLE_objc_complete_type parsing (#120279)
When given a DIE for an Objective-C interface (which doesn't have a
`DW_AT_APPLE_objc_complete_type`), the `DWARFASTParserClang` will try to
find the DIE which corresponds to the implementation to complete the
interface DIE. The code is here:

d2e7ee77d3/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (L1718-L1738)

However, this was currently not exercised in our test-suite (removing
the code above didn't fail any LLDB test).

This patch adds a test which exercises this codepath (it will fail if we
don't fetch the implementation DIE in the `DWARFASTParserClang`).

Something that's not currently clear to me is why `frame var *f`
succeeds even without the `DW_AT_APPLE_objc_complete_type`
infrastructure. If it's using the ObjC runtime, we should make `expr` do
the same, in which case we can remove this code from
`DWARFASTParserClang`.
2024-12-20 12:16:19 +00:00
Dhruv Srivastava
0c6860622c [lldb][AIX] Header Parsing for XCOFF Object File in AIX (#116338)
This PR is in reference to porting LLDB on AIX.

Link to discussions on llvm discourse and github:
1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640
2. https://github.com/llvm/llvm-project/issues/101657
The complete changes for porting are present in this draft PR:
https://github.com/llvm/llvm-project/pull/102601

Added XCOFF Object File Header Parsing for AIX.

Details about XCOFF file format on AIX:
[XCOFF](https://www.ibm.com/docs/en/aix/7.3?topic=formats-xcoff-object-file-format)
2024-12-18 12:44:31 +00:00
Michael Buch
9fc54c0e80 [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (#120154)
In Objective-C, forward declarations are currently represented as:
```
DW_TAG_structure_type
  DW_AT_name                ("Foo")
  DW_AT_declaration         (true)
  DW_AT_APPLE_runtime_class (DW_LANG_ObjC)
```
However, when compiling with `-gmodules`, when a class definition is
turned into a forward declaration within a `DW_TAG_module`, the DIE for
the forward declaration looks as follows:
```
DW_TAG_structure_type
  DW_AT_name                ("Foo")
  DW_AT_declaration         (true)
```

Note the absence of `DW_AT_APPLE_runtime_class`. With recent changes in
LLDB, not being able to differentiate between C++ and Objective-C
forward declarations has become problematic (see attached test-case and
explanation in https://github.com/llvm/llvm-project/pull/119860).
2024-12-17 16:40:10 +00:00
Adrian Prantl
3fcc302af3 [lldb] Add a progress event for executing an expression (#119757)
Expressions can take arbitrary amounts of time to run, so IDEs might
want to be informed about the fact that an expression is currently being
executed.

rdar://141253078
2024-12-13 09:09:57 -08:00
Adrian Prantl
fffe8c6684 [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples
This PR adds a proof-of-concept for a bytecode designed to ship and
run LLDB data formatters. More motivation and context can be found in
the formatter-bytecode.rst file and on discourse.

https://discourse.llvm.org/t/a-bytecode-for-lldb-data-formatters/82696

Relanding with a fix for a case-sensitive path.
2024-12-06 16:27:16 -08:00
Adrian Prantl
b504c8771f Revert "[lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples"
This reverts commit 60380cd27c.
2024-12-06 16:26:55 -08:00
Adrian Prantl
60380cd27c [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples
This PR adds a proof-of-concept for a bytecode designed to ship and
run LLDB data formatters. More motivation and context can be found in
the formatter-bytecode.rst file and on discourse.

https://discourse.llvm.org/t/a-bytecode-for-lldb-data-formatters/82696

Relanding with a fix for a case-sensitive path.
2024-12-06 16:10:09 -08:00
Adrian Prantl
8ab76a47b2 Revert "[lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples"
This reverts commit 7e3da87ca896484a11ac09df297183147154ac91.

I managed to break the bots.
2024-12-06 15:34:12 -08:00
Adrian Prantl
0ee364d2a2 [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (#113398)
This PR adds a proof-of-concept for a bytecode designed to ship and run
LLDB data formatters. More motivation and context can be found in the
`formatter-bytecode.md` file and on discourse.

https://discourse.llvm.org/t/a-bytecode-for-lldb-data-formatters/82696
2024-12-06 15:11:21 -08:00
Zequan Wu
2e425bf629 Reapply "[lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter (#117071)"
9de73b2040 lands a fix to DWARFTypePrinter that is used by lldb in this change.
2024-12-04 13:05:36 -08:00
Greg Clayton
f44bee78c4 [lldb] Fix the DWARF index cache when index is partial. (#118390)
The ManualDWARFIndex class can create a index cache if the LLDB index
cache is enabled. This used to save the index to the same file,
regardless of wether the cache was a full index (no .debug_names) or a
partial index (have .debug_names, but not all .o files were had
.debug_names). So we could end up saving an index cache that was
partial, and then later load that partial index as if it were a full
index if the user set the 'settings set
plugin.symbol-file.dwarf.ignore-file-indexes true'. This would cause us
to ignore the .debug_names section, and if the index cache was enabled,
we could end up loading the partial index as if it were a full DWARF
index.

This patch detects when the ManualDWARFIndex is being used with
.debug_names, and saves out a cache file with a suffix of "-full" or
"-partial" to avoid this issue.
2024-12-03 10:09:40 -08:00
Pavel Labath
8c749ff8aa [lldb] Fix "exact match" debug_names type queries (#118465)
.. in the global namespace

The problem was the interaction of #116989 with an optimization in
GetTypesWithQuery. The optimization was only correct for non-exact
matches, but that didn't matter before this PR due to the "second layer
of defense". After that was removed, the query started returning more
types than it should.
2024-12-03 15:18:59 +01:00
Pavel Labath
51b74bb9f6 Reapply "[lldb] Use the function block as a source for function ranges (#117996)"
This reverts commit 2526d5b168, reapplying
ba14dac481 after fixing the conflict with
 #117532. The change is that Function::GetAddressRanges now recomputes
the returned value instead of returning the member. This means it now
returns a value instead of a reference type.
2024-12-03 11:58:36 +01:00
Pavel Labath
2526d5b168 Revert "[lldb] Use the function block as a source for function ranges (#117996)"
This reverts commit ba14dac481. I guess
"has no conflicts" doesn't mean "it will build".
2024-12-03 10:27:31 +01:00
Pavel Labath
ba14dac481 [lldb] Use the function block as a source for function ranges (#117996)
This is a follow-up/reimplementation of #115730. While working on that
patch, I did not realize that the correct (discontinuous) set of ranges
is already stored in the block representing the whole function. The
catch -- ranges for this block are only set later, when parsing all of
the blocks of the function.

This patch changes that by populating the function block ranges eagerly
-- from within the Function constructor. This also necessitates a
corresponding change in all of the symbol files -- so that they stop
populating the ranges of that block. This allows us to avoid some
unnecessary work (not parsing the function DW_AT_ranges twice) and also
results in some simplification of the parsing code.
2024-12-03 10:21:04 +01:00
Pavel Labath
59bb9b915e [lldb] Expose discontinuous functions through SBFunction::GetRanges (#117532)
SBFunction::GetEndAddress doesn't really make sense for discontinuous
functions, so I'm declaring it deprecated. GetStartAddress sort of makes
sense, if one uses it to find the functions entry point, so I'm keeping
that undeprecated.

I've made the test a Shell tests because these make it easier to create
discontinuous functions regardless of the host os and architecture. They
do make testing the python API harder, but I think I've managed to come
up with something not entirely unreasonable.
2024-12-03 10:14:33 +01:00
Ilia Kuklin
4be09f0624 [lldb][test] DW_OP_piece-O3.c: Disable on Windows (#117355)
#117168
2024-11-22 23:16:08 +05:00
Ilia Kuklin
dc637e940c Revert "[lldb] Fix DW_OP_piece-O3 test on AArch64 Windows" (#117354)
Reverts llvm/llvm-project#117336
2024-11-22 22:51:11 +05:00
Ilia Kuklin
720a4c70ed [lldb] Fix DW_OP_piece-O3 test on AArch64 Windows (#117336)
Making a breakpoint on a line causes an error on aarch64-pc-windows.
This patch changes the test so that a breakpoint can be made on a
function name.
#117168
2024-11-22 20:30:55 +05:00
Mikhail Goncharov
11ee21671f Revert " [lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter (#117071)"
This reverts commit f06c187799.

Temporary revert: there is https://github.com/llvm/llvm-project/pull/117239 that is suppose to fix the issue.
Reverting to keep things rolling.
2024-11-22 13:49:37 +01:00
Pavel Labath
d71fa331df [lldb] Fix inline function resolution for discontinuous functions (#116777)
The problem here is the assumption that the entire function will be
placed in a single section. This will ~never be the case for a
discontinuous function, as the point of splitting the function is to let
the linker group parts of the function according to their "hotness".

The fix is to change the offset computation to use file addresses
instead.
2024-11-22 08:32:47 +01:00
Jacob Lalonde
0a7242959f [LLDB][ProcessELFCore] Add Description to ProcessELFCore/ELFThread stop reasons (#110065)
This fixes a functionality gap with GDB, where GDB will properly decode
the stop reason and give the address for SIGSEGV. I also added
descriptions to all stop reasons, following the same code path that the
Native Linux Thread uses.
2024-11-21 14:47:08 -08:00
Ilia Kuklin
915d588b1a Reapply "[lldb] Convert file address to load address when reading memory for DW_OP_piece" (#117168)
This commit fixes the test so that the breakpoint is triggered correctly
after `array` usage on AArch64.

Reapplies #116411 with a fix.
2024-11-21 21:33:01 +05:00
Zequan Wu
f06c187799 [lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter (#117071)
This is a reland of https://github.com/llvm/llvm-project/pull/112811.
Fixed the bot breakage by running ld.lld explicitly.
2024-11-20 17:19:35 -05:00
Ilia Kuklin
de6d1683d4 Revert "[lldb] Convert file address to load address when reading memory for DW_OP_piece" (#116824)
Reverts llvm/llvm-project#116411
2024-11-19 20:39:29 +05:00
Ilia Kuklin
27dcae53eb [lldb] Convert file address to load address when reading memory for DW_OP_piece (#116411)
When parsing an optimized value and reading a piece from a file address,
LLDB tries to read the data from memory using that address.
This patch converts file address to load address before reading the
memory.

Fixes #111313
Fixes #97484
2024-11-19 19:37:32 +05:00
Greg Clayton
c526eb891b Fix buildbots with no x86 target.
Fix for: https://github.com/llvm/llvm-project/pull/116689
2024-11-18 19:37:56 -08:00
Shubham Sandeep Rastogi
c51786b022 Revert "[lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter (#112811)"
This reverts commit 94d100f2ba.

Reverted because of greendragon failure on the incremental arm64 bot

******************** TEST 'lldb-shell :: SymbolFile/DWARF/x86/simplified-template-names.cpp' FAILED ********************
Exit Code: 1

RUN: at line 7: /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang --driver-mode=g++ --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-linux -g -gsimple-template-names /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/Shell/SymbolFile/DWARF/x86/simplified-template-names.cpp -o /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/test/Shell/SymbolFile/DWARF/x86/Output/simplified-template-names.cpp.tmp

/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/bin/clang --driver-mode=g++ --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-pc-linux -g -gsimple-template-names /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/test/Shell/SymbolFile/DWARF/x86/simplified-template-names.cpp -o /Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/tools/lldb/test/Shell/SymbolFile/DWARF/x86/Output/simplified-template-names.cpp.tmp
ld: warning: -m is obsolete
ld: unknown option: --hash-style=gnu
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2024-11-18 17:19:38 -08:00
Greg Clayton
5ae4d505c3 Add support for reading the dynamic symbol table from PT_DYNAMIC (#116689)
Resubmissions of https://github.com/llvm/llvm-project/pull/112596 with
buildbot fixes.

Allow LLDB to parse the dynamic symbol table from an ELF file or memory
image in an ELF file that has no section headers. This patch uses the
ability to parse the PT_DYNAMIC segment and find the DT_SYMTAB,
DT_SYMENT, DT_HASH or DT_GNU_HASH to find and parse the dynamic symbol
table if the section headers are not present. It also adds a helper
function to read data from a .dynamic key/value pair entry correctly
from the file or from memory.
2024-11-18 16:25:19 -08:00
Zequan Wu
94d100f2ba [lldb][dwarf] Compute fully qualified names on simplified template names with DWARFTypePrinter (#112811)
This is the second half of
https://github.com/llvm/llvm-project/pull/90008.

Essentially, it replaces the work of resolving template types when we
just need the qualified names with walking the DIE tree using
`DWARFTypePrinter`.

### Result
For an internal target, the time spent on `expr *this` for the first
time reduced from 28 secs to 17 secs.
2024-11-18 17:45:54 -05:00
Stefan Gränitz
1d0b285122 [lldb] Relax check for breakpoint site in Unwind/windows-unaligned-x86_64.test (#115318)
This test checks the thread backtrace for entries of intermediate frames
that aren't aligned to 16 bytes. In order to do that, it sets a single
breakpoint and makes sure we stop there. It seems sufficient, however,
to check that we hit the breakpoint itself and not which particular
site.
2024-11-18 21:14:55 +01:00
Shubham Sandeep Rastogi
f14e1a8597 Revert "Add support for reading the dynamic symbol table from PT_DYNAMIC (#112596)"
This reverts commit a7b2e73bca.

This patch broke the greendragon bot

Failed Tests (10):
  lldb-api :: python_api/sbplatform/TestLocateModuleCallback.py
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithModuleAndSymbol
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithOnlySymbol
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolAsModule
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolAsModuleAndSymbol
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolByPlatformUUID
  lldb-unit :: Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleWithCachedModuleAndSymbol
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPut
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPutStrangeHostname
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPutUuidExists
2024-11-18 11:09:58 -08:00
Greg Clayton
a7b2e73bca Add support for reading the dynamic symbol table from PT_DYNAMIC (#112596)
Allow LLDB to parse the dynamic symbol table from an ELF file or memory
image in an ELF file that has no section headers. This patch uses the
ability to parse the PT_DYNAMIC segment and find the DT_SYMTAB,
DT_SYMENT, DT_HASH or DT_GNU_HASH to find and parse the dynamic symbol
table if the section headers are not present. It also adds a helper
function to read data from a .dynamic key/value pair entry correctly
from the file or from memory.
2024-11-18 10:18:11 -08:00
Stefan Gränitz
e370946978 [lldb] Infer MSInheritanceAttr for CXXRecordDecl with DWARF on Windows (#115177)
Following up from https://github.com/llvm/llvm-project/pull/112928, we
can reuse the approach from Clang Sema to infer the MSInheritanceModel
and add the necessary attribute manually. This allows the inspection of
member function pointers with DWARF on Windows.
2024-11-18 11:10:10 +01:00
Pavel Labath
4e7682b1c4 [lldb] rm DWARFDebugRanges (#116379)
The class is only used from one place, which is trivial to implement
using the llvm class.

The main difference is that in the new implementation, the ranges are
parsed each time anew (instead of being parsed at startup and cached). I
believe this is fine because:
- this is already how things work with DWARF v5 debug_rnglists
- parsing debug_ranges is fairly fast (definitely faster than rnglists)
- generally, this result will be cached at a higher level anyway.
Browsing the code I did find one instance where that is not the case --
SymbolFileDWARF::ResolveFunctionAndBlock -- which is called each time we
resolve an address (to the block level). However, this function is
already pretty suboptimal: it first traverses the DIE tree (which
involves parsing all the DIE attributes) to find the correct block, then
it parses them again to construct the `lldb_private::Block`
representation, and *then* it uses the ID of the block DIE it found in
the first step to look up the `Block` object. If this turns out to be a
bottleneck, I think there are better ways to optimize it than caching
the debug_ranges parse.

The motiviation for this is that DWARFDebugRanges sorts the block
ranges, even though the order of the ranges is load-bearing (in the
absence of DW_AT_low_pc, the "base address" of a scope is determined by
the first range entry). Delaying the parsing (and sorting) step makes it
easier to access the first entry.
2024-11-18 10:21:49 +01:00
Vladislav Dzhidzhoev
e0b76bafde [lldb][test] Disable inline_sites_live.cpp for non-Windows targets (#116196)
This is a follow-up for the conversation here
https://github.com/llvm/llvm-project/pull/115722/.

This test is designed for Windows target/PDB format, so it shouldn't be
built and run for DWARF/etc.
2024-11-15 14:15:29 +01:00
Dmitry Vasilyev
905256ad2f [lldb] Fixed find-module.test in case of a remote target (#116198)
Changing from UNSUPPOERTED to XFAIL in #94165 break x86 linux host /
Aarch64 linux target build
https://lab.llvm.org/buildbot/#/builders/195/builds/1047
2024-11-14 15:00:54 +04:00
Dmitry Vasilyev
3d3b0bc239 [lldb] Disable find-module.test in case of a remote target (#94165)
The target arch is `i386-pc-windows` after loading the dump. It updates
to `i386-pc-windows-msvc` or `i386-pc-windows-gnu` in
lldb\source\Plugins\Process\minidump\ProcessMinidump.cpp, line 218
```
GetTarget().MergeArchitecture(module->GetArchitecture());
```
But in case of the remote target (`remote-linux`) and the `Windows host`
lldb executed the following commands at the beginning
```
platform select remote-linux
platform connect connect://<ip>:<port>
```
and then the target arch is `i386-pc-windows-msvc` immediately after
loading the dump.
GetTarget().MergeArchitecture(module->GetArchitecture()) does not update
it to `i386-pc-windows-gnu` when the module arch is
`i386-pc-windows-gnu`.

---------

Co-authored-by: Pavel Labath <pavel@labath.sk>
2024-11-14 11:28:17 +04:00
Vladislav Dzhidzhoev
0afdac41ce [lldb][test] Fix inline_sites_live.cpp Shell when run on Windows remotely from Linux (#115722)
This test fails on
https://lab.llvm.org/staging/#/builders/197/builds/76/steps/18/logs/FAIL__lldb-shell__inline_sites_live_cpp
because of a little difference in the lldb output.

```
# .---command stderr------------
# | C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\Shell\SymbolFile\NativePDB\inline_sites_live.cpp:25:11: error: CHECK: expected string not found in input
# | // CHECK: * thread #1, stop reason = breakpoint 1
# |           ^
# | <stdin>:1:1: note: scanning from here
# | (lldb) platform select remote-linux
# | ^
# | <stdin>:28:27: note: possible intended match here
# | * thread #1, name = 'inline_sites_li', stop reason = breakpoint 1.3
# |                           ^
# | 

```
2024-11-13 18:49:32 +01:00
Vladislav Dzhidzhoev
20c4e95b9c [lldb][test] Fix remote Shell tests failures on Windows host (#115716)
Since the remote Shell test execution feature was added, these tests
should now be disabled on Windows target instead of Windows host.

It should fix failures on
https://lab.llvm.org/staging/#/builders/197/builds/76.
2024-11-12 18:03:24 +01:00
Pavel Labath
2a3c08f620 [lldb] (Begin to) support discontinuous lldb_private::Functions (#115730)
This is the beginning of a different, more fundamental approach to
handling. This PR tries to tries to minimize functional changes. It only
makes sure that we store the true set of ranges inside the function
object, so that subsequent patches can make use of it.
2024-11-12 09:34:53 +01:00
Dhruv Srivastava
ca4cd08fb9 [lldb][AIX] Added XCOFF Object File Header for AIX (#111814)
Added XCOFF Object File Header for AIX.

Added base functionality for XCOFF support. Will enhance the files in
incremental PRs

Details about XCOFF file format on AIX:
[XCOFF](https://www.ibm.com/docs/en/aix/7.3?topic=formats-xcoff-object-file-format)
2024-11-12 09:34:25 +01:00
Jonas Devlieghere
f109517d15 [lldb] Support overriding the disassembly CPU & features (#115382)
Add the ability to override the disassembly CPU and CPU features through
a target setting (`target.disassembly-cpu` and
`target.disassembly-features`) and a `disassemble` command option
(`--cpu` and `--features`).

This is especially relevant for architectures like RISC-V which relies
heavily on CPU extensions.

The majority of this patch is plumbing the options through. I recommend
looking at DisassemblerLLVMC and the test for the observable change in
behavior.
2024-11-11 16:27:15 -08:00
Pavel Labath
d8ebb08a89 [lldb] Have disassembler show load addresses when using a core file (#115453)
We got a bug report that the disassember output was not relocated (i.e.
a load address) for a core file (like it is for a live process). It
turns out this behavior it depends on whether the instructions were read
from an executable file or from process memory (a core file will not
typically contain the memory image for segments backed by an executable
file).

It's unclear whether this behavior is intentional, or if it was just
trying to handle the case where we're dissassembling a module without a
process, but I think it's undesirable. What makes it particularly
confusing is that the instruction addresses are relocated in this case
(unlike the when we don't have a process), so with large files and
adresses it gets very hard to see whether the relocation has been
applied or not.

This patch removes the data_from_file check so that the instruction is
relocated regardless of where it was read from. It will still not get
relocated for the raw module use case, as those can't be relocated
anywhere as they don't have a load address.
2024-11-11 08:18:29 +01:00
SpencerAbson
bbcd35270e Revert "[AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (#114… (#115539)
…293)"

This reverts commit da9499ebfb.
2024-11-08 20:19:31 +00:00
SpencerAbson
da9499ebfb [AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (#114293)
This patch introduces the amended feature flag for
[FEAT_SVE_AES](https://developer.arm.com/documentation/109697/2024_09/Feature-descriptions/The-Armv9-0-architecture-extension?lang=en#md457-the-armv90-architecture-extension__feat_FEAT_SVE_AES),
'**sve-aes**'. The existing flag associated with this feature,
'sve2-aes' must be retained as an alias of 'sve-aes' and 'sve2' for
backwards compatibility.

The
[ACLE](https://github.com/ARM-software/acle/blob/main/main/acle.md#aes-extension)
documents `__ARM_FEATURE_SVE2_AES`, which was previously defined to 1
when

> there is hardware support for the SVE2 AES (FEAT_SVE_AES) instructions
and if the associated ACLE intrinsics are available.

The front-end has been amended such that it is compatible with +sve2-aes
and +sve2+sve-aes.
2024-11-08 15:07:05 +00:00
Jonas Devlieghere
4d4024e1ed [lldb] Set MallocNanoZone for all sanitizers when running tests
Disabling MallocNanoZone is necessary for both ASan and TSan.
2024-11-06 09:59:35 -08:00
Walter Erquinigo
c1df376b0c [LLDB] Finish implementing support for DW_FORM_data16 (#113508)
This FORM already has support within LLDB to be parsed as a 16-byte
BLOCK, and all that is left to properly support it in the DWARFParser is
to add it to some enums.

With this, I can debug programs that use libstdc++.so.6.0.33 built with
GCC.
2024-11-01 17:33:08 -04:00