Add strace debugging aid.

This commit is contained in:
Yann E. MORIN" 2007-07-12 13:34:56 +00:00
parent 9e90a9a9e2
commit 28f92e8b09
3 changed files with 158 additions and 1 deletions

118
config/debug/strace.in Normal file
View File

@ -0,0 +1,118 @@
# strace
menuconfig STRACE
bool
prompt "strace"
default n
if STRACE
choice
bool
prompt "strace version"
config STRACE_V_4_5
bool
prompt "4.5"
depends on OBSOLETE
config STRACE_V_4_5_1
bool
prompt "4.5.1"
depends on OBSOLETE
config STRACE_V_4_5_2
bool
prompt "4.5.2"
depends on OBSOLETE
config STRACE_V_4_5_3
bool
prompt "4.5.3"
depends on OBSOLETE
config STRACE_V_4_5_4
bool
prompt "4.5.4"
depends on OBSOLETE
config STRACE_V_4_5_5
bool
prompt "4.5.5"
depends on OBSOLETE
config STRACE_V_4_5_6
bool
prompt "4.5.6"
depends on OBSOLETE
config STRACE_V_4_5_7
bool
prompt "4.5.7"
depends on OBSOLETE
config STRACE_V_4_5_8
bool
prompt "4.5.8"
depends on OBSOLETE
config STRACE_V_4_5_9
bool
prompt "4.5.9"
depends on OBSOLETE
config STRACE_V_4_5_10
bool
prompt "4.5.10"
depends on OBSOLETE
config STRACE_V_4_5_11
bool
prompt "4.5.11"
depends on OBSOLETE
config STRACE_V_4_5_12
bool
prompt "4.5.12"
depends on OBSOLETE
config STRACE_V_4_5_13
bool
prompt "4.5.13"
depends on OBSOLETE
config STRACE_V_4_5_14
bool
prompt "4.5.14"
depends on OBSOLETE
config STRACE_V_4_5_15
bool
prompt "4.5.15"
# CT_INSERT_VERSION_ABOVE
# Don't remove above line!
endchoice
config STRACE_VERSION
string
default "4.5" if STRACE_V_4_5
default "4.5.1" if STRACE_V_4_5_1
default "4.5.2" if STRACE_V_4_5_2
default "4.5.3" if STRACE_V_4_5_3
default "4.5.4" if STRACE_V_4_5_4
default "4.5.5" if STRACE_V_4_5_5
default "4.5.6" if STRACE_V_4_5_6
default "4.5.7" if STRACE_V_4_5_7
default "4.5.8" if STRACE_V_4_5_8
default "4.5.9" if STRACE_V_4_5_9
default "4.5.10" if STRACE_V_4_5_10
default "4.5.11" if STRACE_V_4_5_11
default "4.5.12" if STRACE_V_4_5_12
default "4.5.13" if STRACE_V_4_5_13
default "4.5.14" if STRACE_V_4_5_14
default "4.5.15" if STRACE_V_4_5_15
# CT_INSERT_VERSION_STRING_ABOVE
# # Don't remove above line!
endif

View File

@ -0,0 +1,38 @@
# Build script for strace
is_enabled="${CT_STRACE}"
do_print_filename() {
[ "${CT_STRACE}" = "y" ] || return 0
echo "strace-${CT_STRACE_VERSION}"
}
do_debug_strace_get() {
CT_GetFile "strace-${CT_STRACE_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/strace/
}
do_debug_strace_extract() {
CT_ExtractAndPatch "strace-${CT_STRACE_VERSION}"
}
do_debug_strace_build() {
CT_DoStep INFO "Installing strace"
mkdir -p "${CT_BUILD_DIR}/build-strace"
CT_Pushd "${CT_BUILD_DIR}/build-strace"
CT_DoLog EXTRA "Configuring strace"
"${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--prefix=/usr
CT_DoLog EXTRA "Building strace"
make
CT_DoLog EXTRA "Installing strace"
make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install
CT_Popd
CT_EndStep
}

View File

@ -8,7 +8,7 @@ doHelp() {
Usage: ${myname} <tool> [option] <version> Usage: ${myname} <tool> [option] <version>
'tool' in one of: 'tool' in one of:
--gcc, --binutils, --glibc, --uClibc, --linux, --gcc, --binutils, --glibc, --uClibc, --linux,
--gdb, --dmalloc, --duma --gdb, --dmalloc, --duma, --strace
Valid options for all tools: Valid options for all tools:
--experimental, -x --experimental, -x
@ -56,6 +56,7 @@ while [ $i -le $# ]; do
--gdb) cat=GDB; tool=gdb; tool_prefix=debug/ tool_suffix=;; --gdb) cat=GDB; tool=gdb; tool_prefix=debug/ tool_suffix=;;
--dmalloc) cat=DMALLOC; tool=dmalloc; tool_prefix=debug/ tool_suffix=;; --dmalloc) cat=DMALLOC; tool=dmalloc; tool_prefix=debug/ tool_suffix=;;
--duma) cat=DUMA; tool=duma; tool_prefix=debug/ tool_suffix=;; --duma) cat=DUMA; tool=duma; tool_prefix=debug/ tool_suffix=;;
--strace) cat=STRACE; tool=strace; tool_prefix=debug/ tool_suffix=;;
# Tools options: # Tools options:
-x|--experimental) EXP=1; OBS=;; -x|--experimental) EXP=1; OBS=;;
-o|--obsolete) OBS=1; EXP=;; -o|--obsolete) OBS=1; EXP=;;