tom fogal wrote:
> Andy Howell <[email protected]> writes:
>> Julian Seward wrote:
>>>> When I specify --db-attach with helgrind, the debugger is attached to t
>> he
>>>> thread in question, not the its parent process. Is there a way to make it
>>>> attach to the process instead?
>>> Not sure I quite understand. When you say "parent process", do you mean
>>> "the root thread of the process" ?
>>>
>>> J
>>>
>> Yes, exactly. In the debugger I only see one thread, so I can't
>> inspect my other threads to see what is going on.
> [snip]
>
> Use `info threads', and `thread <num>' to switch.
>
> -tom
>
Tom,
Thats the problem, unless I call gdb via my script to set the parent
pid, there are no
threads:
(gdb) info threads
(gdb)
Looks like gdb is getting that via the '%f' parameter passed by the
--db-command. That is
set to /proc/PID/fd/FILE_DESCRIPTOR
where FILE_DESCRIPTOR is the descriptor for the binary. Since my script is
redirecting gdb
to use the parent pid of the thread in question, I need to find a way to work
out the
proper descriptor.
I tried to force gdb to read the symbols from the binary with:
symbol-file BINARY_NAME -readnow
But that didn't help.
Once I figure out how to grab the symbol table, I should be fine.
Thanks,
Andy
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users