Summary: | --db-command should support %{auxv address} | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Jan Kratochvil <jan> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED NOT A BUG | ||
Severity: | wishlist | CC: | dodji, jan, philippe.waroquiers, tom |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Jan Kratochvil
2010-01-21 19:13:14 UTC
Since Valgrind 3.7.0, there is an embedded gdbserver, which returns the auxv to GDB. Is that working in your case ? Yes, it works, thanks: 0x00000030005087a9 in main () at pie.c:4 4 *(int *)0=0; BTW it would be nice to start GDB automatically, like with --db-attach=yes. gdb ./pie -ex 'target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=11325' (In reply to comment #2) > Yes, it works, thanks: > 0x00000030005087a9 in main () at pie.c:4 > 4 *(int *)0=0; > > BTW it would be nice to start GDB automatically, like with --db-attach=yes. > gdb ./pie -ex 'target remote | /usr/lib64/valgrind/../../bin/vgdb > --pid=11325' We could implement --db-attach=vgdb to indicate that the gdbserver should be used to "attach" (rather than the old --db-attach technique of forking the process, and have the parent launching a gdb to attach to the forked process). However, if the Valgrind process launches a gdb as suggested above, I am wondering what will happen with stdin, C-c, ... when continue is done in the gdb. We should just scrap the old db-attach technology I suspect... With "set target-async on" it should work (resume->target_terminal_inferior->remote_terminal_inferior). With "set target-async off" (the current default) it will probably not. "set target-async on" should fortunately become the default in a reasonable time. |