Farley Knight
Farley Knight

Reputation: 1793

How to compile programs to enable LLDB debugging symbols?

On my MacBook at work, I'm trying to use LLDB to attach to a running Ruby process.

It's normally suggested that one compile Ruby with the debug flag -ggdb(3) to use GDB. But I can't find anything equivalent for LLDB. My Google-fu is failing me, so I thought I'd ask, since this seems like an obscure request.

Upvotes: 1

Views: 977

Answers (1)

Enrico Granata
Enrico Granata

Reputation: 3329

I would assume that all that -ggdb does is produce debug information. The format for this debug information is most likely DWARF, which both GDB and LLDB understand

If that is the case, -ggdb is a misnomer and should be fixed. But, for your intents and purposes, you should be able to just compile with -ggdb and then attach with LLDB and things should be all right

Upvotes: 2

Related Questions