simon-git: xtruss (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Sep 13 11:31:07 BST 2020


TL;DR:
  27d1287 Update and restructure to the latest PuTTY code.
  f373f51 Turn xl->textbuf into a strbuf.
  6ff0fc7 Simplify the coroutine read macro system.

Repository:     https://git.tartarus.org/simon/xtruss.git
On the web:     https://git.tartarus.org/?p=simon/xtruss.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2020-09-13 11:31:07

commit 27d12874fb29617a053f4f4410a8b293c3be6973
web diff https://git.tartarus.org/?p=simon/xtruss.git;a=commitdiff;h=27d12874fb29617a053f4f4410a8b293c3be6973;hp=b347399154ecb80862beb5b954191cd68bb9a38e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 13 08:19:48 2020 +0100

    Update and restructure to the latest PuTTY code.
    
    xtruss has always been a spin-off project of PuTTY. It was derived,
    once, from an old version of the PuTTY code, namely git commit
    d58d1692b8fca54fa2a2bebc60ebcda386b71895. That code is now very out of
    date, and I've been thinking for ages that it would be good to update
    it, especially after all the major refactoring that happened in PuTTY
    in the last couple of years has actually made it _more_ convenient to
    reuse the library facilities in spinoff projects. Not only that, but
    some directly useful functionality has been added in PuTTY, such as
    setting up a local X11 server port to listen on, and writing out its X
    authority file, so I can throw away xtruss's separate version of that.
    
    This commit brings things up to date: xtruss is now based on PuTTY git
    commit 7003b43963aef6cdf2841c2a882a684025f1d806, which is the current
    state of development as of now. Moreover, the source files shared with
    the PuTTY code base are all identical to their states upstream, except
    for a very small number of removed sections clearly marked with
    
        #if 0 /* removed in xtruss */
        ...
        #endif /* removed in xtruss */
    
    which should make it easy to bring in updates in future.
    
    There was essentially no way to do this by means of a proper git merge
    - not only has too much changed in the meantime, but xtruss's
    directory layout was simplified from PuTTY's so even the most obvious
    parts of the merge didn't work usefully. So instead I've lifted the
    xtruss layer off the top of the old code, and transplanted it on to
    the new code, essentially rewriting the glue layers that interface to
    PuTTY's internal abstractions (Plug and the like), but leaving the
    main X tracing logic unchanged.
    
    In the course of that, I've also taken the opportunity to break up the
    xtruss source itself into multiple source files. Most of them - all
    the interesting stuff! - now live in the platform-independent
    top-level directory, while the official main() and the very small
    number of Unix-specific parts live in unix/uxxtruss.c.
    
    This fulfills the TODO item from the big comment in the old monolithic
    uxxtruss.c that it would be nice to separate out the platform-
    dependent parts. This opens the way to write a Windows port of xtruss,
    should anyone ever need it!

 .gitignore                  |    7 +-
 LICENCE                     |    6 +-
 Makefile.am                 |   19 +-
 be_misc.c                   |  154 +
 callback.c                  |  133 +
 charset.h                   |  154 -
 conf.c                      |  593 ++++
 configure.ac                |    2 +-
 defs.h                      |  218 ++
 errsock.c                   |   74 +
 int64.h                     |   24 -
 logging.c                   |  516 +++
 marshal.c                   |  318 ++
 marshal.h                   |  340 ++
 memory.c                    |  134 +
 misc.c                      |  877 ++---
 misc.h                      |  451 ++-
 mpint_i.h                   |  324 ++
 network.h                   |  329 +-
 nocproxy.c                  |   36 -
 noproxy.c                   |   32 +
 nullplug.c                  |   42 +
 pproxy.c                    |   17 -
 proxy.c                     | 1480 ---------
 proxy.h                     |   78 +-
 putty.h                     | 2346 +++++++++----
 puttymem.h                  |  130 +-
 puttyps.h                   |    8 -
 ssh.h                       | 1864 ++++++++---
 sshauxcrypt.c               |  172 +
 sshchan.h                   |  316 ++
 sshcr.h                     |   87 +
 sshdes.c                    | 1773 +++++-----
 sshprng.c                   |  287 ++
 sshrand.c                   |  291 +-
 sshserver.h                 |  134 +
 sshsh256.c                  |  939 ++++++
 sshsha.c                    |  411 ---
 sshutils.c                  |  128 +
 storage.h                   |   57 +-
 timing.c                    |  207 +-
 tree234.c                   | 1994 +++++------
 tree234.h                   |   77 +-
 unix.h                      |  188 --
 unix/unix.h                 |  465 +++
 unix/ux_x11.c               |  208 ++
 unix/uxcliloop.c            |  125 +
 unix/uxcons.c               |  629 ++++
 unix/uxfdsock.c             |  357 ++
 unix/uxmisc.c               |  371 +++
 unix/uxnet.c                | 1761 ++++++++++
 unix/uxnogtk.c              |   11 +
 uxnoise.c => unix/uxnoise.c |  101 +-
 unix/uxpeer.c               |   32 +
 unix/uxpoll.c               |  169 +
 uxsel.c => unix/uxsel.c     |   56 +-
 unix/uxsignal.c             |   47 +
 unix/uxutils.c              |   60 +
 unix/uxxtruss.c             |  111 +
 utils.c                     | 1075 ++++++
 ux_x11.c                    |   40 -
 uxmisc.c                    |  152 -
 uxnet.c                     | 1447 --------
 uxxtruss.c                  | 7688 -------------------------------------------
 version.c                   |   40 +-
 version.h                   |   35 +
 x11fwd.c                    | 1519 +++++----
 xtruss-macros.h             |   47 +
 xtruss-proxy.c              |  181 +
 xtruss-record.c             |  621 ++++
 xtruss-trace.c              | 6019 +++++++++++++++++++++++++++++++++
 xtruss.c                    |  562 ++++
 xtruss.h                    |   67 +
 73 files changed, 25381 insertions(+), 16382 deletions(-)

commit f373f51d502b70d9d918f9b3e6ee05075234393c
web diff https://git.tartarus.org/?p=simon/xtruss.git;a=commitdiff;h=f373f51d502b70d9d918f9b3e6ee05075234393c;hp=27d12874fb29617a053f4f4410a8b293c3be6973
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 13 10:19:13 2020 +0100

    Turn xl->textbuf into a strbuf.
    
    This replaces the custom xlog_text and xlog_printf functions with the
    more polished versions in the PuTTY internal APIs, and removes the
    crude ad-hoc realloc.

 xtruss-trace.c | 403 +++++++++++++++++++++++++++------------------------------
 1 file changed, 192 insertions(+), 211 deletions(-)

commit 6ff0fc75dcb9098ae13996b552b6f1d5b6411443
web diff https://git.tartarus.org/?p=simon/xtruss.git;a=commitdiff;h=6ff0fc75dcb9098ae13996b552b6f1d5b6411443;hp=f373f51d502b70d9d918f9b3e6ee05075234393c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 13 11:14:38 2020 +0100

    Simplify the coroutine read macro system.
    
    The old one was based on having lots of variables with related names
    in a struct, implementing what was basically a strbuf. Much simpler to
    use an actual strbuf, now we've got them available.

 xtruss-macros.h |  47 ---------------
 xtruss-record.c | 176 ++++++++++++++++++++++++++++----------------------------
 xtruss-trace.c  | 144 ++++++++++++++++++++++++++--------------------
 xtruss.h        |  28 +++++++++
 4 files changed, 198 insertions(+), 197 deletions(-)



More information about the tartarus-commits mailing list