RFC strace via gdbserver

Dmitry V. Levin ldv at altlinux.org
Mon Jan 25 02:02:10 UTC 2016


Hi,

On Wed, Jan 20, 2016 at 12:10:25PM -0800, Josh Stone wrote:
> Hi,
> 
> I've been experimenting with using strace via gdbserver, through the gdb
> remote protocol.  It's now in good enough state that I'd like to get
> some feedback.
> 
> First, syscall support in gdbserver is very new.  There was a patch
> posted a few years ago by Philippe Waroquiers, but I only just finished
> getting that merged last week.  This will be in GDB 7.11:
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=82075af2c14b1f8a54fa5796fb63f7ef23f98d9d
> 
> You can find my strace hacking at github.com/cuviper/strace/.  It adds a
> "-G host:port" option to point to a listening gdbserver.  However I've
> mostly just tested this on localhost so far, and surely cross-arch stuff
> won't work.

I'm not familiar with gdb remote protocol, so I'm not quite sure how
difficult it would take to implement all features supported by strace,
some of them (like -P and -y options) are not even ptrace based.

If it's feasible, then gdbserver support might be worth doing.

[...]
> All feedback is welcome.  If you think this might be interesting enough
> to properly merge into strace, I'd especially appreciate guidance on how
> to best approach that.

A new feature like this has to be explicitly enabled at configure stage,
and all new code specific to the feature has to be properly ifdef'ed.

There has to be a test verifying that the new feature works.
Ideally, the whole test suite should pass in gdbserver mode.

Besides that, I cannot think of anything project specific.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160125/9f88344d/attachment.bin>


More information about the Strace-devel mailing list