From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by sourceware.org (Postfix) with ESMTPS id 64CF43954C14 for ; Tue, 27 Oct 2020 16:53:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 64CF43954C14 Received: by mail-pj1-x1041.google.com with SMTP id a17so1092555pju.1 for ; Tue, 27 Oct 2020 09:53:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1bsbqth8AZKzmMLdxwnqHtC5MpT1StmKG5pm+fHJG2A=; b=UGCWzfbb1VRTKpHsDDLQWH6/b4zoZQsMN86KVHk/djwqyxqSpkBZ8eal5yUpfokVey u40EGrVr8svABW2AWcwc/RnXIniBn6fEmqk9UW1ZT/Ufn3XXDIsgHrH99q9DAHIh2Oj+ IqfH5eu4XYCDhHYn8tYQ/+J/IpOlhbo4HhoVucK9bEPTaNrgX6Lp14DS7H35PnZ5YIrJ V0O6g62o9nhfhUkUjp4r04vry1fO5hCTnCqnZm+qDLxzJm4nHEB1UiUqmRZCDUc7FYly 2RmNCHGBrme6JkZwaUOjQGMYcq6gREk770/1mwSjXSr/VuYgFCVoFQDap3W93hCb9cvx rjpg== X-Gm-Message-State: AOAM530tztMoxGmYugrsNnXM9cARlkondhpg9FmVYeRv53zcp0gSrzNM t5SHnBgiM+T5HwfjYQu+g9AVDlCWjI7vSOe9YeOMPsyVVUc= X-Google-Smtp-Source: ABdhPJy6jLiFqEzCyy3qUWezRid9RXVk9HhqhzqKZgzsNQKm4m426w8YWmfHLEoo53KpN+DAMrVuMqKdyIcm+dENzmo= X-Received: by 2002:a17:902:7611:b029:d4:da66:f26c with SMTP id k17-20020a1709027611b02900d4da66f26cmr3149942pll.3.1603817634141; Tue, 27 Oct 2020 09:53:54 -0700 (PDT) MIME-Version: 1.0 References: <688f8081-e972-2ca1-255a-14b63e9e173d@simark.ca> In-Reply-To: From: Paul Mathieu Date: Tue, 27 Oct 2020 09:53:42 -0700 Message-ID: Subject: Re: [PATCH] gdb: add support for handling core dumps on arm-none-eabi To: Fredrik Hederstierna Cc: Luis Machado , Simon Marchi , "gdb-patches@sourceware.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 27 Oct 2020 16:53:57 -0000 Hi Fredrik, > This is the current format when trying from ARM simulator: > > fredrik@legion ~/src/armv4t_coretest$ readelf -aA test.core > ELF Header: > Magic: 7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00 > Class: ELF32 > Data: 2's complement, little endian > Version: 1 (current) > OS/ABI: ARM > ABI Version: 0 > Type: CORE (Core file) > Machine: ARM > Version: 0x1 > Entry point address: 0x0 > Start of program headers: 52 (bytes into file) > Start of section headers: 8084 (bytes into file) > Flags: 0x0 > Size of this header: 52 (bytes) > Size of program headers: 32 (bytes) > Number of program headers: 5 > Size of section headers: 40 (bytes) > Number of section headers: 7 > Section header string table index: 6 > > Section Headers: > [Nr] Name Type Addr Off Size ES Flg Lk Inf Al > [ 0] NULL 00000000 000000 000000 00 0 0 0 > [ 1] note0 NOTE 00000000 001e44 000138 00 A 0 0 1 > [ 2] load PROGBITS 00010000 0000d4 000100 00 AX 0 0 1 > [ 3] load PROGBITS 00080000 0001d4 000000 00 WA 0 0 1 > [ 4] load PROGBITS 00080000 0001d4 000400 00 WA 0 0 1 > [ 5] load PROGBITS 000fe790 0005d4 001870 00 WA 0 0 1 > [ 6] .shstrtab STRTAB 00000000 001f7c 000016 00 0 0 1 > Key to Flags: > W (write), A (alloc), X (execute), M (merge), S (strings), I (info), > L (link order), O (extra OS processing required), G (group), T (TLS), > C (compressed), x (unknown), o (OS specific), E (exclude), > y (purecode), p (processor specific) > > There are no section groups in this file. > > Program Headers: > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align > NOTE 0x001e44 0x00000000 0x00000000 0x00138 0x00000 R 0x1 > LOAD 0x0000d4 0x00010000 0x00000000 0x00100 0x00100 R E 0x1 > LOAD 0x0001d4 0x00080000 0x00000000 0x00000 0x00000 RW 0x1 > LOAD 0x0001d4 0x00080000 0x00000000 0x00400 0x00400 RW 0x1 > LOAD 0x0005d4 0x000fe790 0x00000000 0x01870 0x01870 RW 0x1 > > Section to Segment mapping: > Segment Sections... > 00 > 01 load > 02 load > 03 load load > 04 load > > There is no dynamic section in this file. > There are no relocations in this file. > There are no unwind sections in this file. > No version information found in this file. > > Displaying notes found at file offset 0x00001e44 with length 0x00000138: > Owner Data size Description > CORE 0x0000007c NT_PRPSINFO (prpsinfo structure) > CORE 0x00000094 NT_PRSTATUS (prstatus structure) Does this support `.reg/xxx` notes for RTOS that support multiple tasks? It would be really nice to have `info threads` "just work" Paul