|
From: WAROQUIERS P. <phi...@eu...> - 2010-10-25 15:18:36
|
>Does anybody have suggestion how to fix the problem in user space? > >I can easily imagine scenario where I would need to use >valgrind with debugger >on a machine, where I have no root access. You might try the gdbserver patch (http://bugs.kde.org/show_bug.cgi?id=214909) With this patch, if you invoke the vgdb relay application with --max-invoke-ms=0, then no usage of ptrace is done. In addition, it provides a fully debuggable process under valgrind E.g. you can put breaks, look at threads, call code from gdb, modify variables, invoke various valgrind tool client requests at any point (memleak search, make some memory defined or undefined, ...) ... (the only drawback of --max-invoke-ms=0 is that you cannot connect to the valgrind process to debug if it is blocked in a system call). Note that the usage is slightly different of --db-attach=yes: You must give --vgdb=yes arg to valgrind and then you start a gdb in another window and do: gdb <your executable> target remote | vgdb --max-invoke-ms=0 --vgdb=yes valgrind arg indicates to run an gdbserver embedded in valgrind. The gdb target remote command above will "connect" to this gdbserver. For more info, you can read coregrind/m_gdbserver/README_DEVELOPPERS or do valgrind --help or (inside gdb, when connected) use: monitor help (the embedded valgrind gdbserver will provide a help for the requests it understands). ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |