How to get rid of the assember window? lazarus / 12-Debugger ---------------------------------------------------------------------- geek893 · 2017-01-12 13:13 When I try to debug my program by executing it step by step (by pressing F7) this GODDAMNED assember window pops up and I have no idea how to get rid of it. I don't need this window, it only irritates me. ---------------------------------------------------------------------- balazsszekely · 2017-01-12 13:26 QuoteGeek893 When I try to debug my program by executing it step by step (by pressing F7) this GODDAMNED assember window pops up and I have no idea how to get rid of it. I don't need this window, it only irritates me.Assuming the debugger setup is correct: http://wiki.lazarus.freepascal.org/Debugger_Setup, the assembler window only popups when the GODDAMNED source code is not available ,  so there is little you can do about it. Are you working with some third party components with reference to external dlls? ---------------------------------------------------------------------- geek893 · 2017-01-12 14:05 QuoteAssuming the debugger setup is correc Thank you for the link, I have changed some options, but the assembler window still pops up. QuoteAre you working with some third party components with reference to external dlls? No, I'm writing my own code.  I use Debian Stable, my copy of Lazarus is from its repository. Here is an example of code that gets these pop-ups: Quoteprogram project1; begin write('Hello!'); write('Goodbye!'); end.      ---------------------------------------------------------------------- Martin_fr · 2017-01-13 01:18 What version of GDB ? As pointed out the asm win shows up, if you stop at an address for which there is no source (actually for which there is on debug info, so the source can not be found). If you stop at such a location, then there is nothing else that could be shown, so the asm can not be suppressed. (You can switch its power button off, so it will not spent time loading, but it will still show (with the frozen power off content)). Usually stopping at such a location happens if an exception occurs... The odd thing is that you experience it with F7. on F7 gdb is only to step to locations with debug info. Actually, except if you step out of a function, into a parent function that has no debug info. In that case compile the parent function with debug info too. Or if you do not want to step into it, then use F9. Otherwise check your settings. Try switching between "stabs" and "dwarf with sets". (dwarf is preferred) If you have packages that are compiled with debug info, then ensure they all have the same setting ! ------------------ your example project has no packages or anything. That is really odd and should not happen. Check in IDE options / editor / keymap what is assigned to F7 It should be "step into" It should NOT be "step into Instruction" And it should also NOT be "step into (Context)" The latter 2 can do single assembler steps, and then, yes then you get the asm. ------------- Another idea: maybe there is an excepiton in write(). Is stdout open? there is menu: view > Debug win > console outpet / or similar. You should see the written text in that window. (on linux only) ---------------------------------------------------------------------- geek893 · 2017-01-13 02:16 Version of GDB:7.7.1 Version of Lazarus:1.2.4 Version of FPC:2.6.4 QuoteTry switching between "stabs" and "dwarf with sets". (dwarf is preferred) I tried, but the window still pops up. Quoteyour example project has no packages or anything. That is really odd and should not happen. What are packages and why my program should have them? QuoteIt should be "step into" Yes, it's "step into". QuoteAnother idea: maybe there is an excepiton in write(). It seems like there is NO messages of any errors/warnings on the console output, the program works just as intended. Although, there is the debug output if anybody is interested: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i <-file- exec-and-symbols "/tmp/project1">^done(gdb) <-gdb-set language pascal>^done(gdb) <-environment-cd .>^done(gdb) <-environment-cd "/tmp/">^done(gdb) <-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."(gdb) &"info functions FPC_CPUINIT\n"~"All functions matching regular expression \"FPC_CPUINIT\":\n"~"\nNon-debugging symbols:\n"~"0x08049480  SYSTEM_FPC_CPUINIT\n"^done(gdb) <-exec- arguments >^done(gdb) &"set inferior-tty /dev/pts/0\n"^done(gdb) <-gdb-set language pascal>^done(gdb) &"ptype TObject\n"&"No symbol \"TObject\" in current context.\n"^error,msg="No symbol \"TObject\" in current context."(gdb) &"ptype Exception\n"&"No symbol \"Exception\" in current context.\n"^error,msg="No symbol \"Exception\" in current context."(gdb) &"ptype Shortstring\n"&"No symbol \"Shortstring\" in current context.\n"^error,msg="No symbol \"Shortstring\" in current context."(gdb) &"ptype pointer\n"&"No symbol \"pointer\" in current context.\n"^error,msg="No symbol \"pointer\" in current context."(gdb) &"ptype byte\n"&"No symbol \"byte\" in current context.\n"^error,msg="No symbol \"byte\" in current context."(gdb) &"set print elements 2500\n"^done(gdb) &"info file\n"~"Symbols from \"/tmp/project1\".\n"~"Local exec file:\n"~"\t`/tmp/project1', file type elf32-i386.\n"~"\tEntry point: 0x8065590\n"~"\t0x080480a0 - 0x08065600 is .text\n"~"\t0x08066600 - 0x0806ade0 is .data\n"~"\t0x0806ade0 - 0x0806e6d4 is .bss\n"^done(gdb) <-data-evaluate-expression sizeof(^char)>^error,msg="A syntax error in expression, near `char)'."(gdb) <-break-insert main>^done,bkpt={number ="38",type="breakpoint",disp="keep",enabled="y",addr="0x080480ae",func ="main",file="project1.lpr",fullname="/tmp/project1.lpr",line="4",thre ad-groups=["i1"],times="0",original-location="main"}(gdb) <-break- insert +0>^done,bkpt={number="39",type="breakpoint",disp="keep",enable d="y",addr="0x08048100",func="main",file="project1.lpr",fullname="/tmp /project1.lpr",line="6",thread-groups=["i1"],times="0",original- location="/tmp/project1.lpr:+0"}(gdb) <-break-insert *134632848>^done, bkpt={number="40",type="breakpoint",disp="keep",enabled="y",addr="0x08 065590",at="",thread- groups=["i1"],times="0",original-location="*134632848"}(gdb) <-exec- run>=thread-group-started,id="i1",pid="17466"=thread- created,id="1",group-id="i1"^running*running,thread-id="all"(gdb) =breakpoint-modified,bkpt={number="39",type="breakpoint",disp="keep",e nabled="y",addr="0x080480d7",func="main",file="project1.lpr",fullname= "/tmp/project1.lpr",line="5",thread-groups=["i1"],times="0",original- location="/tmp/project1.lpr:+0"}=breakpoint-modified,bkpt={number="40" ,type="breakpoint",disp="keep",enabled="y",addr="0x08065590",at="",thread-groups=["i1"],times="1",original- location="*134632848"}*stopped,reason="breakpoint-hit",disp="keep",bkp tno="40",frame={addr="0x08065590",func="SI_PRC__FPC_PROC_START",args=[ ]},thread-id="1",stopped-threads="all",core="2"(gdb) <-break-delete 38>^done(gdb) <-break-delete 40>^done(gdb) <-break-delete 39>^done(gdb) &"info address FPC_RAISEEXCEPTION\n"~"Symbol \"FPC_RAISEEXCEPTION\" is at 0x8057a10 in a file compiled without debugging.\n"^done(gdb) <-break-insert *134 576656>^done,bkpt={number="41",type="breakpoint",disp="keep",enabled=" y",addr="0x08057a10",at="",thread- groups=["i1"],times="0",original-location="*134576656"}(gdb) &"info address FPC_BREAK_ERROR\n"~"Symbol \"FPC_BREAK_ERROR\" is at 0x805ac30 in a file compiled without debugging.\n"^done(gdb) <-break-insert *134589488>^done,bkpt={number=" 42",type="breakpoint",disp="keep",enabled="y",addr="0x0805ac30",at="",thread- groups=["i1"],times="0",original-location="*134589488"}(gdb) &"info address FPC_RUNERROR\n"~"Symbol \"FPC_RUNERROR\" is at 0x805ad30 in a file compiled without debugging.\n"^done(gdb) <-break-insert *134589744>^done,bkpt={number=" 43",type="breakpoint",disp="keep",enabled="y",addr="0x0805ad30",at="",thread-groups=["i1"],times="0",original- location="*134589744"}(gdb) <-symbol-list-lines /tmp/project1.lpr>^don e,lines=[{pc="0x080480a0",line="3"},{pc="0x080480ae",line="4"},{pc="0x 080480d7",line="5"},{pc="0x08048100",line="6"}](gdb) <-exec- continue>^running*running,thread-id="all"(gdb) =thread- exited,id="1",group-id="i1"=thread-group-exited,id="i1",exit- code="0"*stopped,reason="exited-normally"(gdb) <-break-delete 41>^done(gdb) <-break-delete 42>^done(gdb) <-break-delete 43>^done(gdb) <-file-exec-and-symbols >^done(gdb) ---------------------------------------------------------------------- Martin_fr · 2017-01-13 12:48 Packages are for example the LCL, or RichMemo, database. THere are some for commandline apps too. See Project Inspector (menu Project), it will show what you include. (Afaik if its only "FCL" you do not need to worry about anything) gdb 771 is good. Lazarus 1.2.4 is a bit old (current is 1.6.2). But for the asm win problem, it is unlikely that it will make a difference. So 1.2.4 is ok. The debug output shows a run(F9) with no stepping, and no asm win opened... ---------------------------------------------------------------------- geek893 · 2017-01-13 13:26 Is there any way to copy my settings to one file, so somebody could check if there is something wrong with them? QuoteSee Project Inspector (menu Project), it will show what you include I tried, but I'm afraid that it wasn't helpful. There's a screenshot of the window of my Project Inspector: https://i.imgur.com/XcfbswU.png Quotegdb 771 is good. I know what "gdb" means, but I have no a clue what you were trying to say by "gdb 771" ---------------------------------------------------------------------- Martin_fr · 2017-01-13 16:21 I missed the dots "GDB version 7.7.1". Some GDB versions have known issues. The version you say you have, should be ok. At least I dont (yet) know of any issue of "GDB version 7.7.1" that would affect stepping with F7. Project Inspector / your image: You do not use any packages, so this is not the issue either. ----- very far fetched... Extremly far fetched.... you can try this setting http://wiki.lazarus.freepascal.org/GDB_Debugg er_Tips#gdb.exe_has_stopped_working     set the field "DisableLoadSymbolsForLibraries" to "True" --------- QuoteAlthough, there is the debug output if anybody is interested:As I said that one did not have the asm win. You could paste one, where you did get the asm win. ---------------------------------------------------------------------- geek893 · 2017-01-14 04:54 Quote    set the field "DisableLoadSymbolsForLibraries" to "True" Didn't change anything. QuoteAs I said that one did not have the asm win. You could paste one, where you did get the asm win. I don't know what the hell is going on, but there is another try: http://pastebin.com/XJC0dEGK I found a workaround: I can get rid of the assembler window by entering the step by step mode with a breakpoint instead of pressing "F7". So I just make the first line of my code as a breakpoin, click "run" and then use "F7" for each step. ---------------------------------------------------------------------- Martin_fr · 2017-01-14 12:38 QuoteI found a workaround: I can get rid of the assembler window by entering the step by step mode with a breakpoint instead of pressing "F7". So I just make the first line of my code as a breakpoin, click "run" and then use "F7" for each step. Ah, that explains. Starting an app, using "step" (into or over) is not supported. (Hence I (and likely others) thought you try to step between lines in an already running app) Stepping needs a current line, so it can find the next line. If you use F7 to start the app, it will stop even before your first line (the compiler adds code before your first line). And as that code does not have a source, you get the asm win. ---------------------------------------------------------------------- geek893 · 2017-01-14 12:54 QuoteStarting an app, using "step" (into or over) is not supported. Then why does it work fine in Turbo Pascal IDE? (and no, I can't use Free Pascal IDE that imitates it because in my distribution it's compiled with disabled debugger support. It was disabled because maintainers found problems between it and current version of GDB) ---------------------------------------------------------------------- Martin_fr · 2017-01-14 18:34 When I said "is not supported", I meant by the Lazarus IDE. (and native GDB) It could be implemented. But no one has yet done it.