Lurker News
Hey HN my name is Thassilo, I'm a student and passionate programmer from Germany.

I want to showcase Spray, a small C debugger I've been working on for a few months now. Spray has a very simple and approachable interface. Its feature set is limited at this point, but it's already enough to tackle some basic problems. I stared to work on Spray because I was curious about how debuggers work. I am also trying to design Spray in such a way that it's easy to grasp and has a small mental overhead.
I'd love to get your feedback on Spray.
Email: d4kd (at) proton (dot) me
PS: I'm generally interested compilers and language tool chains, and I'm looking for similar-minded people to work and collaborate with. I have a few similar projects on my GitHub: https://github.com/d4ckard?tab=repositories. If you find Spray interesting, you might enjoy playing around with them too.

Comments (129) 27 threads

Earlier comments
cyberpunk1 reply#
Why do you put spaces between your function names and their arguments?

I find it quite jarring, as someone who's spent a good 18 years reading C code :}

    return lookup_breakpoint (dbg->breakpoints, get_pc (dbg->pid));

vs

    return lookup_breakpoint(dbg->breakpoints, get_pc(dbg->pid));

Edit: I tend to lean towards the 'bsd' style, if you have an open or freebsd system, try 'man style' and try their rules on for size.
cyberpunk#
Damn, I really have been in my cave for too long! Forgot all about their weird if {}.

Thanks!

darkwater#
Off-topic but I can not avoid a tear of joy reading this:

> In the Unix world, “portability” refers to porting to different Unix versions. For a GNU program, this kind of portability is desirable, but not paramount.
The primary purpose of GNU software is to run on top of the GNU kernel, compiled with the GNU C compiler, on various types of CPU. So the kinds of portability that are absolutely necessary are quite limited. But it is important to support Linux-based GNU systems, since they are the form of GNU that is popular.

WalterBright#
> I stared to work on Spray because I was curious about how debuggers work.

Awesome. That's the way it's done!

forgotpwd161 reply#
Cool job. Grats!

>Parts of the Spray frontend are written in Scheme
Why you decided it do it that way rather fully in C or fully in Scheme?

D4ckard#
Scheme doesn't work well for very low-level code, and C doesn't handle processing source code very well. For that I'd rather use a functional language. Also, I like using different programming languages (though not necessarily in the same project).
demyinn#
Super awesome project!

Load more comments