Improved detection of core files in debugapp; improved user prompting in debugapp

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@17274 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2003-07-21 09:40:04 +00:00
parent d0e0c70837
commit 1f24f55031
2 changed files with 29 additions and 13 deletions

View file

@ -1,3 +1,9 @@
Mon Jul 21 10:42:42 2003 Nicola Pero <n.pero@mi.flashnet.it>
* debugapp.in: Detect core files with name core.xxx, not just
core, as found on some gnu-linux systems. Improved user
prompting.
Mon Jul 21 10:31:08 2003 Andrew Ruder <aeruder@ksu.edu>
* debugapp.in: Pass debugapp arguments to gdb to use when running

View file

@ -107,15 +107,25 @@ case "$app" in
done;;
esac
corefile=
if [ -f core ]; then
echo -e "Core image has been found in working directory. Use it? ";
# Need an argument here for Solaris
read REPLY;
if [ $REPLY = y ]; then
corefile="--core=core";
fi
fi
# Search for a core file in the current directory.
corearg=
corefiles="core*"
for corefile in $corefiles; do
if [ -f "$corefile" ]; then
echo -e "Core image ($corefile) has been found in working directory. Use it (y/n)? ";
# Need an argument here for Solaris
read REPLY;
if [ $REPLY = y ]; then
echo -e "Using it.";
corearg="--core=$corefile";
break;
else
echo -e "Ignoring it.";
fi
fi
done
unset corefile
unset corefiles
if [ -z "$full_appname" ]; then
echo "Can't find the required application: $app!"
@ -171,7 +181,7 @@ if [ "$LIBRARY_COMBO" = nx-nx-nx -a "$GNUSTEP_HOST_OS" = nextstep4 ]; then
fi
# Support for GDBbundle under OPENSTEP
"$GDB" -connect TextEdit $gdbargs "$full_appname/$appname" "$corefile"
"$GDB" -connect TextEdit $gdbargs "$full_appname/$appname" "$corearg"
else
# Determine if the application has a binary for this operating system
@ -193,15 +203,15 @@ fi
#Support for GDBbundle under OPENSTEP
if [ $GNUSTEP_HOST_OS = nextstep4 ]; then
"$GDB" -connect TextEdit "$file_appname" "$corefile"
"$GDB" -connect TextEdit "$file_appname" "$corearg"
else
if [ -z "$corefile" ]; then
if [ -z "$corearg" ]; then
# Arguments passed to debugapp are passed over to the
# application, in the same way as it happens for openapp.
"$GDB" --args "$file_appname" "$@"
else
"$GDB" "$file_appname" "$corefile"
"$GDB" "$file_appname" "$corearg"
fi
fi