strace stacktrace: offsets printed

Masatake YAMATO yamato at redhat.com
Tue Nov 4 12:38:45 UTC 2014


Hi,

I have no objection to print both.
The stacktrace feature is still in experimental stage, so I guess it
is o.k. to change the output format.

However, I don't know how Dmitry, the maintainer, may say.
So would you submit a patch and sample output for this list?

Regards,
Masatake YAMATO

On Tue, 4 Nov 2014 11:29:15 +0100, Thomas De Schampheleire <patrickdepinguin at gmail.com> wrote:
> Hi Masatake,
> 
> On Thu, Oct 30, 2014 at 6:19 PM, Masatake YAMATO <yamato at redhat.com> wrote:
>> Sorry to be late to reply.
>>
>> Could you look at print_stack_frame in undwind.c?
>>
>>     static int
>>     print_stack_frame(struct tcb *tcp,
>>                       call_action_fn call_action,
>>                       error_action_fn error_action,
>>                       void *data,
>>                       unw_cursor_t *cursor,
>>                       char **symbol_name,
>>                       size_t *symbol_name_size)
>>     {
>>             ...
>>                         true_offset = ip - cur_mmap_cache->start_addr +
>>                                 cur_mmap_cache->mmap_offset;
>>                         call_action(data,
>>                                     cur_mmap_cache->binary_filename,
>>                                     *symbol_name,
>>                                     function_offset,
>>                                     true_offset);
>>             ...
>>
>>
>> Do you mean you want strace to print the value of 'ip' in stead of true_offset?
> 
> Yes indeed, I find it more logical to print the value obtained from
> libunwind directly.
> If you also prefer the other value, then maybe we can print both?
> 
> Thanks,
> Thomas




More information about the Strace-devel mailing list