about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2019-11-20 16:37:17 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2019-11-20 16:37:17 +0100
commit9b40e0bb9af6641a23586fd5999430e4c7622636 (patch)
treeda101725fa84e3fe01a33f14022e1f458d5b80fc /src/test/debuginfo/enum-thinlto.rs
parent76ade3e8ac42cd7a7b7c3c5ef54818ab68e3ebdc (diff)
downloadrust-9b40e0bb9af6641a23586fd5999430e4c7622636.tar.gz
rust-9b40e0bb9af6641a23586fd5999430e4c7622636.zip
made gdb pretty-printing script more robust when printing uninitialized vec.
I based this solution on my reading of:

https://rethinkdb.com/blog/make-debugging-easier-with-custom-pretty-printers#what-is-still-to-be-done

That post claims that there is no clean way to check for garbage pointers, and
so this PR adopts the same solution of tentatively attempting to convert a
dererence to a string, which throws a clean exception on garbage that we can
catch and recover from.

I only made the change to vec and not the other pretty printers because I wanted
to focus my effort on the simplest thing that would resolve issue #64343. In
particular, I *considered* generalizing this fix to work on the other datatypes
in the pretty-printing support library, but I don't want to invest effort in
that until after we resolve our overall debugging support strategy; see also
issues #60826 and #65564.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions