Recent

Author Topic: Disassembly  (Read 14103 times)

wordweb

  • New Member
  • *
  • Posts: 11
    • http://www.wordwebsoftware.com/
Disassembly
« on: August 03, 2008, 12:08:29 pm »
I've converted some delphi code, and am now fairly sure that FPC is producing strange results for some included asm statements. However to track down exactly what I need to be able to see what Lazarus is producing.

 * What has happened to the IDE disassembly view - e.g. this message implies it exists but it doesn't show up in the latest download?

 * The IDE debugger does not seem to evaluate register names  (eax, etc)

Thanks.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8831
  • Programming + Glam Metal + Tae Kwon Do = Me
RE: Disassembly
« Reply #1 on: August 05, 2008, 07:52:43 am »
Use -alnrt compiler option for detailed generated assembly file (in AT&T, hope you can read it).

wordweb

  • New Member
  • *
  • Posts: 11
    • http://www.wordwebsoftware.com/
Re: RE: Disassembly
« Reply #2 on: August 05, 2008, 09:37:08 am »
Yes, thanks - I was using that. But what happened to the disassembly debug window? Should I submit non-support for "eax" etc in the debugger to the bug tracker?

(also see bug http://mantis.freepascal.org/view.php?id=11786 - my code works when compiled with -al but not without that option, so these options don't help much with this particular problem!)

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2663
RE: Re: RE: Disassembly
« Reply #3 on: August 22, 2008, 10:22:36 am »
making a asm window is on the roadmap. No need to create an issue for it.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

bobo

  • Full Member
  • ***
  • Posts: 171
Disassembly
« Reply #4 on: November 10, 2008, 06:45:39 am »
Is there any ETA on this yet?

It is virtually impossible to debug programs with Lazarus at the moment, especially if it contains some asm code. To have a proper watch window (to see object properties, etc.) as well as CPU window is really necessary.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2663
Disassembly
« Reply #5 on: November 13, 2008, 04:31:07 pm »
Don't know what needs to be done to step through inlined asm. In theory line info could be generated for it so you could see the asm in your source. To watch registers, prefix the names with $ like $eax

To see class properties a different debugger is needed, since gdb doesn't support them.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Disassembly
« Reply #6 on: December 23, 2008, 08:56:40 pm »
How do C++ people debug their OO programs?  I mean what do they use if gdb cannot do class properties?

I know Delphi had all these features above over 10 years ago, so it is definitely doable, at least on Windows (which could cover the majority of the people using Lazarus).

This is really missing from fpc/lazarus at the moment.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2663
Re: Disassembly
« Reply #7 on: December 23, 2008, 11:59:59 pm »
Delphi has its own debug format and its own debugger, so you might expect that they understand each other.
gdb is primarely developped by C ppl, knowing only C. C and C++ don't know the concept of properties, so gdb has no knowledge on how to handle them. And C++ OO ppl don't have to debug them.
Even worse the debug format gdb uses (Stabs) doesn't know the concept of properties either. So even in the case someone adds supports for properties to gdb, it cannot evaluate them since the debug info doesn't provide the information that a certain symbol is a property.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Disassembly
« Reply #8 on: February 16, 2009, 03:41:07 am »
I guess developing a debugger like that would be a huge undertaking (even if it is only for Windows) and currently out of the scope of the developers?

Still, it is one thing that is majorly missing to do RAD.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2663
Re: Disassembly
« Reply #9 on: February 17, 2009, 11:36:19 am »
A pascal native debugger is being (slowly) developed. I hope to get into a bit more speed
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Disassembly
« Reply #10 on: February 27, 2009, 01:06:28 am »
That is good news.

Is there any roadmap or additional information available about this?
Like what is under development at the moment, what is planned, maybe when?

 

TinyPortal © 2005-2018