[Lldb-commits] [lldb] 9df19ce - Add uncovered enums in switches caused by 9434c083475e42f47383f3067fe2a155db5c6a30

2024-04-01 Thread David Blaikie via lldb-commits
Author: David Blaikie Date: 2024-04-01T23:07:01Z New Revision: 9df19ce40281551bd348b262a131085cf98dadf5 URL: https://github.com/llvm/llvm-project/commit/9df19ce40281551bd348b262a131085cf98dadf5 DIFF: https://github.com/llvm/llvm-project/commit/9df19ce40281551bd348b262a131085cf98dadf5.diff LOG:

[Lldb-commits] [lldb] [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (PR #87263)

2024-04-01 Thread Jordan Rupprecht via lldb-commits
https://github.com/rupprecht closed https://github.com/llvm/llvm-project/pull/87263 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] a6cacee - [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (#87263)

2024-04-01 Thread via lldb-commits
Author: Jordan Rupprecht Date: 2024-04-01T16:02:12-05:00 New Revision: a6caceed8d27d4ebd44c517c3114a36a64ebddfe URL: https://github.com/llvm/llvm-project/commit/a6caceed8d27d4ebd44c517c3114a36a64ebddfe DIFF: https://github.com/llvm/llvm-project/commit/a6caceed8d27d4ebd44c517c3114a36a64ebddfe.di

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); + + llvm::APFloat GetValueAsFloat(); + + bool GetValueAsBool(); + + /// Update the value of the current object to

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP + CreateValueObjectFromBytes(lldb::TargetSP ta

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); + + llvm::APFloat GetValueAsFloat(); + + bool GetValueAsBool(); + + /// Update the value of the current object to

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); + + llvm::APFloat GetValueAsFloat(); + + bool GetValueAsBool(); clayborg wrote: Do we need `GetVa

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP + CreateValueObjectFromBytes(lldb::TargetSP ta

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. + lldb::addr_t GetLoadAddres

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP + CreateValueObjectFromBytes(lldb::TargetSP ta

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. + lldb::addr_t GetLoadAddres

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Greg Clayton via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. + lldb::addr_t GetLoadAddres

[Lldb-commits] [lldb] [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (PR #87263)

2024-04-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. Rewriting this has been on my backlog for a few months now. This looks better than what I had in mind. Thank you! 😄 https://github.com/llvm/llvm-project/pull/87263 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -2809,6 +2919,243 @@ ValueObjectSP ValueObject::CastPointerType(const char *name, TypeSP &type_sp) { return valobj_sp; } +lldb::addr_t ValueObject::GetLoadAddress() { + lldb::addr_t addr_value = LLDB_INVALID_ADDRESS; + lldb::TargetSP target_sp = GetTargetSP(); + if (t

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. + lldb::addr_t GetLoadAddres

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -1089,6 +1089,116 @@ int64_t ValueObject::GetValueAsSigned(int64_t fail_value, bool *success) { return fail_value; } +llvm::APSInt ValueObject::GetValueAsAPSInt() { + lldb::TargetSP target = GetTargetSP(); + uint64_t byte_size = 0; + if (auto temp = GetCompilerType().

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. bulbazord wr

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord requested changes to this pull request. +1 to all of Jim and Adrian's comments. High level comments: 1. I'm a little concerned about the use of assertions in this patch. I generally like assertions when they are used to assert internal consistency. It looks like yo

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/87197 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread via lldb-commits
@@ -719,6 +776,10 @@ class ValueObject { ClearUserVisibleData(eClearUserVisibleDataItemsSummary); } + void SetDerefValobj(ValueObject *deref) { m_deref_valobj = deref; } jimingham wrote: Synthetic child providers also have a way to provide the deref Va

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP + CreateValueObjectFromBytes(lldb::TargetSP ta

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Adrian Prantl via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP + CreateValueObjectFromBytes(lldb::TargetSP ta

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Adrian Prantl via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); + + llvm::APFloat GetValueAsFloat(); + + bool GetValueAsBool(); adrian-prantl wrote: same here h

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Adrian Prantl via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); + + llvm::APFloat GetValueAsFloat(); adrian-prantl wrote: same here https://github.com/llvm/llvm-

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread Adrian Prantl via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); adrian-prantl wrote: if these errors matter to users then `llvm::Expected` would be the right choi

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread via lldb-commits
@@ -668,6 +699,32 @@ class ValueObject { CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type); + static lldb::ValueObjectSP jimingham wrote: Given target

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread via lldb-commits
@@ -618,6 +631,24 @@ class ValueObject { virtual lldb::ValueObjectSP CastPointerType(const char *name, lldb::TypeSP &type_sp); + /// Return the target load address assocaited with this value object. + lldb::addr_t GetLoadAddres

[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)

2024-04-01 Thread via lldb-commits
@@ -441,6 +441,19 @@ class ValueObject { virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr); + llvm::APSInt GetValueAsAPSInt(); jimingham wrote: Not all SBValues are representable as Int's or Floats, Bool's etc. But I don't s

[Lldb-commits] [lldb] [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (PR #87263)

2024-04-01 Thread via lldb-commits
https://github.com/jimingham approved this pull request. LGMT https://github.com/llvm/llvm-project/pull/87263 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (PR #87263)

2024-04-01 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Jordan Rupprecht (rupprecht) Changes We check if the next character after `N.` is `*` before we check its length. Using `split` on the string is cleaner and less error prone than using indices with `find` and `substr`. Note: this does not

[Lldb-commits] [lldb] [lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (PR #87263)

2024-04-01 Thread Jordan Rupprecht via lldb-commits
https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/87263 We check if the next character after `N.` is `*` before we check its length. Using `split` on the string is cleaner and less error prone than using indices with `find` and `substr`. Note: this does not make `