From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8026 invoked by alias); 3 Feb 2020 17:00:43 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 7835 invoked by uid 89); 3 Feb 2020 17:00:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:D*ca, H*Ad:D*ca, reply!, Nan X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Feb 2020 17:00:27 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7377C1E0A1; Mon, 3 Feb 2020 12:00:13 -0500 (EST) Subject: Re: The newest gdb 8.3 crash on OpenBSD To: Nan Xiao Cc: gdb@sourceware.org References: From: Simon Marchi Message-ID: Date: Mon, 03 Feb 2020 17:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00006.txt.bz2 On 2020-02-01 5:47 a.m., Nan Xiao wrote: > Hi Simon, > > Thanks very much for your reply! > > Yes, you are correct! After checking gdb/config.h, I found all ptrace > related macros are undefined: > > /* Define if sys/ptrace.h defines the PTRACE_GETFPXREGS request. */ > /* #undef HAVE_PTRACE_GETFPXREGS */ > > /* Define if sys/ptrace.h defines the PTRACE_GETREGS request. */ > /* #undef HAVE_PTRACE_GETREGS */ > > /* Define to 1 if you have the header file. */ > /* #undef HAVE_PTRACE_H */ > > /* Define if sys/ptrace.h defines the PT_GETDBREGS request. */ > /* #undef HAVE_PT_GETDBREGS */ > > /* Define if sys/ptrace.h defines the PT_GETXMMREGS request. */ > /* #undef HAVE_PT_GETXMMREGS */ > > I checked the header files, there is no /usr/include/ptrace.h. There > is /usr/include/sys/ptrace.h, but the real definitions (such as > PT_GETREGS, PT_SETREGS, etc) are in system related header files. E.g., > in my OS, it is in /usr/include/amd64/ptrace.h. I checked OpenBSD's > gdb port (gdb 7.12.1, http://openports.se/devel/gdb), it seems I need > more tweak to make gdb work on OpenBSD, not as simple as just > "configure" and "make". > > Anyway, thanks very much again for your time and help! > > Best Regards > > Nan Xiao Ok, it would be nice if GDB worked, instead of crashed, with a simple ./configure && make on OpenBSD. If you manage to make it work, please consider sending a patch so that other users don't bump into this problem! Simon