From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 03:06:21 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC595106566B for ; Wed, 3 Feb 2010 03:06:20 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id B111F8FC16 for ; Wed, 3 Feb 2010 03:06:20 +0000 (UTC) Received: by pxi13 with SMTP id 13so846870pxi.3 for ; Tue, 02 Feb 2010 19:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=9MT1jX+davjvjNw0s8Iju1/QmDll4gyB3K9UTvDeeFc=; b=MjmhG7qfpRnj4eD89GpvNTYt1JAfNda4LwTgk5/lcGkzM/qM2sxsss2P3XR6LJRiAQ CXtBGmmXoCidEXbzAaOP/SpfnCKZXyxgLlu3G9av0MQtUJvheDqJEncSjz589turOUPw h9Y+QfyNouqnlcyZp2DXfta/WZV3KORJdJ/jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BGR1c9csDBt8fl1Gc1Zi7/K4F62xXWjeEq8f2DDACq+cWwLoBXWd1cDL0S/vgZ5/X8 ouj5xtMpMEIR8FRwDJRk+d0rwBzGinuIIYuvGFQ5WNsbysc/JGSokGIEzduXCc51PZnb dOtfE+a62qvhUX65TuvVFFCm3wWVNgc1q0oYA= MIME-Version: 1.0 Received: by 10.141.2.14 with SMTP id e14mr4788300rvi.56.1265166380025; Tue, 02 Feb 2010 19:06:20 -0800 (PST) Date: Wed, 3 Feb 2010 08:36:19 +0530 Message-ID: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> From: "C. Jayachandran" To: freebsd-mips@freebsd.org Content-Type: multipart/mixed; boundary=000e0cd11bb4a9c925047ea9800a X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: mips ptrace.S fix X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 03:06:21 -0000 --000e0cd11bb4a9c925047ea9800a Content-Type: text/plain; charset=UTF-8 The ptrace system call implementation seems to have a bug, we need to save ra and gp before calling the __error, and that will need a stack frame. I've attached a patch that should fix this for o32 ABI - but it really should be written with ABI-independent macros, any clue on how to do this which will take care of n32/64 too will be helpful. I also have some initial patches for making gdb work on MIPS. . That patch is also attached, but it is work in progress, only the static executables work now. JC. --000e0cd11bb4a9c925047ea9800a--