|
From: Matthias S. <zz...@ge...> - 2015-05-15 19:37:35
|
On 14.05.2015 22:28, Philippe Waroquiers wrote: > The patch below aims at allowing a backtrace when Valgrind does > client syscalls. I now tried two systems. * x86 gcc-4.8.4, gdb-7.9: Here I have for: (gdb) info symbol $eip vgModuleLocal_do_syscall_for_client_WRK + 60 in section .text (gdb) bt inline-frame.c:167: internal-error: inline_frame_this_id: Assertion `frame_id_p (*this_id)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) n After patch: (gdb) bt #0 vgModuleLocal_do_syscall_for_client_WRK () at m_syswrap/syscall-x86-linux.S:122 #1 0x380b6fa6 in do_syscall_for_client (syscall_mask=0x2, tst=0xbed1bb28, syscallno=100) at m_syswrap/syswrap-main.c:313 #2 vgPlain_client_syscall (tid=496354177, trc=3968008192) at m_syswrap/syswrap-main.c:1682 #3 0xffffcd35 in ?? () After adding .cfi_offset statements: (gdb) bt #0 vgModuleLocal_do_syscall_for_client_WRK () at m_syswrap/syscall-x86-linux.S:124 #1 0x380b6fa6 in do_syscall_for_client (syscall_mask=0x2, tst=0xbee57b28, syscallno=162) at m_syswrap/syswrap-main.c:313 #2 vgPlain_client_syscall (tid=tid@entry=1, trc=trc@entry=77) at m_syswrap/syswrap-main.c:1682 #3 0x380b3220 in handle_syscall (tid=tid@entry=1, trc=77) at m_scheduler/scheduler.c:1103 #4 0x380b49b7 in vgPlain_scheduler (tid=tid@entry=1) at m_scheduler/scheduler.c:1416 #5 0x380c71b8 in thread_wrapper (tidW=1) at m_syswrap/syswrap-linux.c:103 #6 run_a_thread_NORETURN (tidW=1) at m_syswrap/syswrap-linux.c:156 #7 0x00000000 in ?? () The same is valid for calls into do_syscall_WRK (e.g. when adding --vgdb-stop-at=startup). * amd64 gcc-4.8.4 and gcc-4.9.2, gdb-7.9 For amd64 I have the same behaviour as you, a lot of strange entries inserted (for both gcc-4.8.4 and gcc-4.9.2). Checking x86 code in this system is the same as on the other system for gcc-4.8.4 (bad callstacks) x86 code with gcc-4.9.2, the callstacks look already good before. The updated patch is attached. Regards Matthias |