From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10428 invoked by alias); 14 Jun 2013 02:39:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10417 invoked by uid 89); 14 Jun 2013 02:39:45 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 14 Jun 2013 02:39:43 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UnJvR-00022d-Kd from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 13 Jun 2013 19:39:41 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Jun 2013 19:39:41 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Thu, 13 Jun 2013 19:39:40 -0700 Message-ID: <51BA8252.3010303@codesourcery.com> Date: Fri, 14 Jun 2013 06:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: "Maciej W. Rozycki" CC: Subject: Re: [PATCH 1/3] Include asm/ptrace.h in mips-linux-nat.c References: <1369881867-11372-1-git-send-email-yao@codesourcery.com> <1369881867-11372-2-git-send-email-yao@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-06/txt/msg00323.txt.bz2 On 06/14/2013 01:37 AM, Maciej W. Rozycki wrote: > ../../src/gdb/mips-linux-nat.c:599: error: storage size of 'dummy_regs' isn't known > > etc. for the very reason the system I used for testing has old kernel > headers installed (2.6.19 it would seem, according to ). > > Such a failure is not acceptable from the user's point of view; I think > there are three ways to deal with this: > > 1. Add an autoconf test that checks for the presence of a key > definition; I think 'struct pt_watch_regs' is a good > candidate. If that test does not succeed, then the configure process > fails gracefully stating the minimum released version of kernel headers > required. > > 2. Add the same test, except in the failure case fall back to the internal > definitions we already have, wrapped into #ifndef > HAVE_STRUCT_PT_WATCH_REGS. > > 3. Add the same test and disable hardware watchpoint support in the > failure case. I prefer #3. If 'struct pt_watch_regs' is not defined, hardware watchpoint is not supported in the kernel. Because 'struct pt_watch_regs' was added in this commit in linux kernel, commit 0926bf953ee79b8f139741b442e5a18520f81705 Author: David Daney Date: Tue Sep 23 00:11:26 2008 -0700 MIPS: Ptrace support for HARDWARE_WATCHPOINTS This is the final part of the watch register patch. Here we hook up ptrace so that the user space debugger (gdb), can set and read the registers. Signed-off-by: David Daney Signed-off-by: Ralf Baechle -- Yao (齐尧)