Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A person with one watch knows what time it is; a person with two watches is never sure. Proverb


devel / comp.lang.ada / Re: Is this my failure or of the compiler's debugger

SubjectAuthor
* Re: Is this my failure or of the compiler's debuggerNiklas Holsti
`* Re: Is this my failure or of the compiler's debuggerldries46
 +- Re: Is this my failure or of the compiler's debuggerldries46
 `* Re: Is this my failure or of the compiler's debuggerNiklas Holsti
  `- Re: Is this my failure or of the compiler's debuggerldries46

1
Re: Is this my failure or of the compiler's debugger

<k25o3nFevkrU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9191&group=comp.lang.ada#9191

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Is this my failure or of the compiler's debugger
Date: Tue, 10 Jan 2023 20:12:07 +0200
Organization: Tidorum Ltd
Lines: 38
Message-ID: <k25o3nFevkrU1@mid.individual.net>
References: <nnd$70b29fcd$4811e339@5bc1ef990a7003a8>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 0QZ5GqeV5GS5kuMiqZwFuQXhGyZTMBXvKmaLENUU4+LR04jvCC
Cancel-Lock: sha1:r6ppbM+U7DoMr+6N8xQSeN1Udwc=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Content-Language: en-US
In-Reply-To: <nnd$70b29fcd$4811e339@5bc1ef990a7003a8>
 by: Niklas Holsti - Tue, 10 Jan 2023 18:12 UTC

On 2023-01-10 15:16, ldries46 wrote:
> I try to create a program that read Unbounded strings from a file in the
> loop:
>       Open(C_File, In_File, To_String(Inp_File));
>       while not End_of_File(C_File) loop
>          str_line_n := To_Unbounded_String(Get_Line(C_File));
>          Buffer_GL.Set_Buffer(str_line_n); -- breakpoint on this line
>          glade_lines := glade_lines + 1;
>       end loop;
>       Close(C_File);
> where str_line_n is of the type Unbounded_String.
> I used a test file with the below presented three text lines:
> Line 1 abcdef9876543210
> Line 2 " abcdef"9876543210
> Line 3 "abc"de"f"9876543210
>
> In the debugger the results were:
> "Line 1 abcdef 9876543210"
> "Line 2 "" abcdef"" 98765432"
> "Line 3 ""abc""de ""f""987654"

It seems that the debugger displays the strings in the form of Ada
string literals, which are enclosed in quotes (") and within which each
quote character has to be duplicated (to show that it is not the
terminating quote). So the duplication of the quotes is nothing to worry
about. If you were to print out the strings (with Ada.Text_IO) they
should appear just as in the input, with only the original quote characters.

However, your example also shows some extra blank spaces in the debugger
output, for example:

Input : Line 1 abcdef9876543210
Debugger: "Line 1 abcdef 9876543210"

There seems to be a new blank space between 'f' and '9'. Are you sure
that you presented the input and output correctly?

Re: Is this my failure or of the compiler's debugger

<nnd$75982fc8$3d64f38c@635cdfb43e75a9fd>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9192&group=comp.lang.ada#9192

  copy link   Newsgroups: comp.lang.ada
Date: Tue, 10 Jan 2023 23:17:31 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Subject: Re: Is this my failure or of the compiler's debugger
Newsgroups: comp.lang.ada
References: <nnd$70b29fcd$4811e339@5bc1ef990a7003a8>
<k25o3nFevkrU1@mid.individual.net>
Content-Language: en-GB
From: bertus.dries@planet.nl (ldries46)
In-Reply-To: <k25o3nFevkrU1@mid.individual.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <nnd$75982fc8$3d64f38c@635cdfb43e75a9fd>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 42
Injection-Date: Tue, 10 Jan 2023 23:17:31 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: ldries46 - Tue, 10 Jan 2023 22:17 UTC

Op 10-1-2023 om 19:12 schreef Niklas Holsti:
> On 2023-01-10 15:16, ldries46 wrote:
>> I try to create a program that read Unbounded strings from a file in
>> the loop:
>>        Open(C_File, In_File, To_String(Inp_File));
>>        while not End_of_File(C_File) loop
>>           str_line_n := To_Unbounded_String(Get_Line(C_File));
>>           Buffer_GL.Set_Buffer(str_line_n); -- breakpoint on this line
>>           glade_lines := glade_lines + 1;
>>        end loop;
>>        Close(C_File);
>> where str_line_n is of the type Unbounded_String.
>> I used a test file with the below presented three text lines:
>> Line 1 abcdef9876543210
>> Line 2 " abcdef"9876543210
>> Line 3 "abc"de"f"9876543210
>>
>> In the debugger the results were:
>> "Line 1 abcdef 9876543210"
>> "Line 2 "" abcdef"" 98765432"
>> "Line 3 ""abc""de ""f""987654"
>
>
> It seems that the debugger displays the strings in the form of Ada
> string literals, which are enclosed in quotes (") and within which
> each quote character has to be duplicated (to show that it is not the
> terminating quote). So the duplication of the quotes is nothing to
> worry about. If you were to print out the strings (with Ada.Text_IO)
> they should appear just as in the input, with only the original quote
> characters.
>
> However, your example also shows some extra blank spaces in the
> debugger output, for example:
>
> Input   : Line 1 abcdef9876543210
> Debugger: "Line 1 abcdef 9876543210"
>
>
>
Not only that but also some of the  last characters disappear in line 2
the 10 and in line 3 3210

Re: Is this my failure or of the compiler's debugger

<nnd$16e93dba$481fc0b0@029145cc3d917415>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9194&group=comp.lang.ada#9194

  copy link   Newsgroups: comp.lang.ada
Date: Wed, 11 Jan 2023 08:40:42 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1
Subject: Re: Is this my failure or of the compiler's debugger
Newsgroups: comp.lang.ada
References: <nnd$70b29fcd$4811e339@5bc1ef990a7003a8> <k25o3nFevkrU1@mid.individual.net> <nnd$75982fc8$3d64f38c@635cdfb43e75a9fd>
Content-Language: en-GB
From: bertus.dries@planet.nl (ldries46)
In-Reply-To: <nnd$75982fc8$3d64f38c@635cdfb43e75a9fd>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <nnd$16e93dba$481fc0b0@029145cc3d917415>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder.usenetexpress.com!tr1.eu1.usenetexpress.com!94.232.112.246.MISMATCH!feed.abavia.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 47
Injection-Date: Wed, 11 Jan 2023 08:40:42 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: ldries46 - Wed, 11 Jan 2023 07:40 UTC

Op 10-1-2023 om 23:17 schreef ldries46:
> Op 10-1-2023 om 19:12 schreef Niklas Holsti:
>> On 2023-01-10 15:16, ldries46 wrote:
>>> I try to create a program that read Unbounded strings from a file in
>>> the loop:
>>>        Open(C_File, In_File, To_String(Inp_File));
>>>        while not End_of_File(C_File) loop
>>>           str_line_n := To_Unbounded_String(Get_Line(C_File));
>>>           Buffer_GL.Set_Buffer(str_line_n); -- breakpoint on this line
>>>           glade_lines := glade_lines + 1;
>>>        end loop;
>>>        Close(C_File);
>>> where str_line_n is of the type Unbounded_String.
>>> I used a test file with the below presented three text lines:
>>> Line 1 abcdef9876543210
>>> Line 2 " abcdef"9876543210
>>> Line 3 "abc"de"f"9876543210
>>>
>>> In the debugger the results were:
>>> "Line 1 abcdef 9876543210"
>>> "Line 2 "" abcdef"" 98765432"
>>> "Line 3 ""abc""de ""f""987654"
>>
>>
>> It seems that the debugger displays the strings in the form of Ada
>> string literals, which are enclosed in quotes (") and within which
>> each quote character has to be duplicated (to show that it is not the
>> terminating quote). So the duplication of the quotes is nothing to
>> worry about. If you were to print out the strings (with Ada.Text_IO)
>> they should appear just as in the input, with only the original quote
>> characters.
>>
>> However, your example also shows some extra blank spaces in the
>> debugger output, for example:
>>
>> Input   : Line 1 abcdef9876543210
>> Debugger: "Line 1 abcdef 9876543210"
>>
>>
>>
> Not only that but also some of the  last characters disappear in line
> 2 the 10 and in line 3 3210
In the mean time by inserting a write command to a Gtk window I found
that the problem is really a problem of the debugger. The values in the
Gtk window are correct. this means that in a next version of the
debugger that must be corrected

Re: Is this my failure or of the compiler's debugger

<k27so8Fp6k8U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9196&group=comp.lang.ada#9196

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Is this my failure or of the compiler's debugger
Date: Wed, 11 Jan 2023 15:43:36 +0200
Organization: Tidorum Ltd
Lines: 58
Message-ID: <k27so8Fp6k8U1@mid.individual.net>
References: <nnd$70b29fcd$4811e339@5bc1ef990a7003a8>
<k25o3nFevkrU1@mid.individual.net> <nnd$75982fc8$3d64f38c@635cdfb43e75a9fd>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net I3V9VfC7Te8e+dm72zeOuwsn+Hzi1XWZblf9FWIbsWHl6PpP7z
Cancel-Lock: sha1:ZDJ19dxiI16Vi4+scL+4+s54rWA=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Content-Language: en-US
In-Reply-To: <nnd$75982fc8$3d64f38c@635cdfb43e75a9fd>
 by: Niklas Holsti - Wed, 11 Jan 2023 13:43 UTC

On 2023-01-11 0:17, ldries46 wrote:
> Op 10-1-2023 om 19:12 schreef Niklas Holsti:
>> On 2023-01-10 15:16, ldries46 wrote:
>>> I try to create a program that read Unbounded strings from a file in
>>> the loop:
>>>        Open(C_File, In_File, To_String(Inp_File));
>>>        while not End_of_File(C_File) loop
>>>           str_line_n := To_Unbounded_String(Get_Line(C_File));
>>>           Buffer_GL.Set_Buffer(str_line_n); -- breakpoint on this line
>>>           glade_lines := glade_lines + 1;
>>>        end loop;
>>>        Close(C_File);
>>> where str_line_n is of the type Unbounded_String.
>>> I used a test file with the below presented three text lines:
>>> Line 1 abcdef9876543210
>>> Line 2 " abcdef"9876543210
>>> Line 3 "abc"de"f"9876543210
>>>
>>> In the debugger the results were:
>>> "Line 1 abcdef 9876543210"
>>> "Line 2 "" abcdef"" 98765432"
>>> "Line 3 ""abc""de ""f""987654"
>>
>>
>> It seems that the debugger displays the strings in the form of Ada
>> string literals, which are enclosed in quotes (") and within which
>> each quote character has to be duplicated (to show that it is not the
>> terminating quote). So the duplication of the quotes is nothing to
>> worry about. If you were to print out the strings (with Ada.Text_IO)
>> they should appear just as in the input, with only the original quote
>> characters.
>>
>> However, your example also shows some extra blank spaces in the
>> debugger output, for example:
>>
>> Input   : Line 1 abcdef9876543210
>> Debugger: "Line 1 abcdef 9876543210"
>>
>>
>>
> Not only that but also some of the  last characters disappear in line 2
> the 10 and in line 3 3210

My guess is that these differences are bugs in the debugger's display of
strings with embedded quote characters. For Line 1, which has no
embedded quotes, the full string is displayed (though with an inserted
blank). For Line 2, with two embedded quotes, two of the last characters
are not displayed. For Line 3, with four embedded quotes, four of the
last characters are not displayed. It seems that the debugger does not
realize that doubling the quote characters makes the displayed string
longer...

Try to print the strings with Ada.Text_IO instead, that should give the
right result. In other words, your code reading the strings works, but
the debugger is probably buggy. (One reason why I avoid debuggers
whenever I can.)

Re: Is this my failure or of the compiler's debugger

<nnd$3541e185$73d934ca@76782156cee9e472>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9198&group=comp.lang.ada#9198

  copy link   Newsgroups: comp.lang.ada
Date: Wed, 11 Jan 2023 17:52:54 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1
Subject: Re: Is this my failure or of the compiler's debugger
Newsgroups: comp.lang.ada
References: <nnd$70b29fcd$4811e339@5bc1ef990a7003a8> <k25o3nFevkrU1@mid.individual.net> <nnd$75982fc8$3d64f38c@635cdfb43e75a9fd> <k27so8Fp6k8U1@mid.individual.net>
Content-Language: en-GB
From: bertus.dries@planet.nl (ldries46)
In-Reply-To: <k27so8Fp6k8U1@mid.individual.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <nnd$3541e185$73d934ca@76782156cee9e472>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!94.232.112.244.MISMATCH!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 65
Injection-Date: Wed, 11 Jan 2023 17:52:54 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: ldries46 - Wed, 11 Jan 2023 16:52 UTC

Op 11-1-2023 om 14:43 schreef Niklas Holsti:
> On 2023-01-11 0:17, ldries46 wrote:
>> Op 10-1-2023 om 19:12 schreef Niklas Holsti:
>>> On 2023-01-10 15:16, ldries46 wrote:
>>>> I try to create a program that read Unbounded strings from a file
>>>> in the loop:
>>>>        Open(C_File, In_File, To_String(Inp_File));
>>>>        while not End_of_File(C_File) loop
>>>>           str_line_n := To_Unbounded_String(Get_Line(C_File));
>>>>           Buffer_GL.Set_Buffer(str_line_n); -- breakpoint on this line
>>>>           glade_lines := glade_lines + 1;
>>>>        end loop;
>>>>        Close(C_File);
>>>> where str_line_n is of the type Unbounded_String.
>>>> I used a test file with the below presented three text lines:
>>>> Line 1 abcdef9876543210
>>>> Line 2 " abcdef"9876543210
>>>> Line 3 "abc"de"f"9876543210
>>>>
>>>> In the debugger the results were:
>>>> "Line 1 abcdef 9876543210"
>>>> "Line 2 "" abcdef"" 98765432"
>>>> "Line 3 ""abc""de ""f""987654"
>>>
>>>
>>> It seems that the debugger displays the strings in the form of Ada
>>> string literals, which are enclosed in quotes (") and within which
>>> each quote character has to be duplicated (to show that it is not
>>> the terminating quote). So the duplication of the quotes is nothing
>>> to worry about. If you were to print out the strings (with
>>> Ada.Text_IO) they should appear just as in the input, with only the
>>> original quote characters.
>>>
>>> However, your example also shows some extra blank spaces in the
>>> debugger output, for example:
>>>
>>> Input   : Line 1 abcdef9876543210
>>> Debugger: "Line 1 abcdef 9876543210"
>>>
>>>
>>>
>> Not only that but also some of the  last characters disappear in line
>> 2 the 10 and in line 3 3210
>
>
> My guess is that these differences are bugs in the debugger's display
> of strings with embedded quote characters. For Line 1, which has no
> embedded quotes, the full string is displayed (though with an inserted
> blank). For Line 2, with two embedded quotes, two of the last
> characters are not displayed. For Line 3, with four embedded quotes,
> four of the last characters are not displayed. It seems that the
> debugger does not realize that doubling the quote characters makes the
> displayed string longer...
>
> Try to print the strings with Ada.Text_IO instead, that should give
> the right result. In other words, your code reading the strings works,
> but the debugger is probably buggy. (One reason why I avoid debuggers
> whenever I can.)
>
That is also my guess but I like to use the debugger because You stop
running the program anywhere you want and check all parameters you think
are nice to know. Now you have to add a lot of code and still see that
you need tyo know another parameter and run the program over and over
again each time with other code added.


devel / comp.lang.ada / Re: Is this my failure or of the compiler's debugger

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor