Use architecture-neutral Register accessors in syscall_defs.h
Refactor syscall_defs.h to contain all known system calls and to encode syscall numbering.

System call numbers are defined via an enum class SyscallsX86 whose members
have the names of the system calls and whose values are the system call numbers.

This change sets us up to add different system call numbers for different
architectures. It also means that when an unsupported system call is encountered
we'll print the name of the system call.
Merge pull request #1167 from rocallahan/refactor-syscall-defs

Refactor syscall defs
add DBG_MAX_REG_SIZE constant and use it where appropriate

In a world where other architectures besides x86 exist, we can't assume
that register values are always sizeof(long).  Let's instead define a
maximum size of registers that we can handle, and modify several places
to use that instead.
move register-getting knowledge into the Registers class

Just as the syscall registers has recently been abstracted out into the
Registers class, we need to abstract out the debugging stub's knowledge
of how many registers the target actually has.
communicate to the debugger stub how big all registers are, not just defined ones

It's conceptually better if, for registers that we don't know the values
of, we don't just say they're 32-bits wide, as the current
print_reg_value does.  Therefore, when we are fetching register values
from the target, we need three values:

- the value itself;
- the size of the register in bytes;
- whether we know the value or not.

To that end, define constants for all core x86 registers GDB might ask
about, and modify the read_register interface to return all the
information we might need.
rename (most) uses of orig_eax to original_syscallno()

This renaming catches the few remaining, interesting instances of
orig_eax.  The ones I didn't rename are either due to be taken care of
by the debugging stub abstraction patches or because the instances are
part of logging messages which print out all registers.  The latter
requires its own, more comprehensive approach to fixing, so I left it
alone.
share code between _{un,}traced_raw_syscall

This change addresses the TODO in preload.c that suggests we'd like to
share code between these two functions.  As a pleasant side effect, it
moves from top-level asms to .S files, which makes the correspondence
between the syscall functions and their corresponding entry point
fetches more obvious.

The comment surrounding the TODO notes that we don't generate the shared
functions from a macro because that would hinder debuggability.  It's
worth pointing out that GCC's assembler annotates the lines for
traced_raw_syscall (resp. the other functions so defined) as coming from
traced_syscall_shared.S.  I don't think this hinders debuggability too
much, but it does make it so you have to pay a little more attention to
what function you stopped in, rather than just the file your debugger
shows you stopping in.
Merge pull request #1169 from froydnj/orig-eax-renaming

rename (most) uses of orig_eax to original_syscallno()
Merge pull request #1168 from froydnj/x86-register-renaming

X86 register renaming
Merge pull request #1170 from froydnj/traced-syscall-assembly-files

share code between _{un,}traced_raw_syscall
add appropriate annotations to traced_syscall_shared.S for a non-executable stack
fix upper bound in registers.cc assert
Merge pull request #1173 from froydnj/issue1172-fix

Issue1172 fix
Fix x87 register sizes. I think this is the important regression fix.

Also puts DREG_ORIG_EAX in the right place in the list assuming gdb uses
the target description in features/i386/i386-linux.c.
Make Session destructor call kill_all_tasks.
Don't leak Sessions.

This ensures Session destructors run on exit, which means we
kill all the tracee processes (as long as rr shuts down cleanly).

Resolves #1175.
Make sioc test pass while the host system is offline.
Add rr support to let gdb create and delete checkpoints.

This is mostly straighforward. In Task::copy_state, from's hpc value may be
nonzero when we have stopped at a debugger breakpoint, so it's simplest just to
abandon the assertion and copy the hpc value to to's rbc_boost.
When invoking gdb, load gdb initialization file defining checkpoint commands.