From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sPA+L1xfj19EfwAAWB0awg (envelope-from ) for ; Tue, 20 Oct 2020 18:06:20 -0400 Received: by simark.ca (Postfix, from userid 112) id BDAD91EFC3; Tue, 20 Oct 2020 18:06:20 -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 5069C1E58D for ; Tue, 20 Oct 2020 18:06:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF74C3857807; Tue, 20 Oct 2020 22:06:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF74C3857807 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603231579; bh=q4ghRMrBFUvPZS634/yfoiiZXc5obJcD66qPo3vpMaE=; 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=KQXOtoQX4A1Gjz4nt62XaNmwyiNG0jssrstv5PgMv4WAVyzXZ07mrLX2AmYOBt/xJ kGAR2fVA2XrOVSO/S8Cgz1afd8mS24N9/EOi5JunWtcDOvU6FU8OflqqZGgtB5D3o1 M9luQHQH4EKoUX0AHsJu1wtVFIFjx+mr15BuzgZg= Received: from mx08-00271601.pphosted.com (mx08-00271601.pphosted.com [62.209.51.218]) by sourceware.org (Postfix) with ESMTPS id CF2B93857807 for ; Tue, 20 Oct 2020 22:06:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CF2B93857807 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 09KM5E7q016277; Wed, 21 Oct 2020 00:06:00 +0200 Received: from eur03-am5-obe.outbound.protection.outlook.com (mail-am5eur03lp2059.outbound.protection.outlook.com [104.47.8.59]) by mx08-00271601.pphosted.com with ESMTP id 347pkered7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Oct 2020 00:06:00 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JxUyAyuMWeZizcxeKJ3UBnimC9AST5wQmwhEtTuT6XIVY1Yz6mdpLYoVIjC1giDKmhbDfKoXMMagztbhnCDN94uO8oRzqrOke5Pw2xyuG8MWnJF1CnfgwVcIkpPO5A0SJXBFBYm7sqgGmH1Hlzr3I5hQ6uVDuyjS0JVZrvYA5CFfiLC6WvKm/4uRbXjnes5B27y9vesZ4glneLxQk0KrbaUCnFLPGP7RZ2N57Qe0PlmcQkRMiDjbgHoHKeD733FR9o00h4KeKtMfXOBRvftTkLNPiF/iAT0qo0+YArWVtNZeYorrwWTT3UINz7pTdsDm5evoKRHquKBYSPE0kr7wQQ== 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=q4ghRMrBFUvPZS634/yfoiiZXc5obJcD66qPo3vpMaE=; b=bZ98nJh0zWsf87Kzc7rrAIfryzLuUfMy11SlsZhniyh5rKCU3O/azrURIG3l/oa7nm5IoYT6rG0TpfAnpQRRYz8WmQzRZOOqz3l4D6btazZS13U8hdj+KcPfz64uFqXazjIyI0dwIS2KEYajG94dVm8O5yHscK/91Pf/oPoPPsQw6SzQhHhijUiWDq9spJ1MAj2h2LLgs963eexN2jCb4dQWQar6rS2oyPmHJzlW45nwKMZFu/DTUN1eIdPz7NbKhXA/7gf+40idR8SHtOuoEEE+y5PL4/Fbgnym/Xlgg2WBYYhs7DUN4v1tPvdifA4hIwj3bWSqdrsX6k41vCLG5g== 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 AM5PR1001MB0978.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:203:7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.25; Tue, 20 Oct 2020 22:05:58 +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 22:05:58 +0000 To: Simon Marchi , Paul Mathieu 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/HvameMTUAgADewoCAAVH60YAAEgcAgAAV7XKAABKWAIAAc/zq Date: Tue, 20 Oct 2020 22:05:57 +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: 8fb1b6c9-51bf-42bf-1fd7-08d8754452d1 x-ms-traffictypediagnostic: AM5PR1001MB0978: 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: dSwiNJgciDrXzD9MlCZLGYQ2HfLkZbyHV7ZjM0J9DVKLHmd+iC1SW+3W6NMgo0TRfhzoYk7t/YxitfXtrmv0ZJSlxipLfRP7u2JH4zVrCOLpUgUs8hU3b4G8NfhuDmDYvoH8aakJtYMpr2uvduXBjXbnqQKJKCAo7H4KXxIkpYfDYX5/cbTYCPr4BvCCT9X1LQDG2yvhZEajPh+fZRwdj/Bb6ChzwA0xCrbxvJzf+3tv1Bh6ekBci8cavgmy0ByovE1amjF4Sud+Kqy0iHaT3fr1ma2VhyMoSEGR6rDr/GeHXUTHhLNXrWEgQtt95qLBA+tsQq8W4gpim6lm2/V98Q== 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)(136003)(396003)(366004)(39850400004)(346002)(376002)(66556008)(64756008)(66476007)(66946007)(110136005)(8676002)(2906002)(66446008)(186003)(8936002)(53546011)(6506007)(54906003)(5660300002)(76116006)(52536014)(316002)(4326008)(26005)(9686003)(7696005)(44832011)(71200400001)(83380400001)(33656002)(86362001)(478600001)(45080400002)(55016002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: vM9vJ+F6eW1Y2mFSSKrp/tQDgu0gRWn5YX7/+fahy5KcWcR51U3+BOBG/R5HUgQKrXqrfFXaLwP41JM0Hb1KsSes0DGsJOlJvhNHFDV31W6LWlEmMXoPXQXhfdMIZHeaG7nd+cOt2EorWXNhJwuLdh3/g1NqJ6wuutpL1uGkPM7ZSweA/fevZeBX1dTaoVnCjmeZCXFKsWvLnlPV4G0VfMYCBwOHV5p2K5g1YtBULUyALh8ey2xLW9bEwXMAWqAo49eudrmksGytPk0aKgra5DZzD4siC0uqTFtktLRwwg/j10/TXqvZZGE35Td3FiQuMfgBcL/nQDfddkTXuNYFmKTRBcioNxrzjZLNUSGj/VzZYbvpJN13laW42/7duCVFgWXr4UoWhj6Bl8Bx8t45LsRUop9g4z1eI4i1u92pM8+p5vxr6mDK5YNXTozNmPOkw6uy0/CTsqJwwPTKzzWL7H1w7IoqiOucPoz9Z3HXQFQ9QEAeSuawg1SQ+kevna8lHJWACqxttidXNxJVL3c+UGjszviTcgCS9SqW5L+PctF8TFV6/w6W7rntuUKmSxeK8tzfJJjbNUk2C1ALpdLeb1W0ncJwwXPvXxCeYNu9AUr27LYLMfT6Af4ajaI8ZG308/HwceYALJpcfngMrnEl9w== 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: 8fb1b6c9-51bf-42bf-1fd7-08d8754452d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2020 22:05:57.9888 (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: u4pVvnrW644+hniaUmwi7jXD6j6NF96Esl94I5hP+vB3Cur7DeVy3IagIEqIkfFs/Zp5c3MBRUch3nb98qHVqYQxVoTnnWbOF4vbCP0xPH7wfCi/WzITQWYTz3PGhzuf X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR1001MB0978 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-20_13: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=1015 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-2010200149 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" =0A= =0A= =0A= > From: Simon Marchi =0A= > Sent: Tuesday, October 20, 2020 5:04 PM=0A= > To: Fredrik Hederstierna ; Paul Mathie= u =0A= > Cc: gdb-patches@sourceware.org ; Luis Machado= ; Alan Hayward > =0A= > Subject: Re: [PATCH] gdb: add support for handling core dumps on arm-none= -eabi =0A= =A0=0A= > Ok, thanks for trying.=A0 Is Outlook's SMTP not really SMTP?=0A= =0A= I think git-email now works with the SMTP server, but need to learn how to = embed message etc. sorry for beginners mistakes..=0A= =0A= > One warning to fix we get when applying:=0A= >=0A= > Applying: gdb: Support corefiles for arm-none-eabi=0A= > .git/rebase-apply/patch:703: trailing whitespace.=0A= =0A= I found one place with trailing whitespace that I missed, should be fixed.= =0A= =0A= > One thing that doesn't look right is this, in none_make_corefile_notes:= =0A= >=0A= >=A0=A0=A0=A0=A0 int global_id =3D 1;=0A= >=A0=A0=A0=A0=A0 struct thread_info *info =3D find_thread_global_id (global= _id);=0A= >=0A= > As you might have noticed, GDB now supports being connected to multiple= =0A= > targets at the same time.=A0 So, inferior 1 could be a local GNU/Linux=0A= > executable, while inferior 2 could be a remote bare-metal ARM program.=0A= =0A= =0A= > If so, I guess GDB should just dump all the current inferior's threads=0A= > in the core dump.=0A= =0A= I've tried to modify code so it should dump all threads,=0A= created a [PATCH v2] which includes this (sent with git-email).=0A= =0A= > I see you have this commented out:=0A= >=0A= >=A0=A0=A0 /* make_cleanup (xfree, note_data); */=0A= >=0A= > The way to do it now would be to make note_data a=0A= > gdb::unique_xmalloc_ptr, and do "return note_data.release ();"=0A= > when returning.=A0 This way, it gets automatically freed if something bad= =0A= > happens.=A0 And ideally, gdbarch_make_corefile_notes should be changed to= =0A= > return a gdb::unique_xmalloc_ptr, but that's out of the scope of=0A= > this patch (I'll give it a quick try).=0A= =0A= I tried to copy linux-tdep.c, and I could not find where data is unallocate= d, but maybe its a later problem.=0A= =0A= > You don't need an _initialize_none_tdep if you don't do anything in it.= =0A= =0A= Ok, I kept if for now, if something pops up that needs to be put there alon= g the road..=0A= =0A= > One last question: I see that you deal with AUXV stuff.=A0 Will bare-meta= l=0A= > arm programs really have an auxiliary vector?=0A= =0A= I'm not sure what Auxv contains, but seems to be eg some system info that i= s handy, I do not know what/if its filled with something by default on a ba= re-metal arm-none target/arch?=0A= =0A= Thanks! BR Fredrik=0A=