<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GDB can't read core files in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/GDB-can-t-read-core-files/m-p/189348#M8168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a target with a ColdFire MFC5484 running Linux 2.6.25.&amp;nbsp; A target application has generated core files we'd like to examine with gdb, offline, on the host system used to build the image.&amp;nbsp; The host system is a PC running Linux 2.6.33.3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gdb on the host is m68k-linux-gnu-gdb, version 6.7.50.20080107.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invoking this gdb on the host works fine, as does loading the executable (with symbols).&amp;nbsp; Loading the core file results in gdb complaining that it "can't read core files on this machine".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(gdb) file myExecutable&lt;/P&gt;&lt;P&gt;Reading symbols from /home/blah...blah/myExecutable...done.&lt;/P&gt;&lt;P&gt;(gdb) core-file core.myExecutable.1234&lt;/P&gt;&lt;P&gt;GDB can't read core files on this machine.&lt;/P&gt;&lt;P&gt;(gdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I need to have all of my libraries and source directories set up in gdb before loading the core file, or is this gdb a version that will only work attached to gdbserver running on a target (and examine the core file on the target only)?&amp;nbsp; Or is there something else more fundamental I'm missing?&amp;nbsp; I'd like to be able to examine a core file without being attached to the system that generated the core dump.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2011 08:13:14 GMT</pubDate>
    <dc:creator>agentcooper</dc:creator>
    <dc:date>2011-03-09T08:13:14Z</dc:date>
    <item>
      <title>GDB can't read core files</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/GDB-can-t-read-core-files/m-p/189348#M8168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a target with a ColdFire MFC5484 running Linux 2.6.25.&amp;nbsp; A target application has generated core files we'd like to examine with gdb, offline, on the host system used to build the image.&amp;nbsp; The host system is a PC running Linux 2.6.33.3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gdb on the host is m68k-linux-gnu-gdb, version 6.7.50.20080107.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invoking this gdb on the host works fine, as does loading the executable (with symbols).&amp;nbsp; Loading the core file results in gdb complaining that it "can't read core files on this machine".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(gdb) file myExecutable&lt;/P&gt;&lt;P&gt;Reading symbols from /home/blah...blah/myExecutable...done.&lt;/P&gt;&lt;P&gt;(gdb) core-file core.myExecutable.1234&lt;/P&gt;&lt;P&gt;GDB can't read core files on this machine.&lt;/P&gt;&lt;P&gt;(gdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I need to have all of my libraries and source directories set up in gdb before loading the core file, or is this gdb a version that will only work attached to gdbserver running on a target (and examine the core file on the target only)?&amp;nbsp; Or is there something else more fundamental I'm missing?&amp;nbsp; I'd like to be able to examine a core file without being attached to the system that generated the core dump.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 08:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/GDB-can-t-read-core-files/m-p/189348#M8168</guid>
      <dc:creator>agentcooper</dc:creator>
      <dc:date>2011-03-09T08:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: GDB can't read core files</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/GDB-can-t-read-core-files/m-p/189349#M8169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read the source code for gdb, searching for that error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll find it "gdb/corefile.c" in a section with the comment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/* Backward compatability with old way of specifying core files.  */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Old way"? Implies you should be using "the new way" whatever that is. The code is calling find_core_target() and the comments on it say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/* Find a single core_stratum target in the list of targets and return it.   If for some reason there is more than one, return NULL.  */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could it be finding more than one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "help text" for the core file command is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Use FILE as core dump for examining memory and registers.\n\No arg means have no core file.  This command has been superseded by the\n\`target core' and `detach' commands.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you may want to use the "new form".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was having trouble with gcc and core files yesterday. The command "powerpc-linux-gdb core" didn't work, but "powerpc-linux-gdb --core=core" did in my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:40:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/GDB-can-t-read-core-files/m-p/189349#M8169</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2020-10-29T09:40:40Z</dc:date>
    </item>
  </channel>
</rss>

