Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Stack Trace decoding (Read 684 times)
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Stack Trace decoding
Apr 13th, 2024 at 7:50pm
Print Post  
is there anything in VS Micro that can decode stack callback information on the fly? I know there is the exception traceback capabilities.

Basically I have routines that spit out memory leak detection information and want automatic translation from an address via symbol/map tables to the function name and line of code? The IDF has this. 

This is not a 1 time exception capability, rather when it sees what appears to be a call stack, then do the translation.

Thank
John
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2505
Joined: Feb 13th, 2019
Re: Stack Trace decoding
Reply #1 - Apr 15th, 2024 at 8:51am
Print Post  
Can you send an example of the stack you are trying to decode with its' surrounding output (anything that denotes where it begins or ends)?

Also please attach a build log with the settings enabled shown at the top of the page so we can understand your environment further.

Also if you know which IDF tool is used to perform the operation or have an example/link to article, we can review how to integrate this.
  
Back to top
IP Logged
 
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Re: Stack Trace decoding
Reply #2 - Apr 17th, 2024 at 11:30pm
Print Post  
The IDF link is https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system...

Im using standalone mode and have modified the heap_trace_dump() function to output the traceback in the same format as an exception dump, that being Backtrace: IP:SP...

Example:
104 bytes (@ 0x3fff293c) allocated CPU 0 ccount 0x2fb1e920 caller...
Backtrace:  0x40110bcb:00000000 0x4011329e:00000000 0x40118032:00000000 0x40114996:00000000 0x40122f48:00000000 0x4010f8f6:00000000 

I have done it this way (for now) so I can paste the trace into the serial window and get VSMicro do the symbol looksup. This has to be done for each leak (or possible leak) and is time consuming. so having VSMicro seeing a Backtrace: line and dumping the stack automatically is a great win!

I can change the output to whatever works best for you guys. I am willing to work with you on this.
  
Back to top
 
IP Logged
 
JYMX
Newbies
*
Offline


Posts: 8
Joined: Jan 19th, 2024
Re: Stack Trace decoding
Reply #3 - Apr 17th, 2024 at 11:35pm
Print Post  
I didnt send the build log due to directory and filename security implications. If there is a section of the log you want to see, then let me know and i can maybe subset that bit
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2505
Joined: Feb 13th, 2019
Re: Stack Trace decoding
Reply #4 - Apr 18th, 2024 at 8:29am
Print Post  
Thanks for the detail around this.

Could you email us the build log with a link to this thread, and an example of what would normally be seen in the scenario so we can look at this further? (Your log is kept confidential and will be deleted once the investigation is complete).

With your modifications, the issue is having to press the exception decoder button for each individual stack dump from your description.  If this is the case, can you describe (or screenshot what IDF does in the same scenario) how you would pick which one should be decoded?

Apologies if I have misunderstood what is required here currently.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint