Solved

Stepping into System.pas

Posted on 2004-04-22
8
431 Views
Last Modified: 2010-04-05
Hi there

I am working with Delphi 7 Professional (german version). Somehow I am not able to step into my System.pas, although I have it in my projects searchpath. Can this be, because it differs from the System.dcu in my Lib path ? Do I have to recompile the rtl and if, how would I do that ?

Any suggestions appreciated.

TomBig
0
Comment
Question by:TomBig
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:Ivanov_G
Comment Utility

   Project / Options / Compiler / Debugging

   tick "Use Debug DCUs"

   this should do the trick. Anyway you will not succeed to recompile system.dcu so better don't try it
0
 
LVL 1

Author Comment

by:TomBig
Comment Utility
Ivanov_G

I have "Use Debug DCUs" turned on, but I just realized, that i dont have a System.dcu in my $(DELPHI)\Lib\Debug directory. What could that mean ? I assume I need a System.dcu containing debug information. How would I get one ?

TomBig
0
 
LVL 12

Expert Comment

by:Ivanov_G
Comment Utility

   well, it works file here :

  procedure TForm1.Button1Click(Sender: TObject);
  var
    P : Pointer;
  begin
    FreeMemory(P); // step into here ...
  end;

  If you don't have it - this could mean that you don't use it...
0
 
LVL 2

Expert Comment

by:RHenningsgard
Comment Utility
TomBig,

Hmm... I am running D6Pro, and I do have the system.dcu in my \Lib\Debug directory.  I just went to Tools|Environment Options|Library, and added the $(DELPHI)\Lib\Debug path just in front of $(DELPHI)\Lib in the list.  Built the project, and I stepped right in to the system unit on a trunc() call.

I suspect (and seem to remember) that there's an installation option to install/not the debugging DCU's.  I recommend that you find your installation CD and check it for the debug DCU's.

I haven't recompiled the SYSTEM.PAS unit in this version of Delphi, but I have modified and rebuilt SYSTEM.PAS in every other revision of Delphi since 1.0, so I can't imagine why you shouldn't be able to rebuild it in 7.0.  (I worked cross-platform a lot, so I always modified the file I/O stuff to transparently handle $0A or $0A$0D terminators in text files on readln().)

Rob---
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:TomBig
Comment Utility
RHenningsgard

thanks for your hints. the funny thing is, that I have all the debug dcus (as far as i am aware of) but the system.dcu (for example i have no problem stepping into the sysutils, whos source resides at the same place as the one of system). maybe my installation is corrupt anyway. Who knows. I have had some other very strange problems recently that no one seems to know of but me (see http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20962129.html if you want to earn some points).

by the way. how would i succeed in recompiling the system.pas ?

cheers TomBig
0
 
LVL 2

Accepted Solution

by:
RHenningsgard earned 125 total points
Comment Utility
OK, I just went into my archives, and I see that when I've rebuilt the runtime libraries in the past, I used a makefile from Borland, and a standalone directory tree with my modified version(s) of several of the assembly-language files.  The makefile does accept a "-D" option to build the debug version of the entire library.

I'm deep into a project this morning, so I'll recommend that you check your installation, your installation CD, and also search Borland.com for the needed makefile and such.

On My Delphi 6 installation, a makefile for the RTL is in Program Files\Borland\Delphi6\Source\Rtl\makefile.  If you
can find this in your own installation, you should be well on your way to success.

My D6 make file indicates that one must have Turbo Assembler 4.0 or later and the Borland Resource Compiler 4.0 or later to build the runtime library.

Good luck!
0
 
LVL 1

Author Comment

by:TomBig
Comment Utility
RHenningsgard

thanks a lot for your advice. I managed to recompile the rtl and now i am able to step into the system.pas ! hooray.

cheers
TomBig
0
 
LVL 2

Expert Comment

by:RHenningsgard
Comment Utility
TomBig,

You are more than welcome, and thanks for my very first "Accepted Answer!"  (I paid the $100 to join as an unlimited member, and really haven't taken the time to post much advice.  Figured I should start to answer at least one question a day, just to carry my weight on a technical level).

Cheers, and congratulations!

Rob---
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now