LLDB @VERSION@ for Mac OS X 10.4 Tiger

LLDB, the debugger of the LLVM project, for PowerPC Macs with Mac OS X
10.4: a G3, a G4 or a G5. No release of LLDB supports PowerPC Mac OS X.
This one is LLDB @VERSION@ with the missing parts written for it: the
PowerPC half of debugserver, the calling convention, and a reader of
function prologues for backtraces. It puts in place:

  /opt/lldb/bin
      lldb, debugserver (it controls the program that lldb debugs) and
      lldb-argdumper
  /opt/lldb/lib
      liblldb, the debugger itself
  /usr/local/bin/lldb
      a link to /opt/lldb/bin/lldb
  /opt/lldb/share/doc/lldb-tiger
      this Read Me, the licenses, update-shell-profile.sh

Using it

The installer puts /usr/local/bin on the PATH in your shell profile
(~/.bash_profile for bash, the shell Tiger gives new accounts, or the
.bash_login or .profile you already have) and keeps the old profile beside
it as .lldbsave. Open a new Terminal window:

  lldb ./myprogram
  (lldb) b main
  (lldb) run
  (lldb) bt
  (lldb) frame variable
  (lldb) next
  (lldb) p count * 2
  (lldb) finish
  (lldb) continue

lldb -p 1234 attaches to the process 1234, and detach lets it run on.
Control-C stops a running program. help lists the commands, and the arrow
keys and Tab work at the prompt. Tiger's own debugger, gdb, stays as it is.

Debug information

LLDB reads DWARF, and Tiger's compiler writes STABS unless it is told
otherwise. Compile with -gdwarf-2:

  gcc -gdwarf-2 -c prog.c
  gcc -o prog prog.o
  lldb ./prog

The debug information stays in the object files, and the program only says
where they are. So compile and link in two steps, as above, and leave the
.o files where the compiler wrote them. A program compiled and linked by
one command has no object file left, and no source lines in LLDB. dsymutil
(Xcode 2.5 has it) collects the debug information in prog.dSYM, which LLDB
reads too: then the object files can go.

GCC 13 from tiger.v2core.com writes DWARF with a plain -g.

A program without DWARF still has its symbols: breakpoints by function
name, a backtrace, the registers and the disassembly work, in the system's
libraries as well.

What it cannot do

Expressions that need compiled code. LLDB compiles most expressions for
the Mac that it debugs, and LLVM 10 cannot compile for PowerPC Mac OS X.
So p and expr work as far as LLDB's interpreter goes: variables,
structures, pointers, integer arithmetic, and calls of functions that take
and return integers and pointers, such as p (int)strlen(name). They cannot
do floating point arithmetic, pass a string literal to a function, or
print an Objective-C object with po. LLDB says so when an expression needs
more.

STABS: see above. Watchpoints: debugserver has none for PowerPC. Python
scripting is not built in. Intel Macs: this package is PowerPC only.

LLDB debugs the programs of the person who runs it. For a program of
another account, run it with sudo.

Removing it

  sudo rm -rf /opt/lldb /usr/local/bin/lldb
  sudo rm -rf "/Library/Receipts/LLDB @PKGVERSION@.pkg"

How it was made

LLVM, Clang and LLDB @VERSION@, with the changes for Mac OS X 10.4 as a
series of patches, built with GCC 13.4. The source archive on
tiger.v2core.com (lldb-@PKGVERSION@-tiger-source.tar.gz) has the release,
the patches and the build scripts. LLVM 10 is the last release that still
has every PowerPC piece that the port builds on.

Licenses

LLVM, Clang and LLDB are under the Apache License 2.0 with LLVM
exceptions. The changes for Mac OS X 10.4 are under the same license.
License.txt has the texts.

@DATE@
