[fpc-devel] Why debugger does not "step in"?

2018-03-23 Thread Gennady Agranov

Hi,

I use FPC 3.0.4 / Lazarus 1.8.2

I am seeing the same behavior when I debug the program using Lazarus IDE 
under Win64 and Linux64


When I want to "step in" into my own function/procedure - GDB simply 
steps over...


If I set a breakpoint inside the function/procedure I want to "step in" 
and "run" - it would stop at this breakpoint.


I have all debug options enabled...

It is hard to debug if you can't "step in".

Do I miss some settings?

Thanks,

Gennady






___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Michael Van Canneyt



On Fri, 23 Mar 2018, Pierre Muller wrote:




Le 23/03/2018 à 23:12, Michael Van Canneyt a écrit :



On Fri, 23 Mar 2018, Sven Barth via fpc-devel wrote:


R0b0t1  schrieb am Fr., 23. März 2018, 16:07:



IMHO preferably not the unit names (as in 'unit XxX') - with case
sensitive file names on Unix, this change might increase time for
searching the respective file (somewhat). Obviously, all further
references of the unit (as in 'SysUtils.Execute') should be fine.



I don't understand how it would increase the search time. I believe
what happens is all names are converted to lowercase for the search,
as in the strings taken from the user or their files and the names
taken from the disk are both converted to lower case before
comparisons are made.



FPC first looks for the unit with the name as is, then lower case and
finally upper case.


Yes, but this is done in memory in the directory cache.


But isn't the problem more that if you have a SysUtils.pp unit
and a sysutils.pp both in your unit search path,
on a case sensitive partition, it might now find SysUtils.pp before sysutils.pp
and end up with some total different source?


No, since the names of the files are not changed, and the names of the units
in the uses clauses are not changed, and those are the ones that matter when
searching, not the ones in the unit xyz; statement.

And if you have this situation on your hard disk, you deserve to be publicly
flogged, covered in tar and feathers, and banished from your village forever.

Michael.___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Pierre Muller


Le 23/03/2018 à 23:12, Michael Van Canneyt a écrit :
> 
> 
> On Fri, 23 Mar 2018, Sven Barth via fpc-devel wrote:
> 
>> R0b0t1  schrieb am Fr., 23. März 2018, 16:07:
>>

 IMHO preferably not the unit names (as in 'unit XxX') - with case
 sensitive file names on Unix, this change might increase time for
 searching the respective file (somewhat). Obviously, all further
 references of the unit (as in 'SysUtils.Execute') should be fine.

>>>
>>> I don't understand how it would increase the search time. I believe
>>> what happens is all names are converted to lowercase for the search,
>>> as in the strings taken from the user or their files and the names
>>> taken from the disk are both converted to lower case before
>>> comparisons are made.
>>>
>>
>> FPC first looks for the unit with the name as is, then lower case and
>> finally upper case.
> 
> Yes, but this is done in memory in the directory cache.

But isn't the problem more that if you have a SysUtils.pp unit
and a sysutils.pp both in your unit search path,
on a case sensitive partition, it might now find SysUtils.pp before sysutils.pp
and end up with some total different source?


Pierre Muller

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Michael Van Canneyt



On Fri, 23 Mar 2018, Sven Barth via fpc-devel wrote:


R0b0t1  schrieb am Fr., 23. März 2018, 16:07:



IMHO preferably not the unit names (as in 'unit XxX') - with case
sensitive file names on Unix, this change might increase time for
searching the respective file (somewhat). Obviously, all further
references of the unit (as in 'SysUtils.Execute') should be fine.



I don't understand how it would increase the search time. I believe
what happens is all names are converted to lowercase for the search,
as in the strings taken from the user or their files and the names
taken from the disk are both converted to lower case before
comparisons are made.



FPC first looks for the unit with the name as is, then lower case and
finally upper case.


Yes, but this is done in memory in the directory cache.

I tested make all, there is no discernable difference in time, so I applied
the patch from Ondrej.

Michael.___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Sven Barth via fpc-devel
R0b0t1  schrieb am Fr., 23. März 2018, 16:07:

> >
> > IMHO preferably not the unit names (as in 'unit XxX') - with case
> > sensitive file names on Unix, this change might increase time for
> > searching the respective file (somewhat). Obviously, all further
> > references of the unit (as in 'SysUtils.Execute') should be fine.
> >
>
> I don't understand how it would increase the search time. I believe
> what happens is all names are converted to lowercase for the search,
> as in the strings taken from the user or their files and the names
> taken from the disk are both converted to lower case before
> comparisons are made.
>

FPC first looks for the unit with the name as is, then lower case and
finally upper case.

Regards,
Sven

>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread Michael Van Canneyt



On Thu, 22 Mar 2018, R0b0t1 wrote:


On Thu, Mar 22, 2018 at 10:18 AM, Juha Manninen
 wrote:

On Thu, Mar 22, 2018 at 3:15 PM, Denis Kozlov  wrote:

Please do... It has caused enough eye (OCD) stress over the years ;)


+1
Yes, it has bothered also me a lot. I use code completion to get the
unit names correctly. Most of them are CamelCase but some are
lowercase. The result looks sloppy. Maybe it is OCD, don't know. It
bothers me anyway.



I agree it looks sloppy. Something else that has bothered me, but a
lot less, is the conflicting naming standards.

E.g. Contnrs "should" really be Containers, more like Delphi;


It's called contnrs in delphi as well. 
You're probably confusing the classes based one with the generic based one.


Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread R0b0t1
On Thu, Mar 22, 2018 at 10:18 AM, Juha Manninen
 wrote:
> On Thu, Mar 22, 2018 at 3:15 PM, Denis Kozlov  wrote:
>> Please do... It has caused enough eye (OCD) stress over the years ;)
>
> +1
> Yes, it has bothered also me a lot. I use code completion to get the
> unit names correctly. Most of them are CamelCase but some are
> lowercase. The result looks sloppy. Maybe it is OCD, don't know. It
> bothers me anyway.
>

I agree it looks sloppy. Something else that has bothered me, but a
lot less, is the conflicting naming standards.

E.g. Contnrs "should" really be Containers, more like Delphi; the
former is more of a C style that you find when everything is lower
case and abbreviated, which is not really the style I see most Object
Pascal programmers adopt.

I apologize for the unwarranted opinion, but it had been bothering me
for a while.

Cheers,
 R0b0t1
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-23 Thread R0b0t1
On Thu, Mar 22, 2018 at 6:42 AM, Michael Van Canneyt
 wrote:
>
>
> On Thu, 22 Mar 2018, Ondrej Pokorny wrote:
>
>> Hello,
>>
>> will a patch be applied that fixes CamelCase in unit and method names and
>> other identifiers?
>>
>> Example:
>>
>> dateutils -> DateUtils
>> sysutils -> SysUtils
>> typinfo -> TypInfo
>> contnrs -> Contnrs
>> strutils -> StrUtils
>> EnterCriticalsection -> EnterCriticalSection
>> DoneCriticalsection -> DoneCriticalSection
>> LeaveCriticalsection -> LeaveCriticalSection
>> TryEnterCriticalsection -> TryEnterCriticalSection
>> (Funnily enough InitCriticalSection is correct.)
>>
>> TPoint.x -> TPoint.X
>> TPoint.y -> TPoint.Y
>>
>> (For unit names: of course only the unit definition name will be changed,
>> not the file name).
>
>
> At first sight I don't see any disadvantages from this, so yes, I would
> apply such a patch.
>
> Code completion will benefit from it, I suppose.
>

I asked about this a while ago; please apply the patches if any are made.


On Thu, Mar 22, 2018 at 7:44 AM, Tomas Hajny  wrote:
> On Thu, March 22, 2018 12:42, Michael Van Canneyt wrote:
>> On Thu, 22 Mar 2018, Ondrej Pokorny wrote:
>
>
> Hi,
>
>>> will a patch be applied that fixes CamelCase in unit and method names
>>> and other identifiers?
>>>
>>> Example:
>>>
>>> dateutils -> DateUtils
>>> sysutils -> SysUtils
>>> typinfo -> TypInfo
>>> contnrs -> Contnrs
>>> strutils -> StrUtils
>  .
>  .
>>> (For unit names: of course only the unit definition name will be
>>> changed, not the file name).
>>
>> At first sight I don't see any disadvantages from this, so yes, I would
>> apply such a patch.
>
> IMHO preferably not the unit names (as in 'unit XxX') - with case
> sensitive file names on Unix, this change might increase time for
> searching the respective file (somewhat). Obviously, all further
> references of the unit (as in 'SysUtils.Execute') should be fine.
>

I don't understand how it would increase the search time. I believe
what happens is all names are converted to lowercase for the search,
as in the strings taken from the user or their files and the names
taken from the disk are both converted to lower case before
comparisons are made.

This is why some of the unit names are entirely lower case - they were
at some point stored internally as entirely lower case, and no one
fixed them (because you have to do it each time you interact with
certain IDE GUIs). There may have been some versions of Lazarus that
would not allow you to save mixed case file names, or at least made it
very hard to do so.

I suspect some of the mixed case file names that are not capitalized
properly are due to the lack of case sensitivity and code completion.
I found some Microsoft projects which misspelled something the same
way in each of 4-5 places, probably because the name was typed once
and then never fully typed again.


Following from the above, very interesting patches would be ones that
do not automatically lower case file names in Lazarus.

Cheers,
 R0b0t1
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel