Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-11

New GDB version 5.1 available

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pierre Muller

This is just to inform people that
GDB 5.1 was released.

http://sources.redhat.com/ml/gdb-announce/2001/msg00010.html

Extract of the annoucement of particular interest for gpc and fpc-pascal mailing lists :

........................

What has changed in GDB?

*** Changes in GDB 5.1:

........................

* Support for debugging Pascal programs.

GDB now includes support for debugging Pascal programs. The following main features are supported:

     - Pascal-specific data types such as sets;
     - automatic recognition of Pascal sources based on file-name
       extension;
     - Pascal-style display of data types, variables, and functions;
     - a Pascal expression parser.

However, some important features are not yet supported.

     - Pascal string operations are not supported at all;
     - there are some problems with boolean types;
     - Pascal type hexadecimal constants are not supported
       because they conflict with the internal variables format;
     - support for Pascal objects and classes is not full yet;
     - unlike Pascal, GDB is case-sensitive for symbol names.
>>>>>>>>>>>>>>>>>>>>><

The pascal language support is essentially my work, but it is still far from complete and far from perfect.

One of the latest patch applied should allow to get a nice representation of GPC strings.

Please don't hesitate to report problems about
pascal support ....

Two reminders:

-- if you really can't do what you used to do anymore with GDB, try simply to set the language to C with
(gdb) set langugage c
and try again if it works better.

Don't forget that if you are in pascal language, pascal syntax must be used:

so to change the value of a variable 'x' in the program, you will need to use
(gdb) set x := 5
instead of
(gdb) set x = 5
for older GDB version.

In the hope that these changes will be useful for the pascal community.

Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)

Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99

Reply by email

Lee, John

so does will you be updating the gdb stuff we use to make go32/win32 ide snapshots? eg the libgdb stuff on ftp fpc\contribs? We are currently at 5.0? Pls let me know when/iof you do this. TIA...

Subject: [fpc-pascal]New GDB version 5.1 available This is just to inform people that GDB 5.1 was released.

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Reply by email

Pierre Muller
John wrote
so does will you be updating the gdb stuff we use to make go32/win32 ide snapshots? eg the libgdb stuff on ftp fpc\contribs? We are currently at 5.0? Pls let me know when/iof you do this. TIA...

I project to setup a small patch to
overcome some problems with the default GDB implementation and to ease the use of libgdb for FP IDE,
I will tell you when it is ready.

Reply by email

Maurice Lombardi
to Pierre Muller: This is just to inform people that GDB 5.1 was released.…
Pierre Muller wrote 7 lines
This is just to inform people that GDB 5.1 was released. ........................ * Support for debugging Pascal programs. - unlike Pascal, GDB is case-sensitive for symbol names.

Do you plan to do something for that ?

I use gdb nearly only through Rhide.
We can ask to Robert to capitalize identifiers in the gpc or fpc style (somebody already asked him). It will be necessary to take somehow into account the nature (C or Pascal) of the module in which these identifiers are defined (gpc can call C routines). It is useless for him to do that in the rhide interface if GDB already does.

Show quoted text 9 lines
Don't forget that if you are in pascal language, pascal syntax must be used: so to change the value of a variable 'x' in the program, you will need to use (gdb) set x := 5 instead of (gdb) set x = 5 for older GDB version.

Much more natural for Pascal programmers, but for rhide it means a change in the interface depending on a language setting (may be an option to check somewhere).

Maurice

Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 63 54 95

Reply by email

Andris Pavenis
to Maurice Lombardi
Maurice Lombardi wrote 17 lines
Pierre Muller wrote: > This is just to inform people that > GDB 5.1 was released. > ........................ > > * Support for debugging Pascal programs. > - unlike Pascal, GDB is case-sensitive for symbol names. Do you plan to do something for that ? I use gdb nearly only through Rhide. We can ask to Robert to capitalize identifiers in the gpc or fpc style (somebody already asked him). It will be necessary to take somehow into account the nature (C or Pascal) of the module in which these identifiers are defined (gpc can call C routines). It is useless for him to do that in the rhide interface if GDB already does.

I haven't looked in details what Robert has done, but as far as I saw he has included a better support of GDB-5.1 in current CVS version of RHIDE in comparission with one I used in 1.4.9.1. Anyway my build of rhide-1.4.9.1 is built using GDB-5.1. I don't know about support of debugging Pascal programs. It's possible one still has to enter identifiers in upercase. I haven't tested that

Andris

Show quoted text 16 lines
> Don't forget that if you are in pascal language, pascal syntax must be > used: > > so to change the value of a variable 'x' in the program, > you will need to use > (gdb) set x := 5 > instead of > (gdb) set x = 5 > for older GDB version. Much more natural for Pascal programmers, but for rhide it means a change in the interface depending on a language setting (may be an option to check somewhere). Maurice

Reply by email

Maurice Lombardi
to Andris Pavenis
Andris Pavenis wrote 28 lines
On Saturday 15 December 2001 12:47, Maurice Lombardi wrote: >Pierre Muller wrote: > >> This is just to inform people that >>GDB 5.1 was released. >>........................ >> >>* Support for debugging Pascal programs. >> - unlike Pascal, GDB is case-sensitive for symbol names. >> >Do you plan to do something for that ? > >I use gdb nearly only through Rhide. >We can ask to Robert to capitalize identifiers in the gpc or fpc >style (somebody already asked him). It will be necessary to >take somehow into account the nature (C or Pascal) of the module in which >these identifiers are defined (gpc can call C routines). >It is useless for him to do that in the rhide interface if GDB already >does. > I haven't looked in details what Robert has done, but as far as I saw he has included a better support of GDB-5.1 in current CVS version of RHIDE in comparission with one I used in 1.4.9.1. Anyway my build of rhide-1.4.9.1 is built using GDB-5.1. I don't know about support of debugging Pascal programs. It's possible one still has to enter identifiers in upercase. I haven't tested that

I have downloaded 1.4.9.1 and built GDB-5.1 (GNU version) for djgpp to compare.

There is no capitalization in GDB-5.1
in 1.4.9.1 (and was the same in 1.4.9), there seems to be some experimentation. No capitalization at all for Ctrl-F4 (Evaluate/Modify) As expected Change do not work: the GDB windows shows the command set variable N=3

   (instead of set variable:=3 for pascal).

FPC capitalisation for Ctrl-F7 (Watch), i.e. ALL UPPERCASE for gpc in should be Only First Letter Uppercase.
It is possible to select one or other depending whether

Option/Environment/preference/Use FPC Compiler

is checked or not.

Otherwise the syntax seems to be much more natural for a Pascal programmer. So I am very interested to see the progresses in this work.

Maurice

Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 63 54 95

Reply by email

Robert H�hne
to Andris Pavenis: I haven't looked in details what Robert has done, but as far as I saw he has included a…
Andris Pavenis wrote 18 lines
On Saturday 15 December 2001 12:47, Maurice Lombardi wrote: > Pierre Muller wrote: > > This is just to inform people that > > GDB 5.1 was released. > > ........................ > > > > * Support for debugging Pascal programs. > > - unlike Pascal, GDB is case-sensitive for symbol names. > > Do you plan to do something for that ? > > I use gdb nearly only through Rhide. > We can ask to Robert to capitalize identifiers in the gpc or fpc > style (somebody already asked him). It will be necessary to > take somehow into account the nature (C or Pascal) of the module in which > these identifiers are defined (gpc can call C routines). > It is useless for him to do that in the rhide interface if GDB already > does.

I have tried it with RHIDE and gdb 5.1 linked to it, and it knows about the pascal variables and you can youe the variable names like in your program. With this, the hack to preconvert the names before passing them to gdb is not needed.

I haven't looked in details what Robert has done, but as far as I saw he has included a better support of GDB-5.1 in current CVS version of RHIDE in comparission with one I used in 1.4.9.1. Anyway my build of rhide-1.4.9.1

My "better" support is simply, that I took your changes and made them so, that RHIDE will now work with both gdb versions (5.0 and 5.1). But with this there might be some other problems derived, which I'm currently analyzing before a new release.

Show quoted text 14 lines
> > > Don't forget that if you are in pascal language, pascal syntax must be > > used: > > > > so to change the value of a variable 'x' in the program, > > you will need to use > > (gdb) set x := 5 > > instead of > > (gdb) set x = 5 > > for older GDB version. > > Much more natural for Pascal programmers, but for rhide it means a change > in the interface depending on a language setting (may be an option to check > somewhere).

Thanks for that important hint.

Robert

******************************************************
* email: Robert Hoehne *
* Post: Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW: http://www.rhide.com * ******************************************************

Reply by email

Pierre Muller
to Maurice Lombardi: I have downloaded 1.4.9.1 and built GDB-5.1 (GNU version) for djgpp to compare. There is…
Maurice Lombardi wrote 33 lines
Andris Pavenis wrote: >On Saturday 15 December 2001 12:47, Maurice Lombardi wrote: > >>Pierre Muller wrote: >> >>> This is just to inform people that >>>GDB 5.1 was released. >>>........................ >>> >>>* Support for debugging Pascal programs. >>> - unlike Pascal, GDB is case-sensitive for symbol names. >>Do you plan to do something for that ? >> >>I use gdb nearly only through Rhide. >>We can ask to Robert to capitalize identifiers in the gpc or fpc >>style (somebody already asked him). It will be necessary to >>take somehow into account the nature (C or Pascal) of the module in which >>these identifiers are defined (gpc can call C routines). >>It is useless for him to do that in the rhide interface if GDB already >>does. >I haven't looked in details what Robert has done, but as far as I saw he >has included a better support of GDB-5.1 in current CVS version of RHIDE >in comparission with one I used in 1.4.9.1. Anyway my build of rhide-1.4.9.1 >is built using GDB-5.1. I don't know about support of debugging Pascal >programs. It's possible one still has to enter identifiers in upercase. I haven't tested that I have downloaded 1.4.9.1 and built GDB-5.1 (GNU version) for djgpp to compare. There is no capitalization in GDB-5.1 in 1.4.9.1 (and was the same in 1.4.9), there seems to be some experimentation. No capitalization at all for Ctrl-F4 (Evaluate/Modify)

Capitalization should only be a problem for records, for normal variables, the search goes the following way: if I type
(gdb) print TestVariable
inside gdb when current language is pascal.
1) Search for a global (or static) symbol 'TestVariable' as typed.
2) Search for the all capitalized version 'TESTVARIABLE'.
3) Search for the GPC version 'Testvariable'.
And finally, restore the as typed version if none of the three is found.

The problem is that for fields of a record, the type of the record just parsed is not remembered, so that the field isn't found...
But for normal variables all should work fine.

Show quoted text 9 lines
As expected Change do not work: the GDB windows shows the command set variable N=3 (instead of set variable:=3 for pascal). FPC capitalisation for Ctrl-F7 (Watch), i.e. ALL UPPERCASE for gpc in should be Only First Letter Uppercase. It is possible to select one or other depending whether Option/Environment/preference/Use FPC Compiler is checked or not.

That should be possible easily indeed...
The best solution would be to use the language dependent operators that are part of the language definition.

The biggest problem is that I didn't compile RHIDE for more than two years, so it might take some time until I can get back into it.

Otherwise the syntax seems to be much more natural for a Pascal programmer. So I am very interested to see the progresses in this work.

Which sources should I get? Apparently there are now two versions on the net...

Reply by email

Maurice Lombardi
to Pierre Muller
Pierre Muller wrote 17 lines
At 21:29 15/12/2001 , Maurice Lombardi a écrit: >No capitalization at all for Ctrl-F4 (Evaluate/Modify) Capitalization should only be a problem for records, for normal variables, the search goes the following way: if I type (gdb) print TestVariable inside gdb when current language is pascal. 1) Search for a global (or static) symbol 'TestVariable' as typed. 2) Search for the all capitalized version 'TESTVARIABLE'. 3) Search for the GPC version 'Testvariable'. And finally, restore the as typed version if none of the three is found. The problem is that for fields of a record, the type of the record just parsed is not remembered, so that the field isn't found... But for normal variables all should work fine.

Very fine, it solves the problem that in a gpc pascal file one can refer to

C variables, case sensitive, through "AsmName"
But this is a more recent version than those I use, both in GDB-5.1 and in Rhide 1.4.9.1

Which sources should I get? Apparently there are now two versions on the net...

Of what ? Rhide ? Ask to Robert. You can access his CVS tree, but avoid duplicate efforts !

Maurice

Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 63 54 95

Reply by email