Commit beeb1191 authored by malenov's avatar malenov
Browse files

minor fix of formatting in detailed stack printout

parent 1917282e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -632,7 +632,6 @@ int push_stack(const char* filename, const char* fctname)
        /* Save Info about it */
        ptr_max_stack = &something;

        //wc_frame = frame;
        wc_frame = update_cnt;          /* current frame number is stored in the variable update_cnt and updated in the function update_wmops() */
        strncpy(location_max_stack, fctname, sizeof(location_max_stack) - 1);
        location_max_stack[sizeof(location_max_stack) - 1] = '\0';
@@ -700,6 +699,7 @@ static void print_stack_call_tree(void)
{
    caller_info* caller_info_ptr;
    int call_level;
    char fctname[MAX_FUNCTION_NAME_LENGTH+1];

    fprintf(stdout, "\nList of functions when maximum stack size is reached:\n\n");

@@ -713,7 +713,10 @@ static void print_stack_call_tree(void)
        }

        /* Print Name */
        fprintf(stdout, "%-42s()", caller_info_ptr->function_name);
        strncpy(fctname, caller_info_ptr->function_name, MAX_FUNCTION_NAME_LENGTH);
        strcat(fctname, "()");
        fprintf(stdout, "%-42s", fctname);
        fprintf(stdout, "%-42s", caller_info_ptr->function_name);

        /* Print Stack Usage (Based on Difference) */
        if (call_level != 0)
@@ -1456,3 +1459,4 @@ int cntr_push_pop = 0; /* global counter for checking balanced push_wmops()