Debugging does not work on Linux

Issue #74 resolved
Former user created an issue

Hello.

Thank you for the plugin. It mostly works well.

But It seams debugging broken on Fedora 26.

I have simple test program:

program program_a;
var
  a: Integer;
begin
  WriteLn('Write var a:');
  ReadLn(a);
  WriteLn('a=', a);
end.

It runs in Idea 2017.2.5, but show nothing, until I enter number (I think there some buffering issue on console, it works correct when I run it directly as out/production/idea-pascal-0/a). It is also separate issue.

But when I try debug it I got in console:

>>>> -break-delete
>>>> -break-insert  -f /home/pasha/Projects/_TEST/idea-pascal-0/a.pas:5
>>>> -gdb-set target-async on
>>>> -exec-arguments > /tmp/ipas_run_out_6136621779808123658.tmp
>>>> -exec-run
gdb -n -fullname -nowindows -interpreter=mi "" --args /home/pasha/Projects/_TEST/idea-pascal-0/out/production/idea-pascal-0/a
=thread-group-added,id="i1"
~"GNU gdb (GDB) Fedora 8.0.1-26.fc26\n"
~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-redhat-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\"...\n"
~"Reading symbols from /home/pasha/Projects/_TEST/idea-pascal-0/out/production/idea-pascal-0/a..."
~"(no debugging symbols found)...done.\n"
(gdb) 
^done
(gdb) 
&"No symbol table is loaded.  Use the \"file\" command.\n"
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="/home/pasha/Projects/_TEST/idea-pascal-0/a.pas:5",times="0",original-location="/home/pasha/Projects/_TEST/idea-pascal-0/a.pas:5"}
(gdb) 
^done
(gdb) 
^done
(gdb) 
=thread-group-started,id="i1",pid="1996"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb) 

On attempt add breakpoint:

>>>> -break-insert -h -f /home/pasha/Projects/_TEST/idea-pascal-0/a.pas:6
~"[Inferior 1 (process 1996) exited with code 0152]\n"
=thread-exited,id="1",group-id="i1"
Runtime error 106 at $000000000040024C
=thread-group-exited,id="i1",exit-code="0152"
  $000000000040024C
  $00000000004001BC

*stopped,reason="exited",exit-code="0152"
>>>> -gdb-exit
^exit
>>>> -stack-list-variables --thread null --frame 0 --simple-values
>>>> -stack-list-frames

And no working breakpoints at all.

I think it may be related to https://bitbucket.org/argb32/i-pascal/issues/71/gdb-does-not-work-on-macos-sierra-10125, but that marked related to MacOs only.

Comments (3)

  1. George Bakhtadze repo owner

    Pavel,

    #!
    
    ~"Reading symbols from /home/pasha/Projects/_TEST/idea-pascal-0/out/production/idea-pascal-0/a..."
    ~"(no debugging symbols found)...done.\n"
    (gdb) 
    

    This means that no debug information was included in executable. Did you used -gw or similar compiler options during compilation?

  2. Log in to comment