From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32756 invoked by alias); 5 Aug 2004 02:02:15 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32734 invoked from network); 5 Aug 2004 02:02:13 -0000 Received: from unknown (HELO copland.kettenis.dyndns.org) (82.74.7.234) by sourceware.org with SMTP; 5 Aug 2004 02:02:13 -0000 Received: from copland.kettenis.dyndns.org (kettenis@localhost.kettenis.dyndns.org [127.0.0.1]) by copland.kettenis.dyndns.org (8.13.0/8.13.0) with ESMTP id i74Lu2hU031077 for ; Thu, 5 Aug 2004 00:11:02 +0200 (CEST) Received: (from kettenis@localhost) by copland.kettenis.dyndns.org (8.13.0/8.13.0/Submit) id i74Lu2lV022208; Wed, 4 Aug 2004 23:56:02 +0200 (CEST) Date: Thu, 05 Aug 2004 02:02:00 -0000 Message-Id: <200408042107.i74L7YNK029004@copland.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Fix OpenBSD/i386 signal trampoline recognition X-SW-Source: 2004-08/txt/msg00102.txt.bz2 The signal trampoline has changed in OpenBSD 3.5-current. Committed, Mark Index: ChangeLog from Mark Kettenis * i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal trampoline in OpenBSD 3.5-current. Index: i386obsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386obsd-tdep.c,v retrieving revision 1.18 diff -u -p -r1.18 i386obsd-tdep.c --- i386obsd-tdep.c 22 May 2004 15:16:22 -0000 1.18 +++ i386obsd-tdep.c 4 Aug 2004 21:04:59 -0000 @@ -78,15 +78,25 @@ i386obsd_sigtramp_p (struct frame_info * if (find_pc_section (pc) != NULL) return 0; - /* If we can't read the instructions at START_PC, return zero. */ + /* Allocate buffer. */ buf = alloca (sizeof sigreturn); - if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn)) + + /* If we can't read the instructions at START_PC, return zero. */ + if (target_read_memory (start_pc + 0x0a, buf, sizeof sigreturn)) return 0; /* Check for sigreturn(2). */ if (memcmp (buf, sigreturn, sizeof sigreturn) == 0) return 1; + /* If we can't read the instructions at START_PC, return zero. */ + if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn)) + return 0; + + /* Check for sigreturn(2) (again). */ + if (memcmp (buf, sigreturn, sizeof sigreturn) == 0) + return 1; + return 0; }