Homebrew Asking for tips on how to work with stack dumps (stack/core dumps) and disassembly source codes

delete12345

Well-Known Member
OP
Member
Joined
Feb 27, 2010
Messages
695
Trophies
1
Age
32
Location
Taipei, Taiwan
XP
1,279
Country
United States
The following steps are what I know, thus far, on working with stack dumps. It's definitely going to be wrong because all of this is just self-taught knowledge.

  1. Compile a project.
  2. Call on "make" to generate a BIN and ELF file.
  3. Throw the BIN file onto the microSD card.
  4. Toss the microSD card into the 3DS.
  5. Do something with 3DS.
  6. Make it crash, and have it show the stack dump, like so:
    6PIC3hY.jpg
  7. Take a picture of the stack dump.
  8. Save the dump onto the microSD card.
  9. Shutdown the 3DS.
  10. Pull out the microSD card from the 3DS.
  11. Drag off the DMP file from the "/luma/dumps/arm11/" folder to the PC.
  12. Use devkitPro's "arm-none-eabi-objdump --source [ELF file]" to read the disassembled source file from the ELF file generated when on Step 2.

And then from this point, I have no idea what to do. I have some questions:
  • I understand that the values on the 3DS bottom screen in the stack dump display is the memory values. Why is it showing only that portion of the memory? Is it because when the crash happened, it takes a snapshot of the memory from where the crash occurred + offset at 0, to the crash address + offset 0x90?
  • I also understand the disassembly source code has addresses that are very different from the addresses on the hardware and in the DMP file. It would seem that I need to add some "offset value" to the addresses for the disassembly source code, so that the addresses there can match the addresses on the 3DS hardware, as well as the DMP files generated. Where do one get that "offset value"? And how should I add the offset value to the disassembly source file?
  • What other steps do I need to do to make life easier when it comes to debugging stack dump errors and uncaught segfaults, both on the hardware side (3DS) and when reading the disassembly source code?
Thank you!
 
Last edited by delete12345,
  • Like
Reactions: PandaPandel

delete12345

Well-Known Member
OP
Member
Joined
Feb 27, 2010
Messages
695
Trophies
1
Age
32
Location
Taipei, Taiwan
XP
1,279
Country
United States
What I am going to do is to see if I can use WinDbg to read the stack dump.

If this is not the right way to go about, then it has to be one of the executable binaries in the devkitPro/devkitARM/arm-none-eabi/ folder that I can use to understand the stack dump.

Let me know if this is correct, or wrong.
 
  • Like
Reactions: PandaPandel

delete12345

Well-Known Member
OP
Member
Joined
Feb 27, 2010
Messages
695
Trophies
1
Age
32
Location
Taipei, Taiwan
XP
1,279
Country
United States
Apparently, I found out the stack dump file that was saved onto the microSD card, is none other than the same contents displayed on the screen. It's practically useless when you have already taken a picture of the dump that was shown on the 3DS. I guess it's probably the reason why this thread is being ignored by people, because they all knew it's just nothing.

------------

This is what I did to read out the contents of the saved stack dump, assuming you have nothing installed:

  1. Install Python 2.7.15.
  2. Install Git.
  3. Clone AuroraWright's Luma3DS master branch from Github.
  4. Start up Python 2.7 environment in your terminal of your choice (Windows, Mac, Linux).
  5. Navigate to Luma3DS git repo folder location.
  6. Navigate to "Luma3DS/exceptions/exception_dump_parser" folder.
  7. Run "py -2 setup.py install".
  8. Wait until Python finishes generating things.
  9. Navigate to [Your Python installation folder]/Scripts
  10. Run "luma3ds_exception_dump_parser-script.py" on the stack dump file on the microSD card.
  11. The output of the dump is then shown.

------------

Now, I need to figure out how to read those numbers.
 
  • Like
Reactions: PandaPandel

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    Nothing like tearing ass up on a back road
  • Psionic Roshambo @ Psionic Roshambo:
    BigOnYa I think narcissism has all but killed love
    +2
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, I think I can agree on that.
    +1
  • K3Nv2 @ K3Nv2:
    People tend to think look at everything I have gains attention but ends up making them look worse for what it is
    +1
  • BigOnYa @ BigOnYa:
    It would be funny to pick up a girl in a real expensive car, then next date show up in a piece o shit car just to see her reaction. If she was real, it wouldn't matter.
  • Psionic Roshambo @ Psionic Roshambo:
    Everyone is disposable and replaceable, lies and deception are the coin of the realm. I have never felt so alone and so at odds with the world.
  • K3Nv2 @ K3Nv2:
    I don't think we should see others as disposable just if they can show any glimps of care about humanity should be forgiven
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, she would leave you inmediately
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    For a time I considered creating a new big bang. Wipe the slate clean and start from scratch....
  • K3Nv2 @ K3Nv2:
    Your closest friend probably talks negative about you the most
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I know I talk shit about that Ken guy constantly lol
    +1
  • K3Nv2 @ K3Nv2:
    Yeah I just had to consile it's a age thing and I can get erect
    +1
  • BigOnYa @ BigOnYa:
    Right.. Take a number
  • SylverReZ @ SylverReZ:
    @BigOnYa, Binkinator is still around you guys. I just saw him in one of the Discord servers that I'm in.
    +1
  • K3Nv2 @ K3Nv2:
    People get more mad when they learn you aren't as dimwitted as they think
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, that guy who was dissappeared?
  • Psionic Roshambo @ Psionic Roshambo:
    My favorite thing about that Ken, if they talk bad about others to you. They doing it to you too.
  • Psionic Roshambo @ Psionic Roshambo:
    Always remember that
  • K3Nv2 @ K3Nv2:
    More or less then they drop you and blame you when you find out
  • Psionic Roshambo @ Psionic Roshambo:
    Well taking responsibility for their own actions would mean doing work and self reflection lol easier to just be a pile of crap rolling down hill
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I dont mean to be rude but what was so important about them?
  • SylverReZ @ SylverReZ:
    @Xdqwerty, He truly shared his great knowledge about Switch modding.
    +1
  • SylverReZ @ SylverReZ:
    People miss him because he used to be active a lot.
    SylverReZ @ SylverReZ: People miss him because he used to be active a lot.