From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118302 invoked by alias); 14 Mar 2018 09:48:36 -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 118169 invoked by uid 89); 14 Mar 2018 09:48:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Mar 2018 09:48:21 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2E9kX4P033268 for ; Wed, 14 Mar 2018 05:48:17 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gpxp8ee20-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 05:48:16 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Mar 2018 09:48:14 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Mar 2018 09:48:11 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2E9mBS456754374; Wed, 14 Mar 2018 09:48:11 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 141EE4C04E; Wed, 14 Mar 2018 09:41:26 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB8844C040; Wed, 14 Mar 2018 09:41:25 +0000 (GMT) Received: from ThinkPad (unknown [9.152.212.63]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 14 Mar 2018 09:41:25 +0000 (GMT) Date: Wed, 14 Mar 2018 09:48:00 -0000 From: Philipp Rudo To: Kamil Rytarowski Cc: gdb-patches@sourceware.org, Omair Javaid , Yao Qi , arnez@linux.vnet.ibm.com Subject: Re: [RFC PATCH v5 4/9] Add basic Linux kernel support In-Reply-To: References: <20180312153115.47321-1-prudo@linux.vnet.ibm.com> <20180312153115.47321-5-prudo@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18031409-0012-0000-0000-000005BE499C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031409-0013-0000-0000-0000193A4C34 Message-Id: <20180314104809.6732add0@ThinkPad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-14_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803140113 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00277.txt.bz2 Hi Kamil, On Tue, 13 Mar 2018 15:08:32 +0100 Kamil Rytarowski wrote: > On 12.03.2018 16:31, Philipp Rudo wrote: > > Implement the basic infrastructure and functionality to allow Linux kernel > > debugging with GDB. This contains handling of kernel symbols and data > > structures as well as a simple target_ops to hook into GDB. For the code > > to work architectures must provide an implementation for the virtual > > methods in linux_kernel_ops. > > > > For simplicity this patch only supports static targets, i.e. core dumps. > > Support for live debugging will be provided in a separate patch. > > > > > What's wrong with kgdb? It works well on NetBSD for alive and dead > kernels since 90ties. I don't know kgdb well. We at IBM mostly work with dumps and the crash tool, which is based on an old version of gdb and has some drawbacks. For example it doesn't have a dwarf unwinder. That's why we wanted to see if the logic needed for kernel debugging can be added directly to gdb, instead of having a hack working on top of it. Furthermore, I don't see a conflict between kgdb and this work. The way I see it, kgdb is a technique to retrieve information from the kernel. This work however, teaches gdb how to interpret the data from the kernel in order to make it easier to find the information you need. Thanks Philipp