[RFC] print stack trace after each syscall

Luca Clementi luca.clementi at gmail.com
Tue Jun 25 07:14:13 UTC 2013


On Mon, Jun 24, 2013 at 3:44 AM, Denys Vlasenko <dvlasenk at redhat.com> wrote:
> On 06/24/2013 09:18 AM, Luca Clementi wrote:

>
>> +void alloc_mmap_cache(struct tcb* tcp) {
>> +
>> +     if ( tcp->mmap_cache)
>> +             perror_msg_and_die("Memory map cache is empty");
>> +     if ( tcp->mmap_cache_size)
>> +             perror_msg_and_die("Memory map cache is empty");
>
> ?? please explain the code above.

That's a completely useless piece of code!
There is already the same test before the function invocation, and the
error message is also misleading.
Ill fix it.

>> +void delete_mmap_cache(struct tcb* tcp) {
>
> The { should be on the next line, as the rest of the strace source does.
>

>> +             // use libunwind to unwind the stack, which works even for code compiled
>
> I don't understand what "which works even for code compiled"
> tries to say.
>

Some old cut&paste left over....

Clem




More information about the Strace-devel mailing list