x86-64 porting

Robert O'Callahan robert at ocallahan.org
Wed Jul 23 17:40:17 PDT 2014

We've created a kernel_abi.h header file that defines per-arch structures
and system call numbers, as members of a per-architecture "Arch" class.
Other per-arch information should be placed there. We've begun the process
of templating various pieces of rr code over Arch. There is also a
supported_arch enum, and in some places we've introduced dynamic arch()
getters and checks.

One reasonably easy thing that is going on right now is eliminating all
uses of SYS_foo syscall numbers in favour of Arch::foo. This requires
templating a bunch of code with an Arch class parameter and making related

Here's a rough and incomplete plan I just made up for how we could proceed:

1) Build rr 64-bit (but still only supporting 32bit tracees)
-- Add multi-arch support to Registers and ExtraRegisters, to break
dependence on user_regs_struct
-- Finish moving SYS_ numbers to Arch (see above)
-- Fix other breakage we'll inevitably find
[We don't want to support 64bit tracees from 32bit rr, but I suppose we
probably should keep being able to build rr 32-bit since there are some
static checks for kernel_abi.h correctness that that enables.]

2) Support basic record/replay of 64bit tracees --- no syscallbuf
-- Add tracee arch detection
-- 64bit trace records
-- Audit code for remaining issues that need templated code paths for 64bit
-- Audit code to make sure we use uintptr_t/intptr_t for machine words, in
non-templated code
-- Build test suite in both 32bit and 64bit mode and run both sets of tests

3) gdb support for 64bit tracees

4) syscallbuf
-- Build separate librrpreload for 32-bit and 64-bit targets and get the
right ones injected, and support both from rr
-- Adding syscallbuf patching in lieu of vsyscall

oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
otohoeo ofoioroeo ooofo ohoeololo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20140724/b2db48f1/attachment.html>

More information about the rr-dev mailing list