On Sun, Nov 3, 2013 at 2:01 PM, Masatake YAMATO <[email protected]> wrote:
> Based on the discussion on strace-devel, I improved following points:
>
> * use unwind_ as prefix for functions exported from unwind.c
>
I really like this!
[...]
> +/*
> + * Keep a captured stracktrace.
> + */
> +struct call_t {
> + struct call_t* next;
> + char* binary_filename;
> + char* symbol_name;
> + unw_word_t function_off_set;
> + unsigned long true_offset;
> + const char* error;
> +};
> +
> +struct queue_t {
> + struct call_t *tail;
> + struct call_t *head;
> +};
Hey Masatake,
I am just wondering if it make sense to keep all those field in the
call_t struct?
Wouldn't a simple string buffer do the job?
For example something like:
struct call_t {
struct call_t* next;
char* output_line;
};
You insert one output line for each stack line.
And then when it's time to fire the output you can simply "fputs" for
each entry in the queue_t.
Would this make the whole patch simpler?
Please let me know if I am missing something.
Luca
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel