From owner-freebsd-ports@FreeBSD.ORG Mon Aug 27 14:51:35 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63C5B1065679; Mon, 27 Aug 2012 14:51:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 78D518FC15; Mon, 27 Aug 2012 14:51:34 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA10186; Mon, 27 Aug 2012 17:51:32 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <503B8973.6000704@FreeBSD.org> Date: Mon, 27 Aug 2012 17:51:31 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120730 Thunderbird/14.0 MIME-Version: 1.0 To: Luca Pizzamiglio References: <503B7E3B.9010306@FreeBSD.org> <503B87DE.6070209@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Michael Scheidell , freebsd-ports@FreeBSD.org Subject: Re: gdb75 dumps core on startup X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 14:51:35 -0000 on 27/08/2012 17:48 Luca Pizzamiglio said the following: > I'm waiting someone commit this: > > ports/171109 Great, thanks! > On Mon, Aug 27, 2012 at 4:44 PM, Andriy Gapon wrote: >> on 27/08/2012 17:03 Andriy Gapon said the following: >>> Program terminated with signal 11, Segmentation fault >>> ... >>> #0 0x00000000004777e2 in i386_use_watchpoints () >>> #1 0x0000000000476bbd in _initialize_amd64fbsd_nat () >>> #2 0x000000000060deea in initialize_all_files () >>> #3 0x00000000005e710f in gdb_init () >>> #4 0x0000000000549086 in relocate_gdb_directory () >>> #5 0x0000000000547aa4 in catch_errors () >>> #6 0x0000000000548bb4 in gdb_main () >>> #7 0x0000000000457ea9 in main () >>> >>> This is on amd64 head. >>> >> >> The problem seems to be caused by files/patch-gdb-amd64-nat.h, which for some >> cryptic reason removes prototype of amd64bsd_target() from amd64-nat.h. That >> allows the code to be compilable still (sloppy gdb developers!) but the assumed >> return type of the function becomes int instead of a pointer which it really is. >> Thus, the returned pointer value gets truncated on amd64 and as a result an >> invalid pointer is passed to i386_use_watchpoints() from _initialize_amd64fbsd_nat(). >> >> Oh, looking at the patch in PR ports/165357 >> (http://www.freebsd.org/cgi/query-pr.cgi?pr=165357), it seems that >> amd64bsd_target() should have re-appeared in a new header file "amd64bsd-nat.h"... >> But that part of the patch seems to be incorrect in that it would create >> files/amd64bsd-nat.h instead of a patch file to create amd64bsd-nat.h in the >> source directory. Apparently this file never made it as a result. >> >> -- >> Andriy Gapon -- Andriy Gapon