* * *

Author Topic: Compiled app debugger like Eurekalog?  (Read 2593 times)

touchring

  • Full Member
  • ***
  • Posts: 169
Compiled app debugger like Eurekalog?
« on: May 12, 2010, 08:42:05 am »
Hi, i'm looking to decompile a service app.  Does anyone know if there's the equivalent of the Eurekalog debugger for Lazarus?  Thanks.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 554
Re: Compiled app debugger like Eurekalog?
« Reply #1 on: May 12, 2010, 06:46:35 pm »
Hi, i'm looking to decompile a service app.  Does anyone know if there's the equivalent of the Eurekalog debugger for Lazarus?  Thanks.

I have just learned that linking HeapTrc unit into your project reveals memory leaks and non-handled exceptions. There is a setting for it in project linking options. Compiler option is -gh.

What means "decompile a service app"?

Juha

Martin_fr

  • Hero Member
  • *****
  • Posts: 1120
Re: Compiled app debugger like Eurekalog?
« Reply #2 on: May 12, 2010, 07:21:14 pm »
I don't now of anything exactly like it, but here is what you can do:

- compile you app with debug info
- compile you app with -gh (heaptrc) for mem leaks

- use Application.OnException => to save the trace.. (I have not tested that)

if anything happens you get a stacktrace.
Compile Lazarus with a package called "leak view" (it's in the list of available packages, no download needed)

You can paste (or load) the stacktrace from above, and navigate in your application, simply by clicking on the lines of the stacktrace.

---
What is not (yet?) there:

The above would require you to publish an executable with full debug info:
- very big
- lots of info, you may not want to reveal.

In theory you can (again I haven't done that nor tested it):
- use objdump, to create a map between addresses and files/lines
- strip the debug info from your exe.

If an exception occurs in the released app, you get a stacktrace, but it only has addresses, no filenames or ine numbers

you need to write an app, that looks app the addresses in the map..... (maybe something exists, I don't know)



touchring

  • Full Member
  • ***
  • Posts: 169
Re: Compiled app debugger like Eurekalog?
« Reply #3 on: May 13, 2010, 09:39:48 pm »
I have just learned that linking HeapTrc unit into your project reveals memory leaks and non-handled exceptions. There is a setting for it in project linking options. Compiler option is -gh.

What means "decompile a service app"?

Juha



i meant debug a service app.   :D

Forest

  • New member
  • *
  • Posts: 12
Re: Compiled app debugger like Eurekalog?
« Reply #4 on: July 25, 2010, 04:12:13 pm »
I'm interested in creating such application to read map file and convert hex pointers into unit/line info. Is it possible at all  without knowing initial address where executable is loaded into memory ?

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads