Commit 5e7ccf3
committed
[lldb][debugserver] remove g/G packet handling from debugserver
In 2013 we added the QSaveRegisterState and QRestoreRegisterState
packets to checkpoint a thread's register state while executing an
inferior function call, instead of using the g packet to read all
registers into lldb, then the G packet to set them again after the
func call.
Since then, lldb has not sent g/G (except as a bug) - it either
asks for registers individually (p/P) or or asks debugserver to
save and restore the entire register set with these lldb extensions.
Felipe recently had a codepath that fell back to using g/G and found
that it does not work with the modern signed fp/sp/pc/lr registers
that we can get -- it sidesteps around the clearing of the
non-addressable bits that we do when reading/writing them, and
results in a crash. ( #132079 )
Instead of fixing that issue, I am removing g/G from debugserver
because it's not needed by lldb, and it will would be easy for
future bugs to creep in to this packet that lldb should not use,
but it can accidentally fall back to and result in subtle bugs.
This does mean that a debugger using debugserver on darwin which
doesn't use QSaveRegisterState/QRestoreRegisterState will need
to fall back to reading & writing each register individually.
I'm open to re-evaluating this decision if this proves to be
needed, and supporting these lldb extensions is onerous.1 parent 77ac5a2 commit 5e7ccf3
File tree
3 files changed
+0
-132
lines changed- lldb
- test/API/tools/lldb-server/register-reading
- tools/debugserver/source
3 files changed
+0
-132
lines changedLines changed: 0 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 28 | | |
62 | 29 | | |
63 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | 246 | | |
249 | 247 | | |
250 | 248 | | |
251 | 249 | | |
252 | | - | |
253 | | - | |
254 | 250 | | |
255 | 251 | | |
256 | 252 | | |
| |||
3288 | 3284 | | |
3289 | 3285 | | |
3290 | 3286 | | |
3291 | | - | |
3292 | | - | |
3293 | | - | |
3294 | | - | |
3295 | | - | |
3296 | | - | |
3297 | | - | |
3298 | | - | |
3299 | | - | |
3300 | | - | |
3301 | | - | |
3302 | | - | |
3303 | | - | |
3304 | | - | |
3305 | | - | |
3306 | | - | |
3307 | | - | |
3308 | | - | |
3309 | | - | |
3310 | | - | |
3311 | | - | |
3312 | | - | |
3313 | | - | |
3314 | | - | |
3315 | | - | |
3316 | | - | |
3317 | | - | |
3318 | | - | |
3319 | | - | |
3320 | | - | |
3321 | | - | |
3322 | | - | |
3323 | | - | |
3324 | | - | |
3325 | | - | |
3326 | | - | |
3327 | | - | |
3328 | | - | |
3329 | | - | |
3330 | | - | |
3331 | | - | |
3332 | | - | |
3333 | | - | |
3334 | | - | |
3335 | | - | |
3336 | | - | |
3337 | | - | |
3338 | | - | |
3339 | | - | |
3340 | | - | |
3341 | | - | |
3342 | | - | |
3343 | | - | |
3344 | | - | |
3345 | | - | |
3346 | | - | |
3347 | | - | |
3348 | | - | |
3349 | | - | |
3350 | | - | |
3351 | | - | |
3352 | | - | |
3353 | | - | |
3354 | | - | |
3355 | | - | |
3356 | | - | |
3357 | | - | |
3358 | | - | |
3359 | | - | |
3360 | | - | |
3361 | | - | |
3362 | | - | |
3363 | | - | |
3364 | | - | |
3365 | | - | |
3366 | | - | |
3367 | | - | |
3368 | | - | |
3369 | | - | |
3370 | | - | |
3371 | | - | |
3372 | | - | |
3373 | | - | |
3374 | | - | |
3375 | | - | |
3376 | | - | |
3377 | | - | |
3378 | | - | |
3379 | | - | |
3380 | | - | |
3381 | | - | |
3382 | 3287 | | |
3383 | 3288 | | |
3384 | 3289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
221 | 219 | | |
222 | 220 | | |
223 | 221 | | |
224 | | - | |
225 | | - | |
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
| |||
0 commit comments