From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aD2jIPrMjl+cagAAWB0awg (envelope-from ) for ; Tue, 20 Oct 2020 07:41:46 -0400 Received: by simark.ca (Postfix, from userid 112) id 837111EFC3; Tue, 20 Oct 2020 07:41:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2A0281EFBF for ; Tue, 20 Oct 2020 07:41:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B7DE8386EC70; Tue, 20 Oct 2020 11:41:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7DE8386EC70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603194105; bh=N5S5lKiapU+yjAxNdqG/nu0/g4H7ybbw3uuHSBF/QWE=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=B5JIhpdL65aPWQuvLQp3dpba5ASmqHXh1uavvIhg19b/eWsFyU2X4cWUCjwD622J/ j1NfmocE0EHIioD2OH/yggBv1pG4/eCalNLyea2o+7uexHWL9prbzsHsBcGcTB3EL4 z3BYT/9W50j7ZMcKam7iTrdMmmiFh5cUDel0nsXI= Received: from mx08-00271601.pphosted.com (mx08-00271601.pphosted.com [62.209.51.218]) by sourceware.org (Postfix) with ESMTPS id F1880386100A for ; Tue, 20 Oct 2020 11:41:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F1880386100A Received: from pps.filterd (m0107398.ppops.net [127.0.0.1]) by mx08-00271601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09KBZN3Z000971; Tue, 20 Oct 2020 13:41:32 +0200 Received: from eur04-he1-obe.outbound.protection.outlook.com (mail-he1eur04lp2053.outbound.protection.outlook.com [104.47.13.53]) by mx08-00271601.pphosted.com with ESMTP id 347pkendn5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Oct 2020 13:41:31 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kCcGewie9rBBjZ5X6v8WCwuGfltVJS1/rinZh4PLSpBNACv0mrPSGVNaOqZEnFNhsW9mZG4nHCh2HYe1img8hzWeGVDA0J75zDGwqmVKBtwAv3N4VDINebECSdbrZeVwwTbKb7NjFbCa+okFGuL1zcKEKsPnUDx7un1G/7gNFiag4uRinA/w5AcbKkuvs/HHbBLtQbzhvkVGgPxlgWaLf9vW7KCcVFPHmclhT1G7gpgbDyHRcC6+FRb5odXT8UfUXxHbWOcc+pZI72WuUgqff+TE+3EQLbPOx529GTrx60/XaxwAXuX6/9eoiXOc0uNeR5rj1LMImsTFnrhEB4Kvkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N5S5lKiapU+yjAxNdqG/nu0/g4H7ybbw3uuHSBF/QWE=; b=P6xJRSGMXNuVkhhp++ycgmzPp41wwnjwmf/uH6NsWNmnRagvM6vJbZXohgGMwmJA4JyZ7YOAqHLM/+spnmA9CWLLP99YAp/vuzu17BJGiB+nNZs+4R9/Hd1mly7eu07xy09PbggmhS3qvbTn6w9fnardsjpg28aWz8bVArz4/RI2kFJQiA2E8Hln+RqXG7tXnnvJsPeL3crFU+BB+kV++Rd48PwouDiDzmAlD1gNQDolog/DtqhhrdprFwe2AmytIkRem6f9HQMfXKQ0+qslBwyjnUropPA119FhTB6GyY2YaEZ9tlz/ObDY7aQUSVFTvCOUL32gndd7BC+QUYrMnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=verisure.com; dmarc=pass action=none header.from=verisure.com; dkim=pass header.d=verisure.com; arc=none Received: from AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:4a::16) by AM5PR10MB1620.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:1d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.28; Tue, 20 Oct 2020 11:41:30 +0000 Received: from AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM ([fe80::bcba:f0c0:8bd3:e7c]) by AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM ([fe80::bcba:f0c0:8bd3:e7c%7]) with mapi id 15.20.3477.028; Tue, 20 Oct 2020 11:41:29 +0000 To: Paul Mathieu , Simon Marchi Subject: Re: [PATCH] gdb: add support for handling core dumps on arm-none-eabi Thread-Topic: [PATCH] gdb: add support for handling core dumps on arm-none-eabi Thread-Index: AQHWpBZY+9Zi3wcqSUekTcY7z7/HvameMTUAgADewoCAAVH60Q== Date: Tue, 20 Oct 2020 11:41:29 +0000 Message-ID: References: <688f8081-e972-2ca1-255a-14b63e9e173d@simark.ca>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [81.236.17.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 35fb46fd-a0dc-4957-13c6-08d874ed161a x-ms-traffictypediagnostic: AM5PR10MB1620: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: B3sLViPE7DKjGBkceVE9AnrGF7XrqtLzbwWFeRZAK752BtrzOyKkOMLZxqL7E3mcOY+7+luLBGAbLkiG6Ufx2Yh9XlDczVP2Cwnuai9RPxLiDJt/QmLgXRM80P4fJL0VmSbQXpRhg2M5jDfbC6Y5jhZ7tyCLNyKGNEGjCsYPdGHeNxXs+bt6wx2udB2W8zA7dzWB692Wui6JdtrEUeGYwvOI27iXE8MsZt4fhCF/EoPdIbhsbzl6oaUzJZxnJq6thCwITSIJxdGXwDlKWAxJRXpoDF6v4STfSlarfvsskfcGR7TOUalLx126/R5DssMj/AvONExnSO4lGHxS1MNZjMnu1Gyoe35/1jO/O1iBn5U6SXyG1lrf/rYK5K55I3JKtX8D5v98xkFb+UZW5QSK/IIwRrO/k4K+EAapIpZmAOpAETuWX7J2RYSj5tdPHx5oDXCH4ej5cQXcRZPB4pzJVQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(346002)(376002)(366004)(136003)(71200400001)(5660300002)(53546011)(6506007)(83380400001)(7696005)(86362001)(316002)(4326008)(44832011)(66476007)(2906002)(966005)(66446008)(8936002)(64756008)(186003)(9686003)(8676002)(478600001)(66556008)(66946007)(76116006)(54906003)(26005)(52536014)(33656002)(110136005)(55016002)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: gpWo1vSTUtvlEtEWXO5pVMZt8jyODqc028HW5FgA5AyHtAP9B+dG7GnypJRWFIuEOzcSDf3WrrtKdNELBu3zcbHIWHHgU/XzAxAUizztXEZBvMXkGcAchf0gBgSzSWmgkk88Ta91D6PyV5z9SIqNcVF5Dntove0MP8Yd88Kt0P/BdbsQfS1t7rpJu1cCSuhKpWJUBOyDrl7vcKsOc3UtRP3d7VwqmI1zjwrtl4nwVolivsT7D2VGC338n+vZBy+8JYYZLmRXrjaXLFCwC0FpNLwpGOE1cFuTdZes759VdcyIrwCwZiiMOj//cQyp1hV9irmBhvEjNxbxYmDlBQjoey8brv8RnKZ1XEcB7zzNXrKsGBi9/0dgG4nENZpxoi/8ARxdYNulhmrNgya3C5glfHzeTLm7pN1/Hnrl4zHGHWWEny3pM0EkEbmvjVx3ry3OXh3poa3WvfwbtrPymHCYF8OzPYsqTTXTa1JK4eBOK6IVvMwQtY1eGu5IqMudnBdMbY+7BQkGRYX+6w8nfKxAu0Q6PWXFVDcgG/tOfbuJ29/kAg56VcCjsWyLM92dqjucgFRhrpcz19ULUZHn+iDe5IoVPMtIR/XbMLL1eKvh3V/ghOlCukiEoRHIvLJXl/zTHESx2JZW2/mhcZ+9T6VwQA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: verisure.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 35fb46fd-a0dc-4957-13c6-08d874ed161a X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2020 11:41:29.8914 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3055fa7f-a944-4927-801e-a62b63119e43 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +KoyqRLdECI5h6xqNDzWfQ+f+0qwdekkDIjMSGnzcme7uHawPqe4DTu7lNsYh4xOd/gsSnYW2P/K9Q9YfnzTaXW5Y7WSas4dVjF2v3VcN8FKyf+NlSTC6VwDwaUFj4EP X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR10MB1620 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-20_05:2020-10-20, 2020-10-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1011 mlxscore=0 priorityscore=1501 adultscore=0 bulkscore=0 malwarescore=0 suspectscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010200079 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Fredrik Hederstierna via Gdb-patches Reply-To: Fredrik Hederstierna Cc: "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi all,=0A= =0A= I rebased and update my patch and it not run against GDB 10 / git-master, a= vailable at=0A= =0A= https://sourceware.org/bugzilla/show_bug.cgi?id=3D14383=0A= =0A= I debugged my remote arm-none bare-metal Cortex-M4 target app over openocd/= JTAG,=0A= and generate core-file:=0A= (gdb) gcore bare_metal.core=0A= =0A= Then later off-line on my host PC, I successfully debugged it with register= , call-stack etc:=0A= $ arm-none-eabi-gdb my_bare_metal_app.elf bare_metal.core=0A= =0A= So this patch 'works', but I'm not sure if this is the correct direction to= go,=0A= but could be a start.=0A= Besides this, next step could be to do this 'core-generator' tool that coul= d be used for embedded targets, running on host PC.=0A= =0A= Please check the patch out, it builds fine with GDB-10/master on my machine= .=0A= Any comments are appreciated!=0A= =0A= Thanks, BR Fredrik=0A= =0A= =0A= From: Paul Mathieu =0A= Sent: Monday, October 19, 2020 5:25 PM=0A= To: Simon Marchi =0A= Cc: Fredrik Hederstierna ; gdb-patches@s= ourceware.org ; Luis Machado =0A= Subject: Re: [PATCH] gdb: add support for handling core dumps on arm-none-e= abi =0A= =A0=0A= Hi Simon, thanks for keeping this moving!=0A= =0A= =0A= > > The idea then is to have some PC host supporting tool to convert/genera= te corefiles from some custom memory dump formats.=0A= > > The FreeRTOS (or any other bare-metal alike OS) could maintain this sup= porting tool.=0A= >=0A= > Indeed.=0A= >=0A= > One question for you: when making GDB generate the core, I presume it=0A= > would always have a single thread, as when debugging a bare-metal ARM=0A= > processor with GDB, you see a single thread.=0A= >=0A= > Assuming you make that tool to convert a memory dump of a FreeRTOS=0A= > system to a core GDB can read, would you make each FreeRTOS task appear= =0A= > as a separate thread in the core?=0A= =0A= I assumed that we could use .reg/xxx note sections to dump task=0A= information, haven't tested it though.=0A= That would be something that generate-core would not be able to do=0A= without support for the underlying OS. I imagine that we should be=0A= able to add some fort of support for FreeRTOS?=0A= My target runs RTX5, I'm not sure how widespread it is and if it is=0A= worth adding support for. That said, as long as the core format is=0A= specified and has support for multiple tasks (at least CPU regs),=0A= collecting that information and formatting it shouldn't be too much=0A= trouble on my end.=0A= =0A= =0A= > Can you and Paul maybe sync up (and with Luis as well, probably) on what= =0A= > are the next steps?=A0 I think your patch was a great start, but it would= =0A= > need to be rebased.=A0 You could also look at Paul's patch to see if=0A= > there's anything you'd like to pick from it.=0A= =0A= Happy to. The patch that I proposed is quite minimal, the only nice=0A= thing about it is that it builds on top of master.=0A= =0A= Paul=