Commit 64d504c
Daniel Thompson
kdb: Simplify management of tmpbuffer in kdb_read()
The current approach to filling tmpbuffer with completion candidates is
confusing, with the buffer management being especially hard to reason
about. That's because it doesn't copy the completion canidate into
tmpbuffer, instead of copies a whole bunch of other nonsense and then
runs the completion search from the middle of tmpbuffer!
Change this to copy nothing but the completion candidate into tmpbuffer.
Pretty much everything else in this patch is renaming to reflect the
above change:
s/p_tmp/tmpbuffer/
s/buf_size/sizeof(tmpbuffer)/
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240424-kgdb_read_refactor-v3-7-f236dbe9828d@linaro.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>1 parent 80bd73c commit 64d504c
1 file changed
+18
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | | - | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
347 | 342 | | |
348 | 343 | | |
349 | 344 | | |
| |||
355 | 350 | | |
356 | 351 | | |
357 | 352 | | |
358 | | - | |
| 353 | + | |
359 | 354 | | |
360 | 355 | | |
361 | 356 | | |
362 | | - | |
| 357 | + | |
363 | 358 | | |
364 | | - | |
365 | | - | |
| 359 | + | |
| 360 | + | |
366 | 361 | | |
367 | 362 | | |
368 | 363 | | |
| |||
373 | 368 | | |
374 | 369 | | |
375 | 370 | | |
376 | | - | |
| 371 | + | |
377 | 372 | | |
378 | 373 | | |
379 | 374 | | |
380 | 375 | | |
381 | 376 | | |
382 | 377 | | |
383 | | - | |
| 378 | + | |
384 | 379 | | |
385 | 380 | | |
386 | 381 | | |
| |||
0 commit comments