Re: [lldb-dev] [llvm-dev] Have the debugger show an away with a dynamic size?

2020-02-17 Thread Adrian Prantl via lldb-dev
I added the VLA support to clang and lldb about a year ago, so you'll need 
fairly recent version of both for it to work.

-- adrian

> On Feb 17, 2020, at 12:25 PM, Levo DeLellis  wrote:
> 
> It looks like I wasn't careful and mixed version. I compiled with clang-9 but 
> used lldb-6. Surprisingly this was the only error I notice when mixing these 
> version. I could swear I tried compiling with clang-6. I'd double check but 
> it appears that installing lldb-9 removed lldb(-6) from my system
> Thanks for pointing me in the right direction
> 
> On Mon, Feb 17, 2020 at 11:18 AM Adrian Prantl  > wrote:
> That is interesting. According to LLDB's test/lang/c/vla/* frame variable for 
> a VLA is supposed to work. Frame variable is also supposed to hide the 
> __vla_expr0 artificial helper variable. Is this an older LLDB from your 
> system or an LLDB you built from source? If yes, would you mind filing a 
> bugreport about this?
> 
> thanks,
> adrian
> 
> > On Feb 15, 2020, at 8:17 AM, Levo DeLellis  > > wrote:
> > 
> > Thanks for the suggestions but it doesn't appear to be working correctly 
> > for me. I tried building the below after seeing the results with "clang -g 
> > -std=c99 test.c" and got the same result
> > 
> > LLDB thinks MyArray is 81 elements long even though 81 and 80 doesn't show 
> > up anywhere in the llvm-ir (I tried again using an llvm ir file made by 
> > clang -g -std=c99 test.c -S -emit-llvm and clang -g test.ll)
> > 
> > $ cat test.c
> > int foo(int s) {
> > int MyArray[s];
> > int i;
> > for (i = 0; i < s; ++i)
> > MyArray[i] = s;
> > return 0;
> > }
> > 
> > int main(){
> > foo(5);
> > return 0;
> > }
> > $ clang -g test.c 
> > $ lldb ./a.out 
> > (lldb) target create "./a.out"
> > Current executable set to './a.out' (x86_64).
> > (lldb) break set -f test.c -l 6
> > Breakpoint 1: where = a.out`foo + 101 at test.c:7, address = 
> > 0x00400505
> > (lldb) r
> > Process 3205 launched: './a.out' (x86_64)
> > Process 3205 stopped
> > * thread #1, name = 'a.out', stop reason = breakpoint 1.1
> > frame #0: 0x00400505 a.out`foo(s=5) at test.c:7
> >4  for (i = 0; i < s; ++i)
> >5  MyArray[i] = s;
> >6  return 0;
> > -> 7   }
> >8   
> >9   int main(){
> >10  foo(5);
> > (lldb) frame variable
> > (int) s = 5
> > (unsigned long) __vla_expr0 = 5
> > (int) i = 5
> > (int [81]) MyArray = {
> >   [0] = 5
> >   [1] = 5
> >   [2] = 5
> >   [3] = 5
> >   [4] = 5
> >   [5] = 0
> >   [6] = -136481184
> >   [7] = 32767
> >   [8] = -8408
> >   [9] = 32767
> >   [10] = -8544
> >   [11] = 32767
> >   [12] = 1
> >   [13] = 5
> >   [14] = 5
> >   [15] = 0
> >   [16] = -8512
> >   [17] = 32767
> >   [18] = 0
> >   [19] = 5
> >   [20] = -8432
> >   [21] = 32767
> >   [22] = 4195641
> >   [23] = 0
> >   [24] = -8208
> >   [25] = 32767
> >   [26] = 0
> >   [27] = 0
> >   [28] = 4195664
> >   [29] = 0
> >   [30] = -140485737
> >   [31] = 32767
> >   [32] = 0
> >   [33] = 32
> >   [34] = -8200
> >   [35] = 32767
> >   [36] = 0
> >   [37] = 1
> >   [38] = 4195616
> >   [39] = 0
> >   [40] = 0
> >   [41] = 0
> >   [42] = -1953144313
> >   [43] = 1284291557
> >   [44] = 4195248
> >   [45] = 0
> >   [46] = -8208
> >   [47] = 32767
> >   [48] = 0
> >   [49] = 0
> >   [50] = 0
> >   [51] = 0
> >   [52] = 1064657415
> >   [53] = -1284291430
> >   [54] = 933978631
> >   [55] = -1284287451
> >   [56] = 0
> >   [57] = 32767
> >   [58] = 0
> >   [59] = 0
> >   [60] = 0
> >   [61] = 0
> >   [62] = -136423629
> >   [63] = 32767
> >   [64] = -136530376
> >   [65] = 32767
> >   [66] = 386784
> >   [67] = 0
> >   [68] = 0
> >   [69] = 0
> >   [70] = 0
> >   [71] = 0
> >   [72] = 0
> >   [73] = 0
> >   [74] = 4195248
> >   [75] = 0
> >   [76] = -8208
> >   [77] = 32767
> >   [78] = 4195290
> >   [79] = 0
> >   [80] = -8216
> > }
> > 
> > 
> > On Thu, Feb 13, 2020 at 3:53 PM Adrian Prantl  > > wrote:
> > Take a look at the IR clang produces for C99 variable-length arrays.
> > 
> > -- adrian
> > 
> >> On Feb 13, 2020, at 10:03 AM, Levo DeLellis via llvm-dev 
> >> mailto:llvm-...@lists.llvm.org>> wrote:
> >> 
> >> Hi. I searched and the closest thing I could find was this 
> >> http://lists.llvm.org/pipermail/llvm-dev/2018-February/121348.html 
> >> 
> >> 
> >> Currently a known sized array looks and debugs as expected. I use 
> >> llvm.dbg.declare with DICompositeType tag: DW_TAG_array_type and the size 
> >> field. In my language arrays are always passed around with a pointer and 
> >> size pair. I'd like debugging to show up as nicely instead of a pointer 
> >> addr with no information about the elements. How would I do this? I don't 
> >> use the C API, I output llvm-ir directly. I was hoping I can call 
> >> llvm.dbg.declare/addr/value to specify the pointer, name and size of the 
> >> 

Re: [lldb-dev] [llvm-dev] Have the debugger show an away with a dynamic size?

2020-02-17 Thread Levo DeLellis via lldb-dev
It looks like I wasn't careful and mixed version. I compiled with clang-9
but used lldb-6. Surprisingly this was the only error I notice when mixing
these version. I could swear I tried compiling with clang-6. I'd double
check but it appears that installing lldb-9 removed lldb(-6) from my system
Thanks for pointing me in the right direction

On Mon, Feb 17, 2020 at 11:18 AM Adrian Prantl  wrote:

> That is interesting. According to LLDB's test/lang/c/vla/* frame variable
> for a VLA is supposed to work. Frame variable is also supposed to hide the
> __vla_expr0 artificial helper variable. Is this an older LLDB from your
> system or an LLDB you built from source? If yes, would you mind filing a
> bugreport about this?
>
> thanks,
> adrian
>
> > On Feb 15, 2020, at 8:17 AM, Levo DeLellis 
> wrote:
> >
> > Thanks for the suggestions but it doesn't appear to be working correctly
> for me. I tried building the below after seeing the results with "clang -g
> -std=c99 test.c" and got the same result
> >
> > LLDB thinks MyArray is 81 elements long even though 81 and 80 doesn't
> show up anywhere in the llvm-ir (I tried again using an llvm ir file made
> by clang -g -std=c99 test.c -S -emit-llvm and clang -g test.ll)
> >
> > $ cat test.c
> > int foo(int s) {
> > int MyArray[s];
> > int i;
> > for (i = 0; i < s; ++i)
> > MyArray[i] = s;
> > return 0;
> > }
> >
> > int main(){
> > foo(5);
> > return 0;
> > }
> > $ clang -g test.c
> > $ lldb ./a.out
> > (lldb) target create "./a.out"
> > Current executable set to './a.out' (x86_64).
> > (lldb) break set -f test.c -l 6
> > Breakpoint 1: where = a.out`foo + 101 at test.c:7, address =
> 0x00400505
> > (lldb) r
> > Process 3205 launched: './a.out' (x86_64)
> > Process 3205 stopped
> > * thread #1, name = 'a.out', stop reason = breakpoint 1.1
> > frame #0: 0x00400505 a.out`foo(s=5) at test.c:7
> >4  for (i = 0; i < s; ++i)
> >5  MyArray[i] = s;
> >6  return 0;
> > -> 7   }
> >8
> >9   int main(){
> >10  foo(5);
> > (lldb) frame variable
> > (int) s = 5
> > (unsigned long) __vla_expr0 = 5
> > (int) i = 5
> > (int [81]) MyArray = {
> >   [0] = 5
> >   [1] = 5
> >   [2] = 5
> >   [3] = 5
> >   [4] = 5
> >   [5] = 0
> >   [6] = -136481184
> >   [7] = 32767
> >   [8] = -8408
> >   [9] = 32767
> >   [10] = -8544
> >   [11] = 32767
> >   [12] = 1
> >   [13] = 5
> >   [14] = 5
> >   [15] = 0
> >   [16] = -8512
> >   [17] = 32767
> >   [18] = 0
> >   [19] = 5
> >   [20] = -8432
> >   [21] = 32767
> >   [22] = 4195641
> >   [23] = 0
> >   [24] = -8208
> >   [25] = 32767
> >   [26] = 0
> >   [27] = 0
> >   [28] = 4195664
> >   [29] = 0
> >   [30] = -140485737
> >   [31] = 32767
> >   [32] = 0
> >   [33] = 32
> >   [34] = -8200
> >   [35] = 32767
> >   [36] = 0
> >   [37] = 1
> >   [38] = 4195616
> >   [39] = 0
> >   [40] = 0
> >   [41] = 0
> >   [42] = -1953144313
> >   [43] = 1284291557
> >   [44] = 4195248
> >   [45] = 0
> >   [46] = -8208
> >   [47] = 32767
> >   [48] = 0
> >   [49] = 0
> >   [50] = 0
> >   [51] = 0
> >   [52] = 1064657415
> >   [53] = -1284291430
> >   [54] = 933978631
> >   [55] = -1284287451
> >   [56] = 0
> >   [57] = 32767
> >   [58] = 0
> >   [59] = 0
> >   [60] = 0
> >   [61] = 0
> >   [62] = -136423629
> >   [63] = 32767
> >   [64] = -136530376
> >   [65] = 32767
> >   [66] = 386784
> >   [67] = 0
> >   [68] = 0
> >   [69] = 0
> >   [70] = 0
> >   [71] = 0
> >   [72] = 0
> >   [73] = 0
> >   [74] = 4195248
> >   [75] = 0
> >   [76] = -8208
> >   [77] = 32767
> >   [78] = 4195290
> >   [79] = 0
> >   [80] = -8216
> > }
> >
> >
> > On Thu, Feb 13, 2020 at 3:53 PM Adrian Prantl  wrote:
> > Take a look at the IR clang produces for C99 variable-length arrays.
> >
> > -- adrian
> >
> >> On Feb 13, 2020, at 10:03 AM, Levo DeLellis via llvm-dev <
> llvm-...@lists.llvm.org> wrote:
> >>
> >> Hi. I searched and the closest thing I could find was this
> http://lists.llvm.org/pipermail/llvm-dev/2018-February/121348.html
> >>
> >> Currently a known sized array looks and debugs as expected. I use
> llvm.dbg.declare with DICompositeType tag: DW_TAG_array_type and the size
> field. In my language arrays are always passed around with a pointer and
> size pair. I'd like debugging to show up as nicely instead of a pointer
> addr with no information about the elements. How would I do this? I don't
> use the C API, I output llvm-ir directly. I was hoping I can call
> llvm.dbg.declare/addr/value to specify the pointer, name and size of the
> variable but I really have no idea how to pass the size to the debugger.
> >>
> >> ___
> >> LLVM Developers mailing list
> >> llvm-...@lists.llvm.org
> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >
>
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [Release-testers] [10.0.0 Release] Release Candidate 2 is here

2020-02-17 Thread Michał Górny via lldb-dev
On Thu, 2020-02-13 at 23:34 +0100, Hans Wennborg via Release-testers
wrote:
> Hello everyone,
> 
> Release Candidate 2 was tagged earlier today as llvmorg-10.0.0-rc2. It
> includes 98 commits since the previous release candidate.
> 

This time I've switched to python3.8, and I've noticed that libc++ & co.
tests fail with it.  This is already fixed in master, and the fix is
trivial, so I've requested backport:
https://bugs.llvm.org/show_bug.cgi?id=44905

No regressions found on my end.

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [llvm-dev] Have the debugger show an away with a dynamic size?

2020-02-17 Thread Adrian Prantl via lldb-dev
That is interesting. According to LLDB's test/lang/c/vla/* frame variable for a 
VLA is supposed to work. Frame variable is also supposed to hide the 
__vla_expr0 artificial helper variable. Is this an older LLDB from your system 
or an LLDB you built from source? If yes, would you mind filing a bugreport 
about this?

thanks,
adrian

> On Feb 15, 2020, at 8:17 AM, Levo DeLellis  wrote:
> 
> Thanks for the suggestions but it doesn't appear to be working correctly for 
> me. I tried building the below after seeing the results with "clang -g 
> -std=c99 test.c" and got the same result
> 
> LLDB thinks MyArray is 81 elements long even though 81 and 80 doesn't show up 
> anywhere in the llvm-ir (I tried again using an llvm ir file made by clang -g 
> -std=c99 test.c -S -emit-llvm and clang -g test.ll)
> 
> $ cat test.c
> int foo(int s) {
> int MyArray[s];
> int i;
> for (i = 0; i < s; ++i)
> MyArray[i] = s;
> return 0;
> }
> 
> int main(){
> foo(5);
> return 0;
> }
> $ clang -g test.c 
> $ lldb ./a.out 
> (lldb) target create "./a.out"
> Current executable set to './a.out' (x86_64).
> (lldb) break set -f test.c -l 6
> Breakpoint 1: where = a.out`foo + 101 at test.c:7, address = 
> 0x00400505
> (lldb) r
> Process 3205 launched: './a.out' (x86_64)
> Process 3205 stopped
> * thread #1, name = 'a.out', stop reason = breakpoint 1.1
> frame #0: 0x00400505 a.out`foo(s=5) at test.c:7
>4  for (i = 0; i < s; ++i)
>5  MyArray[i] = s;
>6  return 0;
> -> 7   }
>8   
>9   int main(){
>10  foo(5);
> (lldb) frame variable
> (int) s = 5
> (unsigned long) __vla_expr0 = 5
> (int) i = 5
> (int [81]) MyArray = {
>   [0] = 5
>   [1] = 5
>   [2] = 5
>   [3] = 5
>   [4] = 5
>   [5] = 0
>   [6] = -136481184
>   [7] = 32767
>   [8] = -8408
>   [9] = 32767
>   [10] = -8544
>   [11] = 32767
>   [12] = 1
>   [13] = 5
>   [14] = 5
>   [15] = 0
>   [16] = -8512
>   [17] = 32767
>   [18] = 0
>   [19] = 5
>   [20] = -8432
>   [21] = 32767
>   [22] = 4195641
>   [23] = 0
>   [24] = -8208
>   [25] = 32767
>   [26] = 0
>   [27] = 0
>   [28] = 4195664
>   [29] = 0
>   [30] = -140485737
>   [31] = 32767
>   [32] = 0
>   [33] = 32
>   [34] = -8200
>   [35] = 32767
>   [36] = 0
>   [37] = 1
>   [38] = 4195616
>   [39] = 0
>   [40] = 0
>   [41] = 0
>   [42] = -1953144313
>   [43] = 1284291557
>   [44] = 4195248
>   [45] = 0
>   [46] = -8208
>   [47] = 32767
>   [48] = 0
>   [49] = 0
>   [50] = 0
>   [51] = 0
>   [52] = 1064657415
>   [53] = -1284291430
>   [54] = 933978631
>   [55] = -1284287451
>   [56] = 0
>   [57] = 32767
>   [58] = 0
>   [59] = 0
>   [60] = 0
>   [61] = 0
>   [62] = -136423629
>   [63] = 32767
>   [64] = -136530376
>   [65] = 32767
>   [66] = 386784
>   [67] = 0
>   [68] = 0
>   [69] = 0
>   [70] = 0
>   [71] = 0
>   [72] = 0
>   [73] = 0
>   [74] = 4195248
>   [75] = 0
>   [76] = -8208
>   [77] = 32767
>   [78] = 4195290
>   [79] = 0
>   [80] = -8216
> }
> 
> 
> On Thu, Feb 13, 2020 at 3:53 PM Adrian Prantl  wrote:
> Take a look at the IR clang produces for C99 variable-length arrays.
> 
> -- adrian
> 
>> On Feb 13, 2020, at 10:03 AM, Levo DeLellis via llvm-dev 
>>  wrote:
>> 
>> Hi. I searched and the closest thing I could find was this 
>> http://lists.llvm.org/pipermail/llvm-dev/2018-February/121348.html
>> 
>> Currently a known sized array looks and debugs as expected. I use 
>> llvm.dbg.declare with DICompositeType tag: DW_TAG_array_type and the size 
>> field. In my language arrays are always passed around with a pointer and 
>> size pair. I'd like debugging to show up as nicely instead of a pointer addr 
>> with no information about the elements. How would I do this? I don't use the 
>> C API, I output llvm-ir directly. I was hoping I can call 
>> llvm.dbg.declare/addr/value to specify the pointer, name and size of the 
>> variable but I really have no idea how to pass the size to the debugger.
>> 
>> ___
>> LLVM Developers mailing list
>> llvm-...@lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> 

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [Release-testers] [10.0.0 Release] Release Candidate 2 is here

2020-02-17 Thread Hans Wennborg via lldb-dev
Thanks! Added this and the other binaries I've gotten so far to the
release page and github.

On Sat, Feb 15, 2020 at 6:25 PM Brian Cain  wrote:
>
> Uploaded ubuntu 18 binaries.
>
> $ cat clang+llvm-10.0.0-rc2-x86_64-linux-gnu-ubuntu-18.04.tar.xz.sha256
> 8ca2cd0e0ba2243c095134373b46ccad822192b0495ce13eb0af33e12f9d17e1  
> clang+llvm-10.0.0-rc2-x86_64-linux-gnu-ubuntu-18.04.tar.xz
>
> On Thu, Feb 13, 2020 at 4:34 PM Hans Wennborg via Release-testers 
>  wrote:
>>
>> Hello everyone,
>>
>> Release Candidate 2 was tagged earlier today as llvmorg-10.0.0-rc2. It
>> includes 98 commits since the previous release candidate.
>>
>> Source code and docs are available at
>> https://prereleases.llvm.org/10.0.0/#rc2 and
>> https://github.com/llvm/llvm-project/releases/tag/llvmorg-10.0.0-rc2
>>
>> Pre-built binaries will be added as they become available.
>>
>> Please file bug reports for any issues you find as blockers of
>> https://llvm.org/pr44555
>>
>> Release testers: please run the test script, share your results, and
>> upload binaries.
>>
>> I'm hoping we can now start tying up the loose ends, fixing the
>> blocking bugs, and getting the branch ready for shipping as a stable
>> release soon.
>>
>> Thanks,
>> Hans
>> ___
>> Release-testers mailing list
>> release-test...@lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/release-testers
>
>
>
> --
> -Brian
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [10.0.0 Release] Release Candidate 2 is here

2020-02-17 Thread Hans Wennborg via lldb-dev
On Thu, Feb 13, 2020 at 11:34 PM Hans Wennborg  wrote:
>
> Hello everyone,
>
> Release Candidate 2 was tagged earlier today as llvmorg-10.0.0-rc2. It
> includes 98 commits since the previous release candidate.
>
> Source code and docs are available at
> https://prereleases.llvm.org/10.0.0/#rc2 and
> https://github.com/llvm/llvm-project/releases/tag/llvmorg-10.0.0-rc2
>
> Pre-built binaries will be added as they become available.

Windows binaries are ready. They were built with the attached batch file.

$ sha256sum LLVM-10.0.0-rc2-win*.exe
899b5ce0844809642e01fdc5e14c91a19f372ca588033ac506e56d1d6dac0bfe
LLVM-10.0.0-rc2-win32.exe
1e4d19759e6adb27e474f1624e19101f945cd97e0d4603d18a5f9a3f6b597b77
LLVM-10.0.0-rc2-win64.exe


build_llvm_1000-rc2._bat_
Description: Binary data
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev