<?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 Re: find return address in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133980#M1493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;For which processor?&lt;BR /&gt;&lt;BR /&gt;In general, in ANSI C there is no portable way. For a specific compiler and a specific architecture, it might be possible to know something from the way functions are called. Otherwise you have to revert to assembly, probably this is the only way which really reliably works.&lt;BR /&gt;&lt;BR /&gt;Why do you need the return address?&lt;BR /&gt;Do you need just the address of the caller or the addresses of the complete call chain (much harder)?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2007 21:22:07 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-05-17T21:22:07Z</dc:date>
    <item>
      <title>find return address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133979#M1492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;How can I find the return address from the stack (the address of the calling function) ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:10:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133979#M1492</guid>
      <dc:creator>Ionut</dc:creator>
      <dc:date>2007-05-17T21:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: find return address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133980#M1493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;For which processor?&lt;BR /&gt;&lt;BR /&gt;In general, in ANSI C there is no portable way. For a specific compiler and a specific architecture, it might be possible to know something from the way functions are called. Otherwise you have to revert to assembly, probably this is the only way which really reliably works.&lt;BR /&gt;&lt;BR /&gt;Why do you need the return address?&lt;BR /&gt;Do you need just the address of the caller or the addresses of the complete call chain (much harder)?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:22:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133980#M1493</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-05-17T21:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: find return address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133981#M1494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Sorry I've forgot to mentions it's a HCS08 MCU.&lt;/DIV&gt;&lt;DIV&gt;I would need only the address of the caller function, not the whole call stack.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:25:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133981#M1494</guid>
      <dc:creator>Ionut</dc:creator>
      <dc:date>2007-05-17T21:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: find return address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133982#M1495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;As I said, I don't think you can do this in C. With assembly/HLI its not dificult.&lt;BR /&gt;In the attachment (I hope it gets attached) I coded a sample. I used the elipsis (...) calling convention to make sure the compiler passes all arguments on the stack. Otherwise the trampoline code has to make sure it does pass the arguments on properly.&lt;BR /&gt;What kind of arguments has your function?&lt;BR /&gt;Any?&lt;BR /&gt;What do you try to do, BTW.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 19:38:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/find-return-address/m-p/133982#M1495</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-05-18T19:38:44Z</dc:date>
    </item>
  </channel>
</rss>

