Recent

Author Topic: DBG doesn't work  (Read 2275 times)

Vasil

  • Newbie
  • Posts: 2
DBG doesn't work
« on: May 02, 2016, 06:21:30 pm »
I install Lazarus and GDB. When i check like that
Code: Pascal  [Select][+][-]
  1. gdb -help
i receive

Code: Pascal  [Select][+][-]
  1. This is the GNU debugger.  Usage:
  2.  
  3.     gdb [options] [executable-file [core-file or process-id]]
  4.     gdb [options] --args executable-file [inferior-arguments ...]
  5.  
  6. Selection of debuggee and its files:
  7.  
  8.   --args             Arguments after executable-file are passed to inferior
  9.   --core=COREFILE    Analyze the core dump COREFILE.
  10.   --exec=EXECFILE    Use EXECFILE as the executable.
  11.   --pid=PID          Attach to running process PID.
  12.   --directory=DIR    Search for source files in DIR.
  13. and so on
In
Code: Pascal  [Select][+][-]
  1. Tools->Options->Debugger->General-> GNU debugger(gdb) to /usr/bin/gdb
But I can't run my project, I always received

Code: Pascal  [Select][+][-]
  1. The GDB command:
  2. "-file-exec-and-symbols "
  3. did not return any result.
  4.  
  5. The GDB process is no longer running.
In google there a lot of ideas but no one can help me.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9870
  • Debugger - SynEdit - and more
    • wiki
Re: DBG doesn't work
« Reply #1 on: May 02, 2016, 06:34:37 pm »
OS ? Linux, OSX?
32/64 bit?
version of gdb?

Any special chars in the exe name or path to exe?

Antivirus? Check that the exe file still exists, I have seen AV removing the exe before it can be run. Sometimes, some AV even without asking despite configured to ask.

Provide a log:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Create_a_new_Report

Vasil

  • Newbie
  • Posts: 2
Re: DBG doesn't work
« Reply #2 on: May 02, 2016, 07:07:17 pm »
iOS, I had another version of lazarus and update it. GDB executable is exist. I check it (((

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9870
  • Debugger - SynEdit - and more
    • wiki
Re: DBG doesn't work
« Reply #3 on: May 02, 2016, 07:20:22 pm »
I have to check, but IIRC on IOS there is some tricky business. The actual exe should be inside the bundle.

It may be that the IDE creates it outside and sets a symlink in the bundle, not sure gdb deals with this. Maybe if you change the project settings to have the exe put directly into the bundle.

Sorry that is not very specific, but its a long time I looked at a Mac.

Another thing could be dwarf vs stabs (mind that needs to be set for each package). But I am not sure that would cause the error you got.
 

 

TinyPortal © 2005-2018