Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: CrashReport , addr2line returns ??:?

  1. #1

    CrashReport , addr2line returns ??:?

    Teensy 4.1 with Teensyduino 1.56 beta 2
    Arduino IDE 1.8.16

    I have the general area of my problem... but its a big section of stuff of many steps and data flinging.

    Haven't quite tracked it down to the exact problem because it doesn't happen 100% of the time.

    When I run the line2addr with the address reported I get back

    ??:?

    Which I take is it has no idea where that address reported translates to the actual file.

    And yes, I am in the correct place and checking the correct file. Already verified that.

    Click image for larger version. 

Name:	ae79ae5e12d05ece05970c94ee89c560.png 
Views:	26 
Size:	13.0 KB 
ID:	26746

  2. #2
    Member
    Join Date
    Jul 2016
    Location
    Denmark
    Posts
    36
    I had the same problem but I compile from platformio, witch per default runs without the -g build flag that is neede for addr2line to work
    this is the thread that got me that answer
    https://forum.pjrc.com/threads/67998...l=1#post291251

    and i think the correct line2addr to use is "hardware\tools\arm\bin\arm-none-eabi-addr2line"

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,980
    Also note, sometimes I have had where the address does not translate to a good line number. I have had this happen when for example the code overwrites parts of memory, like things on the stack or ...

    But in some cases like this, if that does not work, I fall back to:
    Go to the build directory in temp....
    Then I edit the *.sym file and sort the file by addresses and then look to see what is close. For example if I had the same address in the file I just built I would see in the sorted lines:
    Code:
    00033310 g     F .text.itcm	0000004c sprintf
    0003335c g     F .text.itcm	00000022 __sread
    And guess that it was somewhere in sprintf...

    Which also gives me your same results for addr2line:

    Code:
    C:\Users\kurte\AppData\Local\Temp\arduino_build_MTP_TEST_AUDIO.ino>addr2line -e MTP_TEST_AUDIO.ino.elf 0x33318
    ??:?
    
    C:\Users\kurte\AppData\Local\Temp\arduino_build_MTP_TEST_AUDIO.ino>

  4. #4
    Quote Originally Posted by KurtE View Post
    Also note, sometimes I have had where the address does not translate to a good line number. I have had this happen when for example the code overwrites parts of memory, like things on the stack or ...

    But in some cases like this, if that does not work, I fall back to:
    Go to the build directory in temp....
    Then I edit the *.sym file and sort the file by addresses and then look to see what is close. For example if I had the same address in the file I just built I would see in the sorted lines:
    Code:
    00033310 g     F .text.itcm	0000004c sprintf
    0003335c g     F .text.itcm	00000022 __sread
    And guess that it was somewhere in sprintf...

    Which also gives me your same results for addr2line:

    Code:
    C:\Users\kurte\AppData\Local\Temp\arduino_build_MTP_TEST_AUDIO.ino>addr2line -e MTP_TEST_AUDIO.ino.elf 0x33318
    ??:?
    
    C:\Users\kurte\AppData\Local\Temp\arduino_build_MTP_TEST_AUDIO.ino>

    I had tried to look in the sym file like I have before, but didn't quite go so well.

    I do have 4 places that use sprintf so will inspect around those to see if related to blowing it up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •