https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/118814
>From 639fc6d87345c8d68a822032917102a4225df355 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Wed, 4 Dec 2024 14:37:24 -0800
Subject: [PATCH 1/4] [lldb] Add lookup by name to SBValue.child
---
lldb/bindings
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
https://github.com/jimingham edited
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
https://github.com/labath edited
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
jimingham wrote:
If we ever come across a language that allows numbers for ivar names,
overloading `child` for by name access will make us sad, but I think such a
language would make us sadder, so I'm not much concerned...
https://github.com/llvm/llvm-project/pull/118814
__
jimingham wrote:
The other way to do it would be to use "::Foo" to refer to the base class, and
"Foo" the member. Maybe even nicer would be to allow just "Foo" if there's no
ambiguity, and only require the :: if there is.
https://github.com/llvm/llvm-project/pull/118814
__
jimingham wrote:
I think you have to do lookup by name just of the members (and maybe a separate
lookup by name of the base classes?)
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://l
jimingham wrote:
Unfortunately, this is legal C++:
```
class Foo {
public:
int m_intvar = 10;
};
class Bar : Foo {
public:
int Foo = 100;
};
int
main()
{
Bar myBar;
return myBar.Foo;
}
```
So the lookup by name of Foo wouldn't be unique here.
https://github.com/llvm/llvm-project/pul
kastiglione wrote:
I updated the PR to support look up of base class children by name.
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commi
https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/118814
>From 639fc6d87345c8d68a822032917102a4225df355 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Wed, 4 Dec 2024 14:37:24 -0800
Subject: [PATCH 1/3] [lldb] Add lookup by name to SBValue.child
---
lldb/bindings
https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/118814
>From 639fc6d87345c8d68a822032917102a4225df355 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Wed, 4 Dec 2024 14:37:24 -0800
Subject: [PATCH 1/2] [lldb] Add lookup by name to SBValue.child
---
lldb/bindings
medismailben wrote:
> or, should we allow base classes to be looked up by name as well?
I'd prefer the latter so they can used interchangeably. I like the fact that
the subscript can be either an int or a string.
https://github.com/llvm/llvm-project/pull/118814
___
kastiglione wrote:
or, should we allow base classes to be looked up by name as well?
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
kastiglione wrote:
@jimingham are you proposing a new property named `member`? In which case
`child` would be used for index based access, and `member` would be used for
name based access?
https://github.com/llvm/llvm-project/pull/118814
___
lldb-com
jimingham wrote:
I wonder if "member" might be a better name than "child". The base classes of
an SBValue representing a C++ object are also children of the value, but you
won't be able to look them up in this array.
https://github.com/llvm/llvm-project/pull/118814
___
https://github.com/medismailben approved this pull request.
Nice! LGTM!
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kastiglione edited
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Dave Lee (kastiglione)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/118814.diff
2 Files Affected:
- (modified) lldb/bindings/interface/SBValueExtensions.i (+4-2)
- (modified) lldb/test/API/python_api/value/TestValue
https://github.com/kastiglione created
https://github.com/llvm/llvm-project/pull/118814
None
>From 639fc6d87345c8d68a822032917102a4225df355 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Wed, 4 Dec 2024 14:37:24 -0800
Subject: [PATCH] [lldb] Add lookup by name to SBValue.child
---
lldb/bindin
25 matches
Mail list logo