History log of /llvm-project/lldb/source/Target/StackFrame.cpp (Results 1 – 25 of 231)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# 66a88f62 10-Jan-2025 Pavel Labath <pavel@labath.sk>

[lldb] Add Function::GetAddress and redirect some uses (#115836)

Many calls to Function::GetAddressRange() were not interested in the
range itself. Instead they wanted to find the address of the fun

[lldb] Add Function::GetAddress and redirect some uses (#115836)

Many calls to Function::GetAddressRange() were not interested in the
range itself. Instead they wanted to find the address of the function
(its entry point) or the base address for relocation of function-scoped
entities (technically, the two don't need to be the same, but there's
isn't good reason for them not to be). This PR creates a separate
function for retrieving this, and changes the existing
(non-controversial) uses to call that instead.

show more ...


Revision tags: llvmorg-19.1.6
# e68a3e4d 06-Dec-2024 Ping Charoenwet <wachiraph.c@gmail.com>

[lldb] Fix typos in `StackFrame.cpp` (#118991)


Revision tags: llvmorg-19.1.5
# 8f8dcedb 20-Nov-2024 Adrian Prantl <aprantl@apple.com>

Rename GetLanguageInfo to GetLanguageSpecificData (#117012)

Unbeknownst to me the Swift LLDB branch already had an almost identical
API with this name, so it makes sense to merge the two.


# e660e650 20-Nov-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Add an API to derive language-specific runtime information (#116904)

This is motivated by exposing some Swift language-specific flags through
the API, in the example here it is used to commu

[lldb] Add an API to derive language-specific runtime information (#116904)

This is motivated by exposing some Swift language-specific flags through
the API, in the example here it is used to communicate the Objective-C
runtime version. This could also be a meaningful extension point to get
information about "embedded: languages, such as extracting the C++
version in an Objective-C++ frame or something along those lines.

show more ...


# 0394e08b 20-Nov-2024 Pavel Labath <pavel@labath.sk>

[lldb] Reword the "line 0" warning (#116827)

We got a bug report that this message is confusing. In this particular
case, the line zero was due to compiler tail merging (in optimized
code). The ma

[lldb] Reword the "line 0" warning (#116827)

We got a bug report that this message is confusing. In this particular
case, the line zero was due to compiler tail merging (in optimized
code). The main issue was the "no source code" part: in this case it's
kind of incorrect because -- even though we can't really know that --
the address is arguably associated with *multiple* lines of source code.

I've tried to make the new wording more neutral, and added a wink
towards compiler optimizations. I left out the "compiler generated" part
of the message because I couldn't find a way to squeeze that in nicely.
I'm also not entirely sure what it was referring to -- if this was
(just) function prologue/epilogue, then maybe leaving it out is fine, as
we're not likely to stop there anyway (?)

I also left out the function name, because:
- for template functions it gets rather long
- it's already present in the message, potentially twice (once in the
"frame summary" line and once in the snippet of code we show for the
function declaration)

---------

Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>

show more ...


Revision tags: llvmorg-19.1.4
# 1857d297 15-Nov-2024 Med Ismail Bennani <ismail@bennani.ma>

[lldb/Target] Add null-check before dereferencing inlined_info (NFC) (#116300)

This patch is a follow-up to 9c7701fa78037af03be10ed168fd3c75a2ed1aef
and adds extra-null checks before dereferencing

[lldb/Target] Add null-check before dereferencing inlined_info (NFC) (#116300)

This patch is a follow-up to 9c7701fa78037af03be10ed168fd3c75a2ed1aef
and adds extra-null checks before dereferencing the inlined_info
pointer.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

show more ...


# 9c7701fa 14-Nov-2024 Med Ismail Bennani <ismail@bennani.ma>

[lldb/API] Hoist some of SBFrame logic to lldb_private::StackFrame (NFC) (#116298)

This patch moves some of the logic implemented in the SBFrame APIs to
the lldb_private::StackFrame class so it can

[lldb/API] Hoist some of SBFrame logic to lldb_private::StackFrame (NFC) (#116298)

This patch moves some of the logic implemented in the SBFrame APIs to
the lldb_private::StackFrame class so it can be re-used elsewhere.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

show more ...


# 310351d9 14-Nov-2024 cmtice <cmtice@google.com>

[LLDB] Add framework for Data Inspection Language (DIL) work. (#115666)

Add the framework code for hooking up and calling the Data Inspection
Language (DIL) implementation, as an alternate implemen

[LLDB] Add framework for Data Inspection Language (DIL) work. (#115666)

Add the framework code for hooking up and calling the Data Inspection
Language (DIL) implementation, as an alternate implementation for the
'frame variable' command. For now, this is an opt-in option, via a
target setting 'target.experimental.use-DIL'. See
https://discourse.llvm.org/t/rfc-data-inspection-language/69893 for more
information about this project.

This PR does not actually call any of the DIL code; instead the piece
that will eventually call the DIL code
(StackFrame::DILEvaluateVariableExpression) calls back into the original
'frame variable' implementation.

show more ...


# 39b2979a 13-Nov-2024 Pavel Labath <pavel@labath.sk>

[lldb] Fix source display for artificial locations (#115876)

When retrieving the location of the function declaration, we were
dropping the file component on the floor, which resulted in an amusing

[lldb] Fix source display for artificial locations (#115876)

When retrieving the location of the function declaration, we were
dropping the file component on the floor, which resulted in an amusingly
confusing situation were we displayed the file containing the
implementation of the function, but used the line number of the
declaration. This patch fixes that.

It required a small refactor Function::GetStartLineSourceLineInfo to
return a SupportFile (instead of just the file spec), which in turn
necessitated changes in a couple of other places as well.

show more ...


# f109517d 12-Nov-2024 Jonas Devlieghere <jonas@devlieghere.com>

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

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

show more ...


Revision tags: llvmorg-19.1.3
# b852fb1e 25-Oct-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Move ValueObject into its own library (NFC) (#113393)

ValueObject is part of lldbCore for historical reasons, but conceptually
it deserves to be its own library. This does introduce a (link-

[lldb] Move ValueObject into its own library (NFC) (#113393)

ValueObject is part of lldbCore for historical reasons, but conceptually
it deserves to be its own library. This does introduce a (link-time) circular
dependency between lldbCore and lldbValueObject, which is unfortunate
but probably unavoidable because so many things in LLDB rely on
ValueObject. We already have cycles and these libraries are never built
as dylibs so while this doesn't improve the situation, it also doesn't
make things worse.

The header includes were updated with the following command:

```
find . -type f -exec sed -i.bak "s%include \"lldb/Core/ValueObject%include \"lldb/ValueObject/ValueObject%" '{}' \;
```

show more ...


Revision tags: llvmorg-19.1.2
# 69b0b7e7 10-Oct-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Return an llvm::Error from GetFrameBaseValue (#111882)

This fixes the following assertion: "Cannot create Expected<T> from
Error success value." The problem was that GetFrameBaseValue return

[lldb] Return an llvm::Error from GetFrameBaseValue (#111882)

This fixes the following assertion: "Cannot create Expected<T> from
Error success value." The problem was that GetFrameBaseValue return
false without updating the Status argument. This patch eliminates the
opportunity for mistakes by returning an llvm:Error.

show more ...


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0
# b798f4bd 05-Sep-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Make deep copies of Status explicit (NFC) (#107170)


# a0dd90eb 05-Sep-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Make conversions from llvm::Error explicit with Status::FromEr… (#107163)

…ror() [NFC]


Revision tags: llvmorg-19.1.0-rc4
# 130eddf7 30-Aug-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Deal with SupportFiles in SourceManager (NFC) (#106740)

To support detecting MD5 checksum mismatches, deal with SupportFiles
rather than a plain FileSpecs in the SourceManager.


# 0642cd76 27-Aug-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Turn lldb_private::Status into a value type. (#106163)

This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
ant

[lldb] Turn lldb_private::Status into a value type. (#106163)

This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

` ResultTy DoFoo(Status& error)
`
to

` llvm::Expected<ResultTy> DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.

show more ...


# 3c0fba4f 23-Aug-2024 Adrian Prantl <aprantl@apple.com>

Revert "Revert "[lldb] Extend frame recognizers to hide frames from backtraces (#104523)""

This reverts commit 547917aebd1e79a8929b53f0ddf3b5185ee4df74.


# 547917ae 22-Aug-2024 Dmitri Gribenko <gribozavr@gmail.com>

Revert "[lldb] Extend frame recognizers to hide frames from backtraces (#104523)"

This reverts commit f01f80ce6ca7640bb0e267b84b1ed0e89b57e2d9.

This commit introduces an msan violation. See the dis

Revert "[lldb] Extend frame recognizers to hide frames from backtraces (#104523)"

This reverts commit f01f80ce6ca7640bb0e267b84b1ed0e89b57e2d9.

This commit introduces an msan violation. See the discussion on https://github.com/llvm/llvm-project/pull/104523.

show more ...


# f01f80ce 20-Aug-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Extend frame recognizers to hide frames from backtraces (#104523)

Compilers and language runtimes often use helper functions that are
fundamentally uninteresting when debugging anything but

[lldb] Extend frame recognizers to hide frames from backtraces (#104523)

Compilers and language runtimes often use helper functions that are
fundamentally uninteresting when debugging anything but the
compiler/runtime itself. This patch introduces a user-extensible
mechanism that allows for these frames to be hidden from backtraces and
automatically skipped over when navigating the stack with `up` and
`down`.

This does not affect the numbering of frames, so `f <N>` will still
provide access to the hidden frames. The `bt` output will also print a
hint that frames have been hidden.

My primary motivation for this feature is to hide thunks in the Swift
programming language, but I'm including an example recognizer for
`std::function::operator()` that I wished for myself many times while
debugging LLDB.

rdar://126629381


Example output. (Yes, my proof-of-concept recognizer could hide even
more frames if we had a method that returned the function name without
the return type or I used something that isn't based off regex, but it's
really only meant as an example).

before:
```
(lldb) thread backtrace --filtered=false
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x0000000100001f04 a.out`foo(x=1, y=1) at main.cpp:4:10
frame #1: 0x0000000100003a00 a.out`decltype(std::declval<int (*&)(int, int)>()(std::declval<int>(), std::declval<int>())) std::__1::__invoke[abi:se200000]<int (*&)(int, int), int, int>(__f=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:149:25
frame #2: 0x000000010000399c a.out`int std::__1::__invoke_void_return_wrapper<int, false>::__call[abi:se200000]<int (*&)(int, int), int, int>(__args=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:216:12
frame #3: 0x0000000100003968 a.out`std::__1::__function::__alloc_func<int (*)(int, int), std::__1::allocator<int (*)(int, int)>, int (int, int)>::operator()[abi:se200000](this=0x000000016fdff280, __arg=0x000000016fdff224, __arg=0x000000016fdff220) at function.h:171:12
frame #4: 0x00000001000026bc a.out`std::__1::__function::__func<int (*)(int, int), std::__1::allocator<int (*)(int, int)>, int (int, int)>::operator()(this=0x000000016fdff278, __arg=0x000000016fdff224, __arg=0x000000016fdff220) at function.h:313:10
frame #5: 0x0000000100003c38 a.out`std::__1::__function::__value_func<int (int, int)>::operator()[abi:se200000](this=0x000000016fdff278, __args=0x000000016fdff224, __args=0x000000016fdff220) const at function.h:430:12
frame #6: 0x0000000100002038 a.out`std::__1::function<int (int, int)>::operator()(this= Function = foo(int, int) , __arg=1, __arg=1) const at function.h:989:10
frame #7: 0x0000000100001f64 a.out`main(argc=1, argv=0x000000016fdff4f8) at main.cpp:9:10
frame #8: 0x0000000183cdf154 dyld`start + 2476
(lldb)
```

after

```
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x0000000100001f04 a.out`foo(x=1, y=1) at main.cpp:4:10
frame #1: 0x0000000100003a00 a.out`decltype(std::declval<int (*&)(int, int)>()(std::declval<int>(), std::declval<int>())) std::__1::__invoke[abi:se200000]<int (*&)(int, int), int, int>(__f=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:149:25
frame #2: 0x000000010000399c a.out`int std::__1::__invoke_void_return_wrapper<int, false>::__call[abi:se200000]<int (*&)(int, int), int, int>(__args=0x000000016fdff280, __args=0x000000016fdff224, __args=0x000000016fdff220) at invoke.h:216:12
frame #6: 0x0000000100002038 a.out`std::__1::function<int (int, int)>::operator()(this= Function = foo(int, int) , __arg=1, __arg=1) const at function.h:989:10
frame #7: 0x0000000100001f64 a.out`main(argc=1, argv=0x000000016fdff4f8) at main.cpp:9:10
frame #8: 0x0000000183cdf154 dyld`start + 2476
Note: Some frames were hidden by frame recognizers
```

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 539b72f2 05-Jun-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Return an llvm::Expected from DWARFExpression::Evaluate (NFCI) (#94420)

Change the signature of `DWARFExpression::Evaluate` and
`DWARFExpressionList::Evaluate` to return an `llvm::Expected`

[lldb] Return an llvm::Expected from DWARFExpression::Evaluate (NFCI) (#94420)

Change the signature of `DWARFExpression::Evaluate` and
`DWARFExpressionList::Evaluate` to return an `llvm::Expected` instead of a
boolean. This eliminates the `Status` output parameter and generally improves
error handling.

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5
# 975eca0e 29-Apr-2024 Adrian Prantl <aprantl@apple.com>

Add a new SBExpressionOptions::SetLanguage() API (NFCI) (#89981)

that separates out language and version. To avoid reinventing the wheel
and introducing subtle incompatibilities, this API uses the

Add a new SBExpressionOptions::SetLanguage() API (NFCI) (#89981)

that separates out language and version. To avoid reinventing the wheel
and introducing subtle incompatibilities, this API uses the table of
languages and versiond defined by the upcoming DWARF 6 standard
(https://dwarfstd.org/languages-v6.html). While the DWARF 6 spec is not
finialized, the list of languages is broadly considered stable.

The primary motivation for this is to allow the Swift language plugin to
switch between language dialects between, e.g., Swift 5.9 and 6.0 with
out introducing a ton of new language codes. On the main branch this
change is considered NFC.

Depends on https://github.com/llvm/llvm-project/pull/89980

show more ...


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3
# 2cb7ea15 27-Mar-2024 Felipe de Azevedo Piovezan <fpiovezan@apple.com>

[lldb][nfc] Delete unused variable (#86740)

This was made unused by d9ec4b24a84addb8bd77b5d9dd990181351cf84c.


# 556fe5f2 21-Mar-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Reland: Store SupportFile in FileEntry (NFC) (#85892)

This is another step towards supporting DWARF5 checksums and inline
source code in LLDB. This is a reland of #85468 but without the
fun

[lldb] Reland: Store SupportFile in FileEntry (NFC) (#85892)

This is another step towards supporting DWARF5 checksums and inline
source code in LLDB. This is a reland of #85468 but without the
functional change of storing the support file from the line table (yet).

show more ...


# a289f66e 20-Mar-2024 Jonas Devlieghere <jonas@devlieghere.com>

Revert "[lldb] Store SupportFile in FileEntry (NFC)" (#85885)

Reverts llvm/llvm-project#85468 because @slackito reports this broke
stepping in one of their tests [1] and this patch was meant to be

Revert "[lldb] Store SupportFile in FileEntry (NFC)" (#85885)

Reverts llvm/llvm-project#85468 because @slackito reports this broke
stepping in one of their tests [1] and this patch was meant to be NFC.

[1]
https://github.com/llvm/llvm-project/commit/d5a277d309e92b1d3e493da6036cffdf815105b1#commitcomment-139991120

show more ...


Revision tags: llvmorg-18.1.2
# d5a277d3 15-Mar-2024 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Store SupportFile in FileEntry (NFC) (#85468)

This is another step towards supporting DWARF5 checksums and inline
source code in LLDB.


12345678910