[Toybox] strace

Rob Landley rob at landley.net
Wed Dec 19 08:22:21 PST 2018


On 12/18/18 5:45 PM, enh wrote:
> i'm just messing with you really... as i think i've said, i'm not
> convinced having our own strace is such a great idea. it's just such a
> nightmare dealing with multiple personalities, and even at my most
> optimistic i think we're years away from a world where that's no
> longer relevant. (for Android at least: i think the multiarch desktop
> is pretty much dead at this point.)

The x86 desktop's getting kicked up into the server space _hard_.

  https://twitter.com/landley/status/1075415566918258689

I'm trying to make android usable as a development system, which implies people
would plug a phone/tablet into a USB hub and chromecast. (More or less the
Nintendo Switch usage model.) There are some crazy processors out there if there
winds up being demand for them. You can get a $35 8-way SMP raspberry pi fork:

  https://www.youtube.com/watch?v=u7llpgtn77g

> strace's answer to this is awful (and a reason why the copy in AOSP
> tends to lag behind, and a reason why i often just throw away rather
> than finish things i've needed like strace parsing of i2c ioctls), but
> i think all the options seem pretty awful.

Strace's answer _is_ awful, yes. But there's this "syscall.tbl" work going on
that I hope will make a better approach possible (I noticed when they converted
sh4):

  https://www.spinics.net/lists/linux-sh/msg53746.html

And my previous plan to generate a table by running something like:

  $ find . -name '*.c' | xargs grep 'SYSCALL_DEFINE[0-6]'

against the kernel source and then massaging the result with sed or a c program
or something... well it's on the todo list largely because I need to ask people
what the licensing implications are. (I _think_ it's scenes a faire? It's _sort_
of a documented, exported interface? But I'm not gonna just do it an hope for
the best, I want to look _into_ that first...)

> yes, the core ptrace logic isn't too bad. it's the paper cuts from the
> hundreds of uapi structs * supported personalities that will kill
> you...

Meh, I'm taking the 80/20 approach. Show a hexdump of structs it doesn't know
about yet and wait for people to complain, then add the ones that get complained
about.

Rob



More information about the Toybox mailing list