Hello,
How to disable this window?:
Thank you!

Mailing lists / lazarus / 2013-05
47 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
How to disable this window?:
Thank you!
There is no global disable. That is no way to prevent it from being displayed.
The thing is, it shouldn't be there in first. It only shows, if the source can not be found.
So the question is why it does show here.
What actions did you do before?
2013/5/6 Martin
I'm trying to debug this project:
Lazarus and Free Pascal installed from GIT via this script:
2013/5/6 silvioprog
... and on Windows I debug this project fine.
On MAC gdb is a bit older. But it should work.
Are you on a 64 or 32 bit mac?
Does the stack show the function you are in?
What you do? Hit a breakpoint, single step, had an exception?
And: please get a log:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/5627117b/attachment-0001.html>
oh ups it isnt mac.
Linux: What version of GDB.
gdb is in English? if not start lazarus with LANG=C and export LANG
Rest as below.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/68ce3fc6/attachment.html>
2013/5/6 Martin
[...]
oh ups it isnt mac.
hehehe... :)
Linux: What version of GDB.
silvioprog at silvioprog-vm ~ $ gdb --version
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
gdb is in English? if not start lazarus with LANG=C and export LANG
I'm using the SO and the Lazarus in English. :)
2013/5/6 silvioprog
The log of my Lazarus on Linux Mint:
I also tested it on openSUSE, and the problem occurs there too.
Other information...
I'm trying to debug this unit:
https://bitbucket.org/silvioprog/tcpipcomp/src/bc7b35a6e92b3ed29f1e3998f911435ad8d81e34/src/tcpipserver.pas?at=master
procedure TTcpIpServerSocketThread.Execute;
var
VSynchronized: Boolean;
begin
VSynchronized := Assigned(FOwner) and FOwner.Synchronized; << my break
point is here, [... F5, after, F9 ...]
try [... F8 ...]
if not Terminated then [... F8 ...] << here opens the assembler window
:(2013/5/6 silvioprog The log of my Lazarus on Linux Mint: http://pastebin.com/YyHAuDHX I…
Very odd.
Can you please add
DBG_LOCATION_INFO
to the list of debug_enable?
And if you do not mind recompiling the ide:
in
debugger\gdbmidebugger.pp line 11390
at the end of
function TGDBMIDebuggerCommand.FrameToLocation(const AFrame:String): TDBGLocationRec;
insert
DebugLn(['##### ',Result.SrcFile, ' / ', Result.SrcFullName, ' / ', Result.SrcLine]);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/9cb6345e/attachment.html>
Btw
file="../src/tcpipserver.pas",fullname="/home/silvioprog/tcpipcomp/src/tcpipserver.pas",line="460"
Is that in a package?
or has the path been added to the project? How, via which option, where? -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/e63f3c82/attachment.html>
Very odd. Can you please add DBG_LOCATION_INFO to the list of debug_enable? And if you do…
2013/5/6 Martin
I'll do it now...
Btw file="../src/tcpipserver.pas",fullname="/home/silvioprog/tcpipcomp/src/tcpipserver.pas…
2013/5/6 Martin
Is a unit of a package. I added the component getting from IDE and putting on my project.
So, this project is debugging fine on Windows, then the problem is in Lazarus on Linux (GTK2).
Sofar I am guessing that the IDE does not recognize the filename....
But no idea why. Also in that case, it should ask.... -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/aec53d37/attachment.html>
2013/5/6 Martin I'll do it now... Silvio Cl?cio My public projects - github.com/silvioprog
2013/5/6 silvioprog
Done:
Did you close the asm window before you tested?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/9782cb16/attachment.html>
2013/5/6 Martin
Did you close the asm window before you tested?
Yes, several times.
Did you close the asm window before you tested? -------------- next part --------------…
Martin wroteDid you close the asm window before you tested?
Anyway. It has the right filename.
* Please recompile the IDE with the following define CTDEBUG
* Please open the file \ide\debugmanager.pas
line 1265
insert the TWO debugln
if (SrcLine > 0) and (CurrentSourceUnitInfo nil) and
GetFullFilename(CurrentSourceUnitInfo, SrcFullName, True)
then begin
debugln('### A');
// Load the file
NewSource := CodeToolBoss.LoadFile(SrcFullName, true, false);
if NewSource = nil
then begin
debugln('### B');
if not (dlfLoadError in CurrentSourceUnitInfo.Flags) then begin
MessageDlg(lisDebugUnableToLoadFile,
Format(lisDebugUnableToLoadFile2, ['"', SrcFullName,
'"']),
mtError,[mbCancel],0);
CurrentSourceUnitInfo.Flags := CurrentSourceUnitInfo.Flags +
[dlfLoadError];
end;
SrcLine := -1;
end;
end
else
SrcLine := -1;-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130506/ae345616/attachment.html>
2013/5/6 Martin
Anyway. It has the right filename. * Please recompile the IDE with the following define CTDEBUG
How I do it, in this way?:
silvioprog wroteHow I do it, in this way?:
In options it would need "-d" in front.
Use the Defines window instead. "Edit Defines" -> add CTDEBUG there and later click the checkbox.
The list of defines is saved and you can toggle them on/off. BTW, the current "Debug" and "Verbose" do nothing.
The manual cleanup options are not usually needed. The automatic system will build everything if options change.
Juha
2013/5/6 Martin How I do it, in this way?: http://imagebin.org/256766 Silvio Cl?cio My…
Almost.
either put it in edit defines and then tick it.
or as an option it is -d for define. So: -dCTDEBUG -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130507/a3dceba5/attachment.html>
Anyway. It has the right filename. * Please recompile the IDE with the following define …
2013/5/6 Martin
I tried it ...:
... but, error:
Seems that "PropertyAtom" has renamed to "PropVarAtom" and "VarNameAtom" to "VarNameRange".
In options it would need "-d" in front. Use the Defines window instead. "Edit Defines" ->…
2013/5/7 Juha Manninen
Thank you very much, I didn't know this feature. :)
2013/5/6 Martin I tried it ...: http://imagebin.org/256833 ... but, error:…
Ok. I need to ask others.
2013/5/6 Martin I tried it ...: http://imagebin.org/256833 ... but, error:…
Try at least the 2 debugln,
So we can see if
NewSource := CodeToolBoss.LoadFile(SrcFullName, true, false);is called.
And if it returns a result or nil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130507/e83c2303/attachment-0001.html>
Also update your svn.
I was told that a potential issue was just fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130508/ee419eaf/attachment.html>
2013/5/7 Martin
Can you update GIT too?
silvioprog wrote> Also update your svn. > I was told that a potential issue was just fixed. Can you update GIT too?
Do you use the Graeme's mirror in GitHub?
It is updated automatically.
Juha
2013/5/7 Martin Can you update GIT too? Silvio Cl?cio My public projects -…
I don't know who updates the GIT, I think it updates automatically -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130508/3c6d385f/attachment.html>
Do you use the Graeme's mirror in GitHub? It is updated automatically. Juha
2013/5/8 Juha Manninen
Yep. And I update my copy now, but the problem continues when I try to compile my IDE with CTDEBUG enabled:
/home/silvioprog/lazarus/components/codetools/codecompletiontool.pas(1696,68) Error: Identifier not found "PropertyAtom"
/home/silvioprog/lazarus/components/codetools/codecompletiontool.pas(1697,44) Error: Identifier not found "PropertyAtom"
/home/silvioprog/lazarus/components/codetools/codecompletiontool.pas(2160,82) Error: Identifier not found "VarNameAtom"
/home/silvioprog/lazarus/components/codetools/codecompletiontool.pas(8805) Fatal: There were 3 errors compiling module, stopping
Sorry, no that was not fixed.
I was told something about path loading. That was hopped to fix initial issue. Is that also still there?
Can you try the 2 debugln?
Because we still need to find out who is the right person to look at this after all
Sorry about the mess.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130508/bfc3afda/attachment-0001.html>
2013/5/8 Martin
No problem friend. :)
I'll do it now, a minute...
2013/5/8 silvioprog
Done:
Ok. dumb question on my site: did the assembler window show, or did it work without it?
Because I cant see the asm stuff in the log.
Well looking for it, I can now see it way down. But a completely different situation,
*stopped,reason="signal-received",signal-name="SIGPIPE",signal-meaning="Broken pipe
That triggers different code...
So question: has the original issue been resolved ?
About the new one, I can see what happens.
The stopped position does not have debug info, so it can not display. It should try to find a position on the stack....
That fails. And it fails because it is exclusively disabled at that time....
I am not sure of the exact reasons... But IIRC it would give source-editor the hickups (crash it) if it was allowed. I might find time to investigate that again, but I don't know. Otherwise, this will need to wait. The original plan to resolve it requires a big rewrite.
On your own risk:
debugger/gdbmidebugger line 5185
function TGDBMIDebuggerCommandExecute.ProcessStopped(const AParams: String;
.......
procedure ProcessSignalReceived(const AList: TGDBMINameValueList);
.......
FTheDebugger.QueueExecuteLock;
try
if not AIgnoreSigIntState
or not SigInt
then ProcessFrame(F);
finally
FTheDebugger.QueueExecuteUnlock;
end;
end;remove the lock and unlock.
IIRC it is tricky to get the crash. So you might get a long way before it happens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130508/913bc657/attachment.html>
2013/5/8 Martin
I can do it yes, minute...
ps. I know that some people prefer not to do a remote access, but if you prefer, I'll can let you access my virtual machine, via TeamViewer ( http://www.teamviewer.com).
silvioprog wrote2013/5/8 Martin < <mailto:>> So question: has the original issue been resolved ?
You did not answer this.
If you hit a breakpoint, do you still get the asm?
Or is that part of the issue solved?
No need.
I know what needs to be done for this one. But it can not be fixed quickly. So if you hit a signal exception, then the asm will happen for now.
You can edit your copy. It may work well for you. Or not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130508/d1d54686/attachment.html>
2013/5/8 Martin
You did not answer this. If you hit a breakpoint, do you still get the asm?
Well,
In Windows, if I put:
procedure TForm1.Button1Click(Sender: TObject);
var
s: string;
begin
s := 'abc'; << Break point here (F5) // line 1
ShowMessage(s); // line 2
end;and I use Step Over (F8), the cursor go to "line 2", but the same code in Linux, go to GTK units. See:
1 - http://imagebin.org/257292
2 - http://imagebin.org/257294 (after first F8)
I don't know debug code in assembler. I'm pretty sure the problem is in the IDE, because in Linux/GTK it is not able to debug a simple string variable.
Not to be difficult, but the answer below relates to the question above in which way?
I am glad for you to report any issue you have with debugging. There is still much improvement to be done, and every bit of feedback helps.
But please, lets do them 1 by 1:
1) asm window, when hitting a breakpoint. I believe that is solved?
2) asm when stopping on a signal. Acknowledged, but no immediate solution available.
3) You have not reported yet, but you may still: hitting an exception via assert or raise, shows the code in the caller (one stackframe down). Acknowledged (this is because the rtl is compiled with optimization)
4) your code below (f8 to different unit):
5) your mention below of strings
"I don't know debug code in assembler."
Neither image shows the assembler. Nor does your description mention it.
Btw the unit it goes to in the pic is not GTK(LCL-widgetset), but LCL.
I asked again (because *not* following the below may be typical reasons for the behaviour):
- Compiled with smart-linking disabled
- Compiled with either -O0 or -O1 (Optimize zero or one)
Also:
- You use the default keymap for debug stuff? http://imagebin.org/257326
- you did not hold shift by accident (shift f8 is step out of the current procedure and would do exactly what you observed)
If none of the above: log file please
-----
5) "because in Linux/GTK it is not able to debug a simple string variable."
In which way?
- Note there are utf8 issues. they display as \x209... and similar. (reported on mantis)
- There is a known issue with accessing chars by index "s[1]" GDB can not differentiate between pchar and string (1 and 0 based index), and also there is no way for the IDE to get the diff from gdb. Therefore it is experted that the IDE shows "PChar: 'm' String: 'o' " or similar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130511/4575ee73/attachment.html>
Any update?
as for the stepping out (4), I *guess* that eithur:
- fpc or the linker were changed and the debug info is incorrectly generated (Though I did not see any commit with a log message, suggesting work on this)
- Something changed in GDB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130513/72f83bad/attachment.html>
2013/5/8 Martin In Windows, if I put: procedure TForm1.Button1Click(Sender: TObject); var…
Do you use FPC trunk at the same revision on both systems?
There is another case of this:
http://forum.lazarus.freepascal.org/index.php/topic,20870.0.html
It may be a case testing with an older revision of fpc.
I do not have 64 bit linux. So I can not test his myself.
2013/5/13 Martin
Sorry for my delay please.
Same problem.
I'll test it on stable Lazarus/FPC soon, please wait...
You can test it in a virtual machine (I'm using Linux Mint on VirtualBox). :)
One other thing: I am not sure if your LCL is compiled with stabs or dwarf.
But when testing, if either one fixes it, then also recompile the LCL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130513/a543e78b/attachment-0001.html>
2013/5/13 Martin
I compiled the IDE with:
$ make clean allNot sure which option it will take when building via make.
You can specify them in the package LCL options (then LCL should rebuild, if you build your project)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130513/c9c49a00/attachment.html>
2013/5/8 Martin In Windows, if I put: procedure TForm1.Button1Click(Sender: TObject); var…
Same problem:
http://forum.lazarus.freepascal.org/index.php/topic,20870.msg121583.html#msg121583
It appears that GDB decides that the step ends in the RTL (in your case that could be ansi_string_inc_ref or dec_ref or similar.
Since the RTL is optimized and has no debug info, the IDE searches an the stack for the caller.
Due to the optimization some of the RTL functions have no full stack frame. Therefore GDB can not correctly read the stack, and it does skip the direct caller [1]. So your function can not be found, and the next caller is used.
[1] The hiding of a caller due to optimization has always existed. And is correct behaviour. That is why your own project should not be optimized. But the RTL should be allowed, since gdb SHOULD not stop there, and should not have to bother with it.
2013/5/8 Martin In Windows, if I put: procedure TForm1.Button1Click(Sender: TObject); var…
Could be the same as http://bugs.freepascal.org/view.php?id=14399
2013/5/14 Martin
Thank you, I'll monitore this issue.