Recent

Author Topic: Instruction pointer to sourcecode  (Read 3749 times)

scribly

  • Jr. Member
  • **
  • Posts: 80
Instruction pointer to sourcecode
« on: June 09, 2018, 08:37:50 pm »
Some of my users has given me a dumpfile which a stacktrace and instruction pointers

my program was compiled with an external .DBG file. How can I convert these addresses into sourcecode filenames and their linenumber ?

Edit: I ended up using gdb and in there use
Code: [Select]
info line *ip
« Last Edit: June 09, 2018, 08:53:37 pm by scribly »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Instruction pointer to sourcecode
« Reply #1 on: June 09, 2018, 09:23:52 pm »
You can also try to use "leaktrace". Its a package you install in the IDE (it is included in the installer, just need to add the package)

Open your project
Then in menu: Viev > Leaks and traces
Paste or load the stacktrace
Press resolve, and open the exe of your app (the same exe you shipped, but with the dbg file in the same folder)

I never tested it with dbg files. But if you keep an exe with debug info, and make a copy, strip the copy and release the stripped copy, then that works.


Thaddy

  • Hero Member
  • *****
  • Posts: 14213
  • Probably until I exterminate Putin.
Re: Instruction pointer to sourcecode
« Reply #2 on: June 09, 2018, 10:54:55 pm »
Although I see your problem, it is never a good idea if your customer is able to obtain a stack-trace unless you want them to.
Maybe just give them a full debug version - for testing , never production - and then analyze....
Martin's suggestion is also - somewhat - OK. I would not accept that, though. Crash is back to lab or to customer's location.
Specialize a type, not a var.

scribly

  • Jr. Member
  • **
  • Posts: 80
Re: Instruction pointer to sourcecode
« Reply #3 on: June 10, 2018, 09:31:51 am »
He used the windows dump file it generates on crash.  And it was caused because he used an external application to 'nop' out some initialization code (Hoping that i'd put a check if nil on every single access to something I assume is never nil)

So yeah, that wasted some time
« Last Edit: June 10, 2018, 09:34:26 am by scribly »

 

TinyPortal © 2005-2018