From owner-freebsd-hackers@freebsd.org Sun Jan 14 15:57:02 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAA68E774E5 for ; Sun, 14 Jan 2018 15:57:02 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F40F812AB for ; Sun, 14 Jan 2018 15:57:02 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: by mail-io0-x229.google.com with SMTP id f34so5406439ioi.13 for ; Sun, 14 Jan 2018 07:57:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuffli-net.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=zGunf/N2zgVytLyC3X7jMJuwMp9Kw3lVV1qmrEV+KnM=; b=ST8euZpizVmYUW3eSA4izmeX/zF1Zfl4mVUR8aCfDC+0p5BPHNr3hdMZDGRfCpXwfo p9OwUsydU/9nSjISvOmlJyjLJtfd9CK7y5tNpktA/YxbMRYUzQRWJUUejrK9RJ7w8mqc kBiuYGdO9J4kAN53MVXmER/bEBcjubdPML/pMy7X3G5JjE1Dxwy+zAWHcby5DzZXXMZY udQp4Png55J51iTCSUwHlONZTzMQrcUTNxp8hsD1w3F5VTkRcqQMzrT3czK3wG2LeCs/ LGJ5yZo/QSEm1pf+aS/055xqsjuHpBijSfyQQrkEcuBZaO9YlhYRvLgUukPEiY5ZHndy ZIFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zGunf/N2zgVytLyC3X7jMJuwMp9Kw3lVV1qmrEV+KnM=; b=npTfCbfR71n2wiDmZlP7QvW7SDU8W/LEdzuS/uRIrUjm9+1R5JvARuZg6xJjXycLHV l0Wp+73U3BczyfVLXrccfpt7F8GQ3hG0xwEc6NG/2iXxxOpuz7daRJ9k5p0Q3UfZkZ/4 8R9Tnmg5BX5tK7N2QKPyZzYM58U7DnReTS4oOELpcIHEudi3QMap0FcyeLuKUoOEz5UD HVDBd6zxDvK43E/+3BZJYWf6AxulbT4mn+202fkPdsdYQ8QyRBWOC/+aDdrh/ph3eGfr VvD8NaFncHdTVPem3Useekx6EUWEdR0KrKa4VIEi3BXBFIxSQzt04V4S3B3+9bgwRUUb wKbw== X-Gm-Message-State: AKwxytdWQlMeC0n3eat0P30/A55qCtnzbShOBo+DJx4eW6qo4BbCuGpy Emp8otpK2tihN/U+HmsLfpGcdMSYq/wAty0p57oLx0wYBsU= X-Google-Smtp-Source: ACJfBoucB114FrVp0eVya3yHFGBIh5JQiTVkokDnYt0MmPOYda7ywfJth14Fjpsb7PhiVW0VxEiOM1hudUrZy8z5e3I= X-Received: by 10.107.9.213 with SMTP id 82mr4971650ioj.295.1515945421463; Sun, 14 Jan 2018 07:57:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.137.76 with HTTP; Sun, 14 Jan 2018 07:57:01 -0800 (PST) From: Chuck Tuffli Date: Sun, 14 Jan 2018 07:57:01 -0800 Message-ID: Subject: examining Linux core file? To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jan 2018 15:57:02 -0000 If a Linux application running under the Linux emulation (a.k.a. Linuxulator) core dumps, is it possible to examine the resulting core file? lldb didn't seem to like it: # file mremap05.core mremap05.core: ELF 64-bit LSB core file x86-64, version 1 (FreeBSD), FreeBSD-style, from 'ases/bin/mremap05' # lldb -c mremap05.core testcases/bin/mremap05 (lldb) target create "testcases/bin/mremap05" --core "mremap05.core" error: Unable to find process plug-in for core file '/compat/linux/opt/ltp/mremap05.core' (lldb) bt error: invalid process FreeBSD's gdb seems to recognize this is as Linux, but doesn't know where to go from there: # /usr/libexec/gdb -q ./testcases/bin/mremap05 mremap05.core warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration of GDB. Attempting to continue with the default i386:x86-64 settings. Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /compat/linux/opt/ltp/testcases/bin/mremap05] warning: core file may not match specified executable file. Core was generated by `./testcases/bin/mremap05'. Program terminated with signal 11, Segmentation fault. #0 0x0040eb01 in ?? () (gdb) bt #0 0x0040eb01 in ?? () Cannot access memory at address 0xdbea00 The gdb from CentOS, on the other hand, seems to think this is a FreeBSD core: # gdb -q ./testcases/bin/mremap05 mremap05.core Reading symbols from /opt/ltp/testcases/bin/mremap05...done. warning: A handler for the OS ABI "FreeBSD ELF" is not built into this configuration of GDB. Attempting to continue with the default i386:x86-64 settings. "/opt/ltp/mremap05.core": no core file handler recognizes format Are there any other approaches to consider? TIA. --chuck