Sign in Join

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

Mailing lists / lazarus / 2015-02

whach list and hint in source is wrong display value

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

FreeMan

osx fpc & lazarus svn QT x64
my project's Compiler options has
-FcUTF8
-dEnableUTF8

*-) I added string variable to watch list. Value show like this, I copied from there,
^char($000000010E3C1358) '/opt/proje_laz/projeler/apps/project_darwin.app'

*-) hint of string variable's value view is (while debuging, when mouse on to variable )
^char($000000010E3C1358)
'/opt/proje_laz/projeler/apps/project_darwin.app' = 47 '/'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150219/0c9b0848/attachment.html>

Reply by email

Martin Frb
to FreeMan

Please report a bug on mantis.

Please include:
- the expected string
- a sample project (lpi, pas and other files) which has all the settings (compiler options) done.
- a logfile
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

FreeMan wrote 21 lines
osx fpc & lazarus svn QT x64 my project's Compiler options has -FcUTF8 -dEnableUTF8 *-) I added string variable to watch list. Value show like this, I copied from there, ^char($000000010E3C1358) '/opt/proje_laz/projeler/apps/project_darwin.app' *-) hint of string variable's value view is (while debuging, when mouse on to variable ) ^char($000000010E3C1358) '/opt/proje_laz/projeler/apps/project_darwin.app' = 47 '/' -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150219/c4015b35/attachment.html>

Reply by email

FreeMan
to Martin Frb

I found problem. not string show problem. My string variable get value from My defined function, I didn't notice that, this my mistake, sorry for this.
Problem is:
..
Result := fpReadLink(AFilename);
..
/freepascal/3.1.1/rtl/unix/bunxovlh.inc
Function fpReadLink(const Name: RawByteString): RawByteString;

result is string. I tested it like this too "StrVariable := fpReadLink(AFilename); "
added to result "^char($000000010E3C1358)" this strings, number change.

type
   RawByteString=  type  AnsiString(CP_NONE);

How to do? I'm confused little bit.

Martin Frb wrote 19 lines
Please report a bug on mantis. Please include: - the expected string - a sample project (lpi, pas and other files) which has all the settings (compiler options) done. - a logfile http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session On 19/02/2015 08:10, FreeMan wrote: > osx fpc & lazarus svn QT x64 > my project's Compiler options has > -FcUTF8 > -dEnableUTF8 > > *-) I added string variable to watch list. Value show like this, I > copied from there, > ^char($000000010E3C1358) > '/opt/proje_laz/projeler/apps/project_darwin.app'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150219/304a8313/attachment.html>

Reply by email

Martin Frb
to FreeMan
FreeMan wrote 17 lines
I found problem. not string show problem. My string variable get value from My defined function, I didn't notice that, this my mistake, sorry for this. Problem is: .. Result := fpReadLink(AFilename); .. /freepascal/3.1.1/rtl/unix/bunxovlh.inc Function fpReadLink(const Name: RawByteString): RawByteString; result is string. I tested it like this too "StrVariable := fpReadLink(AFilename); " added to result "^char($000000010E3C1358)" this strings, number change. type RawByteString= type AnsiString(CP_NONE); How to do? I'm confused little bit.

The debugger has no support for the codepage. It displays all strings, as if they where utf8. If your string has another encoding then this will not work.

There is no roadmap on this yet. Also due te restrictions in the debug info this may not be possible in the gdb based debugger. It is currently not possible for the debugger to tell the difference between pchar and ansistring (the debug info created by fpc in stabs and drarf2 is the same). This means the debugger can not do anything for strings, because if it was a pchar things would go terribly wrong.

This changes with dwarf3 (though not if gdb is in play / besides gdb crashes on dwarf3).

So a fix for this will likely only be in fpdebug. However fpdebug needs a lot of other fixes. So this will not be soon.

Maybe it will be possible to add an option to the watch properties (but the hint is not fixable) / Yet again matter of time available. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150219/1d04686a/attachment.html>

Reply by email