diff options
author | axel <axel@liljencrantz.se> | 2006-02-02 01:49:11 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-02 01:49:11 +1000 |
commit | feabc032f62cc2a2dd4c2626b1c6806a22d5988d (patch) | |
tree | 88773f269100dad40fff31376f81470d7f62a2cc /exec.c | |
parent | 9f9f7bf95aa56f266994647b008116721f95132a (diff) |
Generalize the stack tracing code, add support for showing events and command substitutions in stack traces
darcs-hash:20060201154911-ac50b-707358ea50231661c05a92b40ca109ec801081e6.gz
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -797,25 +797,17 @@ void exec( job_t *j ) string_buffer_t sb; const wchar_t * def = function_get_definition( p->argv[0] ); -// fwprintf( stderr, L"run function %ls\n", argv[0] ); + //fwprintf( stderr, L"run function %ls\n", argv[0] ); if( def == 0 ) { debug( 0, _( L"Unknown function '%ls'" ), p->argv[0] ); break; } - /* - These two lines must be called before the new block is pushed - */ - int lineno = parser_get_lineno(); - wchar_t *file = parser_current_filename()?wcsdup(parser_current_filename()):0; - parser_push_block( FUNCTION_CALL ); - al_init( ¤t_block->param2.function_vars ); + current_block->param2.function_call_process = p; current_block->param1.function_name = wcsdup( p->argv[0] ); - current_block->param3.call_lineno = lineno; - current_block->param4.call_filename = file; if( builtin_count_args(p->argv)>1 ) { @@ -823,9 +815,6 @@ void exec( job_t *j ) for( i=1, arg=p->argv+1; *arg; i++, arg++ ) { - al_push( ¤t_block->param2.function_vars, - escape(*arg, 1) ); - if( i != 1 ) sb_append( &sb, ARRAY_SEP_STR ); sb_append( &sb, *arg ); |