A Walnut's Thoughts

My name is Anthony, I'm a self taught developer based in the midwest. I'm interested in systems programming, dev tools, and game design. Currently looking for work.

3 miles deep in the Rust debugging rabbit hole. If you have any questions regarding that, feel free to send me an email or a message in the Rust zulip or LLVM discourse.

I love epic fantasy novels, my favorites are Malazan Book of the Fallen and The Wheel of Time. Currently reading The Black Company.

LLDB's TypeSystems Part 2: PDB

In my previous post, I described implementing PDB parsing as a can of worms. That might have been a bit of an understatement. PDB has been one "oh, it's gonna be twice as much work as I thought" after another. Implementing it has revealed many of the same issues as the TypeSystem itself: lack of documentation, cryptic implementations, poor naming schemes, and unclear expectations. Despite all that, I was able to get it working.

That means TypeSystemRust can be used for executables that target *-gnu or *-msvc. It's not quite done yet, but this is a massive step towards the TypeSystem being fully complete. I want to talk a bit about the process, at least partially for posterity. As we'll see later, PDB itself is also not documented very well, so any additional literature could be helpful to someone down the line.

Fair warning, we're getting into the weeds. This is gonna be a long one.

2025-07-07 · 37 min · 7396 words

LLDB's TypeSystems: An Unfinished Interface

Well, it's "done". TypeSystemRust has a (semi) working prototype for LLDB 19.x. It doesn't support expressions or MSVC targets (i.e. PDB debug info), and there are a whole host of catastrophic crashes, but it more or less proves what it needs to: Rust's debugging experience can be improved, and there are worthwhile benefits to a working TypeSystem that can't be emulated on other layers of the debugging stack.

If you want to test it out, you'll need to build my fork from source (sorry), but then lldb.exe can be used as-is, or you can point a debugger extension like lldb-dap or CodeLLDB to your newly built lldb-dap.exe or liblldb.dll respectively. If you're on Windows, make sure to compile for MSVC otherwise CodeLLDB won't be able to interface with liblldb properly.

2025-03-28 · 25 min · 4884 words

So you want better debug info?

Let me start with an emphatic "me too".

I've put many of my side projects on hold because recent events have resulted in, what I consider to be, an unacceptable degredation of the debugging experience. It's a bit hard to focus on whatever I'm doing when I have to fight to figure out what's in a Vec. One of the great things about programming is that we're the ones who make our own tools; we don't have to just blindly accept mediocrity.

2025-02-14 · 25 min · 4926 words

TwoVec: A Very Silly Container

Lets say you want to store two different types of objects in 1 container. Simple right? Just slap those puppies in a tuple and you're good to go:

let list: Vec<(u8, f32)> = vec![(255, 20.0), (10, 37.0)];

But what if you wanted to include elements of two different types in arbitrary orders? Thankfully, there's sum types for that:

pub enum Val {
    A(u8),
    B(f32),
}

... {
    let list = vec![Val::A(255), Val::B(20.0), Val::B(37.0), Val::A(10)];
}

One small problem. That's wasteful.

2024-10-18 · 21 min · 4093 words

Why is language documentation still so terrible?

Seriously, is there a good reason for this? I feel like I'm going crazy because almost every language doc I've looked at is legitimately awful in a bunch of obvious ways. It's not uncommon to see third party libraries updated by a single person that are better structured, more thorough, with better layouts than the official documentation upheld by the language team itself.

2024-09-12 · 25 min · 4829 words