blob: 38b948ad2635f34d2c11c9f4b58f4c11efee1fa2 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001#!/bin/sh
2
3# This is the command running inside the xterm of our
4# debug wrapper. It needs to take care of starting
5# the server command, so it can attach to the parent
6# process. In addition, here we run the command inside
7# of a gdb session to allow for debugging.
8
9# On some systems, running xterm will cause LD_LIBRARY_PATH
10# to be cleared, so restore it and PATH to be safe.
11export PATH=$PREV_PATH
12export LD_LIBRARY_PATH=$PREV_LD_LIBRARY_PATH
13
14# Start binderproc (or whatever sub-command is being run)
15# inside of gdb, giving gdb an initial command script to
16# automatically run the process without user intervention.
17gdb -q -x $2/process_wrapper_gdb.cmds --args "$@"