/* logargs.cmd -- for GDB */

version = '1.1'
say "logargs" version

say "Enter function name:"
parse pull functionName

'break' functionName
parse var RC 'Breakpoint 'breakNumber' at 'breakAddress':' remainder
if breakNumber = '' then do
  say RC
  return
end

say 'Running...'

done = FALSE
call lineout 'logargs.txt', '*** logargs 'version' --- 'time()' 'date()' ***'
do while (done == FALSE)
  'continue'
  if (substr(RC, 3, 10) \= 'Breakpoint') then
    done = TRUE
  else do
    parse var RC prejunk '('args')' postjunk
    call lineout 'logargs.txt', args
  end
end
say RC
