Skip to content

Commit

Permalink
Adding custom debugger executable parameter to the apex_exec script
Browse files Browse the repository at this point in the history
This allows calling rocgdb or cuda-gdb or a different gdb
  • Loading branch information
khuck committed Jun 24, 2024
1 parent 6158867 commit 95570f6
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/scripts/apex_exec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ $(basename "$0") <APEX options> executable <executable options>
where APEX options are zero or more of:
--apex:help show this usage message
--apex:debug run with APEX in debugger
--apex:debugger debugger executable name (default: gdb)
--apex:verbose enable verbose list of APEX environment variables
--apex:screen enable screen text output (on by default)
--apex:screen-detail enable detailed text output (off by default)
Expand Down Expand Up @@ -185,6 +186,9 @@ while (( "$#" )); do
;;
--apex:debug)
debug=yes
if [ "$debugger" == "" ] ; then
debugger=gdb
fi
shift
;;
--apex:pthread)
Expand Down Expand Up @@ -422,6 +426,16 @@ while (( "$#" )); do
postprocess=yes
shift
;;
--apex:debugger)
debug=yes
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
debugger=$2
shift 2
else
echo "Error: Argument for $1 is missing" >&2
usage
fi
;;
--apex:concur_max|--apex:concur-max)
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
export APEX_MEASURE_CONCURRENCY_MAX_TIMERS=$2
Expand Down Expand Up @@ -710,11 +724,7 @@ else
gdbargs="-batch -q"
fi
#echo "set env LD_AUDIT=${APEX_LD_AUDIT}" >> ./.gdbcmds
if [ $hip = yes ] ; then
debugger="rocgdb -x ${gdbcmds} ${gdbargs} --args"
else
debugger="gdb -x ${gdbcmds} ${gdbargs} --args"
fi
debugger="${debugger} -x ${gdbcmds} ${gdbargs} --args"
else
export LD_LIBRARY_PATH=${APEX_LD_LIBRARY_PATH}
export LD_PRELOAD=${APEX_LD_PRELOAD}
Expand Down

0 comments on commit 95570f6

Please sign in to comment.