Solved

Stepping into System.pas

Posted on 2004-04-22
8
434 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
ID: 10888001

   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
ID: 10888061
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
ID: 10888122

   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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 2

Expert Comment

by:RHenningsgard
ID: 10888706
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
 
LVL 1

Author Comment

by:TomBig
ID: 10889157
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
ID: 10889410
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
ID: 10889844
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
ID: 10889918
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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