Skip to content

Commit def0926

Browse files
authored
Merge pull request #841 from puremourning/update-codelldb
Update codelldb to v1.10.0
2 parents da7fc24 + 1f4e2b5 commit def0926

File tree

7 files changed

+84
-11
lines changed

7 files changed

+84
-11
lines changed

python3/vimspector/gadgets.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -546,12 +546,12 @@
546546
'${version}/${file_name}',
547547
},
548548
'all': {
549-
'version': 'v1.9.2',
549+
'version': 'v1.10.0',
550550
},
551551
'macos': {
552552
'file_name': 'codelldb-x86_64-darwin.vsix',
553553
'checksum':
554-
'0b36e91930bca3344cf9b78984ee85ccacc6dc97ab9be5da935d4596f0dba05c',
554+
'91b10d5670a40434c308c09cb511a5b3e096c82b446a0bbbe4224af33204f5cf',
555555
'make_executable': [
556556
'adapter/codelldb',
557557
'lldb/bin/debugserver',
@@ -562,12 +562,12 @@
562562
'macos_arm64': {
563563
'file_name': 'codelldb-aarch64-darwin.vsix',
564564
'checksum':
565-
'5db25c0b1277795e2196a9118a38e6984b4787ac2c1e3e3adfeefe537296fc51',
565+
'4ab0795a726bc52d6e2fa8ebc610baa3f262ebea89adac478cf4a34c72167a41',
566566
},
567567
'linux': {
568568
'file_name': 'codelldb-x86_64-linux.vsix',
569569
'checksum':
570-
'898bd22b2505b12671fee7d2fe1abb384dc60d13f5fec2b4b650d0dac3f83d75',
570+
'd12bff19811974e14688e9754d8d7b9a2430868c3bac883d695032a4acd012ca',
571571
'make_executable': [
572572
'adapter/codelldb',
573573
'lldb/bin/lldb',
@@ -578,17 +578,17 @@
578578
'linux_arm64': {
579579
'file_name': 'codelldb-aarch64-linux.vsix',
580580
'checksum':
581-
'90c23169d5c32b6c3c6c040622f5f181af3e8a0a7d47e01219ce0af4a70aadb4',
581+
'0a81f6617834754537520b7bae2ea9ad50d26b372f8c8bd967dae099e4b27d06',
582582
},
583583
'linux_armv7': {
584584
'file_name': 'codelldb-arm-linux.vsix',
585585
'checksum':
586-
'971a9def71f8093ee63c1944dd69e3fbada97fc2804d312ab22e75f6d7e4e207',
586+
'4bfc5ee753d4359c9ba3cf8fc726f4245a62fd283b718b5120ef1b404baf68c9',
587587
},
588588
'windows': {
589589
'file_name': 'codelldb-x86_64-windows.vsix',
590590
'checksum':
591-
'1c23239941165d051b904a95c0bbf0853d3ff9b9149cdf36c6763fd4937c95f1',
591+
'2f251384e4356edcffe168439714d00de5ca434b263719cbdaf63c9d2f0ffe64',
592592
'make_executable': []
593593
},
594594
'adapters': {

python3/vimspector/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def GetMemoryReference( self ):
675675
# Get a memoryReference for use in a ReadMemory request
676676
variable, _ = self._GetVariable( None, None )
677677
if variable is None:
678-
return None
678+
return None, None
679679

680680
# TODO: Return the connection too!
681681
return variable.connection, variable.MemoryReference()
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
{
22
"$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json",
3+
"adapters": {
4+
"CodeLLDB-localbuild": {
5+
"extends": "CodeLLDB",
6+
"command": [
7+
"$HOME/Development/vimspector/CodeLLDB/build/adapter/codelldb",
8+
"--port",
9+
"${unusedLocalPort}"
10+
]
11+
}
12+
},
313
"configurations": {
414
"Run - CodeLLDB": {
515
"adapter": "CodeLLDB",
616
"configuration": {
717
"request": "launch",
8-
"program": "${workspaceRoot}/target/debug/vimspector_test"
18+
"program": "${workspaceRoot}/target/debug/vimspector_test",
19+
"expressions": "native"
920
}
21+
},
22+
"CodeLLDB-localbuild": {
23+
"extends": "Run - CodeLLDB",
24+
"adapter": "CodeLLDB-localbuild"
1025
}
1126
}
1227
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
struct Foo {
2+
x: i32,
3+
}
4+
15
fn main() {
26
let s = "World!";
3-
println!("Hello, {}!", s);
7+
let f = Foo { x: 42 };
8+
let g = &f;
9+
println!("Hello, {} {} {}!", s, g.x, f.x);
410
}

tests/testdata/cpp/simple/.vimspector.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
"cpp_catch": ""
105105
}
106106
}
107+
},
108+
"CodeLLDB-localbuild": {
109+
"extends": "CodeLLDB",
110+
"adapter": "CodeLLDB-localbuild"
107111
}
108112
},
109113
"adapters": {
@@ -124,6 +128,14 @@
124128
"LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY": "YES"
125129
},
126130
"name": "lldb"
131+
},
132+
"CodeLLDB-localbuild": {
133+
"extends": "CodeLLDB",
134+
"command": [
135+
"$HOME/Development/vimspector/CodeLLDB/build/adapter/codelldb",
136+
"--port",
137+
"${unusedLocalPort}"
138+
]
127139
}
128140
}
129141
}

tests/testdata/cpp/simple/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TARGETS=simple variables struct printer threads tiny
1+
TARGETS=simple variables struct printer threads tiny buffer
22

33
CXXFLAGS=-g -O0 -std=c++17
44
CFLAGS=-g -O0
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#include <cstddef>
2+
#include <cstdint>
3+
#include <cstring>
4+
#include <iostream>
5+
6+
#include <sys/mman.h>
7+
8+
struct Foo
9+
{
10+
uint32_t a;
11+
uint64_t b;
12+
float d;
13+
};
14+
15+
static void handle_data(const unsigned char* data, size_t length)
16+
{
17+
if (length < sizeof(Foo))
18+
return;
19+
20+
Foo f;
21+
memcpy(&f, data, sizeof(Foo));
22+
23+
std::cout << "a: " << f.a << ", b: " << f.b << ", d: " << f.d << std::endl;
24+
}
25+
26+
int main(int , char**)
27+
{
28+
unsigned char data[1024];
29+
Foo f{ 10, 20, 30.7f };
30+
31+
memcpy(data + 3, &f, sizeof(Foo));
32+
33+
void *ptr = mmap(nullptr, 2048, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
34+
memcpy(ptr, data+3, sizeof(Foo));
35+
36+
handle_data((unsigned char*)ptr, sizeof(f));
37+
munmap(ptr, 2048);
38+
39+
return 0;
40+
}

0 commit comments

Comments
 (0)