File: process_wrapper_gdb.sh

package info (click to toggle)
android-platform-build 1%3A8.1.0%2Br23-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,620 kB
  • sloc: python: 12,074; cpp: 6,068; cs: 5,512; makefile: 2,356; sh: 1,829; java: 1,359; ansic: 987
file content (17 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# This is the command running inside the xterm of our
# debug wrapper.  It needs to take care of starting
# the server command, so it can attach to the parent
# process.  In addition, here we run the command inside
# of a gdb session to allow for debugging.

# On some systems, running xterm will cause LD_LIBRARY_PATH
# to be cleared, so restore it and PATH to be safe.
export PATH=$PREV_PATH
export LD_LIBRARY_PATH=$PREV_LD_LIBRARY_PATH

# Start binderproc (or whatever sub-command is being run)
# inside of gdb, giving gdb an initial command script to
# automatically run the process without user intervention.
gdb -q -x $2/process_wrapper_gdb.cmds --args "$@"