* * * * *
Not anyone should be allowed to run a debugger
I'm working on “Project: America-On-Line-Instant-Messenger” (hey, don't judge
me—it has nothing to to with AOL (America On-Line) [1], it's more a pun on
the project name than anything else). I've got a major portion of it running,
but it's exhibiting some odd behavior—it runs fine on Linux, but fails rather
quickly on Mac OS-X with “not enough memory.”
Problem one—I'm used to using gdb (The GNU Project Debugger) [2], but Mac OS-
X uses lldb [3]. Sigh. I did find a type of Rosetta Stone [4] that shows
similar commands in both gdb and lldb, so that issue is solved.
I was then able to track down the message to a source file in LPeg [5], but
when I set a breakpoint on the line in question, it never got triggered.
Puzzling, but I was not able to solve the issue by the time I had to leave
work.
So now I'm home and I have an idea to scan more than just the .c files. It's
a simple matter to log into my Mac workstation at work to see if that's the
issue. I start looking, and lo, I find the message in two more locations,
hidden behind a #define in a header file. I narrow it down to just one
location (the other location pre-loading the string into the Lua VM (Virtual
Machine)).
First, the lldb commands are bit more verbose than those of gdb. Second, no
matter what I do, all I get is:
-----[ shell ]-----
[spc]XXXXXXXXXXXXXXXXXXXXXXXXX>lldb XXXXXXXXX
(lldb) target create "XXXXXXXXX"
Current executable set to 'XXXXXXXXX' (x86_64).
(lldb) process launch -- config.lua
error: process exited with status -1 (lost connection)
(lldb)
-----[ END OF LINE ]-----
Nothing I do works.
Then I remember—when I first ran lldb at the office, this modal dialog box
popped up asking for my password in order to debug a program I wrote, running
under my account. My initial reaction is, Smooth going, Apple! Way to protect
me from myself! But then I realize this is probably to prevent rogue programs
trying to attach to running programs to do nefarious things without my
knowledge.
It's bad enough I have to jump through hoops to get the computer to run my
own written programs. Now this?
XXXX!
It really does seem at times as if the general purpose computer is a dinosaur
looking up at the sky, wondering, “What is that?” [6]
[1]
https://www.aol.com/
[2]
https://www.gnu.org/software/gdb/
[3]
https://lldb.llvm.org/
[4]
https://lldb.llvm.org/lldb-gdb.html
[5]
http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
[6]
https://boingboing.net/2012/01/10/lockdown.html
Email author at
[email protected]