| The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | #!/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. | 
|  | 11 | export PATH=$PREV_PATH | 
|  | 12 | export 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. | 
|  | 17 | gdb -q -x $2/process_wrapper_gdb.cmds --args "$@" |