Message ID | BANLkTimr+W+6TEbyeKoJUSXynUjTGtPtbg@mail.gmail.com |
---|---|
State | New |
Headers | show |
Uros Bizjak <ubizjak@gmail.com> writes: > On Sat, Apr 2, 2011 at 1:09 AM, Ian Lance Taylor <iant@google.com> wrote: >> On Wed, Mar 30, 2011 at 12:58 PM, Uros Bizjak <ubizjak@gmail.com> wrote: >>> >>> Attached ports go to ALPHA architecture. >> >> Thanks! >> >> Committed. >> >> >>> b) alpha doesn't define "struct user_regs_struct" from which "type >>> PtraceRegs" is derived. I have manually created PtraceRegs from >>> pt_regs structure and patched generated libgo/sysinfo.go in build >>> directory after the build broke. However - the comment from sys/user.h >>> says that this file is for GDB and GDB only... >> >> libgo uses it to support ptrace, which in effect is the same as what >> gdb does. If mksysinfo.sh is unable to provide any definition for the >> structure, then the choices are either to patch up mksysinfo.sh so >> that it works, or to simply define the structure in >> libgo/syscalls/syscall_linux_alpha.go. it is unlikely to change so >> the latter seems acceptable if patching mksysinfo is too hard. > > Attached patch implements this suggestion and builds libgo without problems. Committed. Thanks. Ian
Index: libgo/syscalls/syscall_linux_alpha.go =================================================================== --- libgo/syscalls/syscall_linux_alpha.go (revision 171911) +++ libgo/syscalls/syscall_linux_alpha.go (working copy) @@ -6,6 +6,38 @@ package syscall +type PtraceRegs struct { + R0 uint64 + R1 uint64 + R2 uint64 + R3 uint64 + R4 uint64 + R5 uint64 + R6 uint64 + R7 uint64 + R8 uint64 + R19 uint64 + R20 uint64 + R21 uint64 + R22 uint64 + R23 uint64 + R24 uint64 + R25 uint64 + R26 uint64 + R27 uint64 + R28 uint64 + Hae uint64 + Trap_a0 uint64 + Trap_a1 uint64 + Trap_a2 uint64 + Ps uint64 + Pc uint64 + Gp uint64 + R16 uint64 + R17 uint64 + R18 uint64 +} + func (r *PtraceRegs) PC() uint64 { return r.Pc; }