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) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
Pierre Muller wrote:
- Pascal type hexadecimal constants are not supported because they conflict with the internal variables format;
I suppose this is referring to the BP syntax ($ab). How about the EP syntax (16#ab -- also for any other base between 2 and 36)?
If BP syntax can't be supported, EP syntax might be a possibility even for programmers used to BP (besides offering more flexibility).
Frank
At 10:14 22/11/2001 , Frank Heckenbach a écrit:
Pierre Muller wrote:
- Pascal type hexadecimal constants are not supported because they conflict with the internal variables format;
I suppose this is referring to the BP syntax ($ab). How about the EP syntax (16#ab -- also for any other base between 2 and 36)?
If BP syntax can't be supported, EP syntax might be a possibility even for programmers used to BP (besides offering more flexibility).
Yes, it could be added.
you could take a look into p-exp.y.
We probably would need to convert the value into a decimal value inside p-exp.y itself.
Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
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.
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
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
Andris
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
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) 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
At 21:29 15/12/2001 , Maurice Lombardi a écrit:
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.
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...
Pierre Muller wrote:
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.
- Search for a global (or static) symbol 'TestVariable' as typed.
- Search for the all capitalized version 'TESTVARIABLE'.
- 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
At 16:17 15.12.01 +0200, 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 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.
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 robert.hoehne@gmx.net * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.rhide.com * ******************************************************