From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Smid To: gdb-patches@sources.redhat.com Subject: [RFA]: x86-64 - remove `sizeof (struct siginfo)' Date: Mon, 24 Sep 2001 23:49:00 -0000 Message-id: X-SW-Source: 2001-09/msg00328.html The folowing patch removes `sizeof (struct siginfo)' from x86-64 target file to avoid problems when building a cross-debugger. OK to commit? Index: gdb/ChangeLog from Jiri Smid * x86-64-linux-tdep.c (LINUX_SIGINFO_SIZE): Add. (x86_64_linux_sigcontext_addr): Replace `sizeof (struct siginfo)' by LINUX_SIGINFO_SIZE. Index: gdb/x86-64-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v retrieving revision 1.2 diff -c -3 -p -r1.2 x86-64-linux-tdep.c *** x86-64-linux-tdep.c 2001/09/21 22:57:29 1.2 --- x86-64-linux-tdep.c 2001/09/24 08:39:09 *************** x86_64_linux_sigtramp_start (CORE_ADDR p *** 66,71 **** --- 66,73 ---- return pc; } + #define LINUX_SIGINFO_SIZE 128 + /* Offset to struct sigcontext in ucontext, from . */ #define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36) *************** x86_64_linux_sigcontext_addr (struct fra *** 83,94 **** /* If this isn't the top frame, the next frame must be for the signal handler itself. The sigcontext structure is part of the user context. */ ! return frame->next->frame + sizeof (struct siginfo) + LINUX_UCONTEXT_SIGCONTEXT_OFFSET; /* This is the top frame. */ ! return read_register (SP_REGNUM) + sizeof (struct siginfo) + LINUX_UCONTEXT_SIGCONTEXT_OFFSET; } --- 85,96 ---- /* If this isn't the top frame, the next frame must be for the signal handler itself. The sigcontext structure is part of the user context. */ ! return frame->next->frame + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET; /* This is the top frame. */ ! return read_register (SP_REGNUM) + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET; } -- Jiri Smid --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: smid@suse.cz Drahobejlova 27 tel:+420 2 96542 373 190 00 Praha 9 fax:+420 2 96542 374 Ceska republika http://www.suse.cz