Board index » cppbuilder » De{*word*81} doesn't see types when debugging Pascal in BCB ide

De{*word*81} doesn't see types when debugging Pascal in BCB ide

My current program requires that I write a Pascal module. I'm having trouble
debugging it. I'm using BCB4. I can run the program, and set the breakpoint
okay. When I do View|Debug|LocalVariables it displays a correct list of
local variables.

But it appears not to have type information for any of them. The local
variable window shows them as, say, 'iv: :0012F614' even though iv is an
integer; and 'sv: :0012F620' even though sv is a String. Also, when I try to
inspect any local variable, the inspector claims that its type is 'void'.

I went to Project|Options|Pascal and turned on all the debugging options.
Also turned all debugging things on in Project|Options|Linker and
|Options|Compiler. No difference.

So: how can I inspect local variables in my Pascal module?

------

the program consists of ptest.cpp, utest.cpp, utest.h, utest.dfm, and
resscan.pas. The function I'm debugging is in resscan.pas and looks like
this:

procedure VersionStampFromString(s:String; var vs: TVersionStamp);
var
  sd, st, sv: String;
  id, it, iv: Integer;
  temp:Integer;
begin
  id := Pos('day=',s);
  it := Pos('time=',s);
  iv := Pos('ver=',s);
  sd := Copy(s,id+5,it-id-3);
  st := Copy(s,it+6,iv-it-3);
  sv := Copy(s,iv+5,Length(s)-iv-1);
  decomp(sd,vs.day,vs.month,vs.year,temp);
  decomp(st,vs.hour,vs.minute,vs.second,temp);
  decomp(sv,vs.a,vs.b,vs.c,vs.d);
end;

--
Lucian

 

Re:De{*word*81} doesn't see types when debugging Pascal in BCB ide


: "Lucian Wischik" <ljw1...@cam.ac.uk> wrote:

Quote
>I went to Project|Options|Pascal and turned on all the debugging options.
>Also turned all debugging things on in Project|Options|Linker and
>|Options|Compiler. No difference.

You did turn *off* linking to packages?

(Obviously you are linking to the debug libraries.)

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
TeamB - http://www.teamb.com/

Re:De{*word*81} doesn't see types when debugging Pascal in BCB ide


"Stefan Hoffmeister (TeamB)" <Stefan.Hoffmeis...@Econos.de> wrote

Quote
> You did turn *off* linking to packages?
> (Obviously you are linking to the debug libraries.)

Stefan, Thanks for your answer. With it I have discovered:

* In order to debug variables in a Pascal unit that has been added to your
project, you must turn on link-with-debug-libraries

* In order to debug variables in a C++ unit that has been added to your
project, it is not necessary to link-with-debug-libraries.

--
Lucian

Re:De{*word*81} doesn't see types when debugging Pascal in BCB ide


: "Lucian Wischik" <ljw1...@cam.ac.uk> wrote:

Quote
>* In order to debug variables in a Pascal unit that has been added to your
>project, you must turn on link-with-debug-libraries

All the type information for Pascal is in the debug libraries which are
only contained in "static" (non-package) debug libraries.

Quote
>* In order to debug variables in a C++ unit that has been added to your
>project, it is not necessary to link-with-debug-libraries.

Well, the "native" mode of C++Builder is C++, after all.

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
TeamB - http://www.teamb.com/

Other Threads