Sign in Join

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

Mailing lists / lazarus / 2012-08

debugger fails on freebsd x86_64

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Marc Santhoff

Hi,

after having moved from a 32 bit machine to a 64 bit one I'm experiencing a problem. I cannot start any program. I think it had been working a while ago, but now any time a program in lazarus is started a dialog pops up saying:

"Debugger error

Ooops, the debugger entered the error state
Save your work now !

Hit Stop, and hope the best, we're pulling the plug."

When run from an xterm there is this log:

[TCompiler.Compile] end
TMainIDE.DoInitProjectRun ProgramFilename=/home/marc/program/Test_lazarus/LazThreads/ThrdDemo [TCmdLineDebugger] Debug PID: 4090
[Debugger] Log output: &"No symbol table is loaded. Use the \"file\" command.\n" TGDBMIDebugger.ProcessResult Error: ,msg="No symbol table is loaded. Use the \"file\" command." [Debugger] Running GDB version: 6.1.1 [FreeBSD]
[TDebugger.SetFileName] "/home/marc/program/Test_lazarus/LazThreads/ThrdDemo" [TMainIDE.DoRunProject] B TGDBMIDebugger
[TMainIDE.DoRunProject] END
TGDBMIDebugger.StartDebugging WorkingDir="/home/marc/program/Test_lazarus/LazThreads/" [Debugger] Log output: &"No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context.\n" TGDBMIDebugger.ProcessResult Error: ,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context." [Debugger] Log output: &"info functions FPC_CPUINIT\n" [Debugger] Log output: &"set width 50000\n"
[Debugger] Log output: &"info address main\n"
[Debugger] Log output: &"ptype TObject\n"
[Debugger] Log output: &"ptype Exception\n"
[Debugger] Log output: &"ptype Shortstring\n"
[Debugger] Log output: &"ptype pointer\n"
[Debugger] Log output: &"ptype byte\n"
[Debugger] Log output: &"info address FPC_RAISEEXCEPTION\n" [Debugger] Log output: &"info address FPC_BREAK_ERROR\n" [Debugger] Log output: &"info address FPC_RUNERROR\n" [Debugger] Log output: &"info file\n"
[Debugger] File type: elf64-x86-64-freebsd
[Debugger] Entry point: $447040
[WARNING] [Debugger.TargetInfo] Unknown FileType: elf64-x86-64-freebsd, using GDB cpu [WARNING] [Debugger] Unknown target CPU: amd64
[Debugger] Log output: &"mi_cmd_break_insert: Unknown option ``f''\n" TGDBMIDebugger.ProcessResult Error: ,msg="mi_cmd_break_insert: Unknown option ``f''" [Debugger] Console output: ~"[New LWP 100105]\n"
[Debugger] Console output: ~"[New Thread 808007400 (LWP 100105/ThrdDemo)]\n" [Debugger] Console output: ~"[Switching to Thread 808007400 (LWP 100105/ThrdDemo)]\n" [Debugger] Console output: ~"Warning: the current language does not match this frame.\n" [Debugger] Log output: &"info program\n"
[Debugger] Log output: &"info pid\n"
[Debugger] Log output: &"Undefined info command: \"pid\". Try \"help info\".\n" TGDBMIDebugger.ProcessResult Error: ,msg="Undefined info command: \"pid\". Try \"help info\"." [Debugger] Log output: &"info threads\n"
TDebugger.ReqCmd failed: Run

So the debugger doesn't know the target? To me the target name string look strange, but I may be wrong.

This is done using this versions:

FreeBSD 9.0-STABLE amd64

$ fpc -iV
2.6.0

Lazarus Version #: 0.9.30.4
Date: 2012-07-05
SVN Revision: 35971
x86_64-freebsd-gtk 2

What's wrong here? How can I fix it?

TIA,
Marc

Marc Santhoff

Reply by email

Martin
to Marc Santhoff
Marc Santhoff wrote
after having moved from a 32 bit machine to a 64 bit one I'm experiencing a problem. I cannot start any program. I think it had been working a while ago, but now any time a program in lazarus is started a dialog pops up saying:

....

[Debugger] Running GDB version: 6.1.1 [FreeBSD]

That is very old... yet, it may not be the problem

Yet I have (on windows) still some success using gdb 5.2

Show quoted text 7 lines
[TDebugger.SetFileName] "/home/marc/program/Test_lazarus/LazThreads/ThrdDemo" [Debugger] Log output: &"info file\n" [Debugger] File type: elf64-x86-64-freebsd [Debugger] Entry point: $447040 [WARNING] [Debugger.TargetInfo] Unknown FileType: elf64-x86-64-freebsd, using GDB cpu [WARNING] [Debugger] Unknown target CPU: amd64

The IDE indeed has a problem with "elf64-x86-64-freebsd ", it only knows "elf64-x86-64". The suffix throws the IDE off.
Yet that again should not lead to an error. It may however stop the IDE from getting exception class/message and other details...

[Debugger] Log output: &"info pid\n" [Debugger] Log output: &"Undefined info command: \"pid\". Try \"help info\".\n" TGDBMIDebugger.ProcessResult Error: ,msg="Undefined info command: \"pid\". Try \"help info\"."

Might be the old gdb. But again should be recovered. This is one of several attempts of the IDE to get the PID. Not sure if all others failed too. If so, then that could have caused the error.

There is a possibility that your GDB is localized. In that case the IDE can not understand all the replies...

I need a more complete log.
Please start the IDE with

| --debug-log=/home/yourname/laz.log --debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO,DBG_WARNINGS And supply the new log file
|

---------------
In the mean time in the debugger options, there is "InternalStartBreak", you may try other values. But I can not tell, if it will help... -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120809/e083f546/attachment.html>

Reply by email

Alonso Cárdenas Márquez
to Martin

2012/8/9 Martin :

Show quoted text 63 lines
On 09/08/2012 22:02, Marc Santhoff wrote: after having moved from a 32 bit machine to a 64 bit one I'm experiencing a problem. I cannot start any program. I think it had been working a while ago, but now any time a program in lazarus is started a dialog pops up saying: .... [Debugger] Running GDB version: 6.1.1 [FreeBSD] That is very old... yet, it may not be the problem Yet I have (on windows) still some success using gdb 5.2 [TDebugger.SetFileName] "/home/marc/program/Test_lazarus/LazThreads/ThrdDemo" [Debugger] Log output: &"info file\n" [Debugger] File type: elf64-x86-64-freebsd [Debugger] Entry point: $447040 [WARNING] [Debugger.TargetInfo] Unknown FileType: elf64-x86-64-freebsd, using GDB cpu [WARNING] [Debugger] Unknown target CPU: amd64 The IDE indeed has a problem with "elf64-x86-64-freebsd ", it only knows "elf64-x86-64". The suffix throws the IDE off. Yet that again should not lead to an error. It may however stop the IDE from getting exception class/message and other details... [Debugger] Log output: &"info pid\n" [Debugger] Log output: &"Undefined info command: \"pid\". Try \"help info\".\n" TGDBMIDebugger.ProcessResult Error: ,msg="Undefined info command: \"pid\". Try \"help info\"." Might be the old gdb. But again should be recovered. This is one of several attempts of the IDE to get the PID. Not sure if all others failed too. If so, then that could have caused the error. There is a possibility that your GDB is localized. In that case the IDE can not understand all the replies... I need a more complete log. Please start the IDE with --debug-log=/home/yourname/laz.log --debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO,DBG_WARNINGS And supply the new log file --------------- In the mean time in the debugger options, there is "InternalStartBreak", you may try other values. But I can not tell, if it will help... -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Please, could you install devel/gdb from ports? It could work with newest version of gdb (7.4.1)

Don't forget change gdb path to /usr/local/bin/gdb on lazarus Environment/Options

Greetings
ACM

Reply by email

Marc Santhoff
to Alonso Cárdenas Márquez

Am Donnerstag, den 09.08.2012, 17:35 -0500 schrieb Alonso C?rdenas M?rquez:

Show quoted text 14 lines
2012/8/9 Martin : > On 09/08/2012 22:02, Marc Santhoff wrote: > > after having moved from a 32 bit machine to a 64 bit one I'm > experiencing a problem. I cannot start any program. I think it had been > working a while ago, but now any time a program in lazarus is started a > dialog pops up saying: Please, could you install devel/gdb from ports? It could work with newest version of gdb (7.4.1) Don't forget change gdb path to /usr/local/bin/gdb on lazarus Environment/Options

That did the trick, I actually can run programs again, thanks.

Purists may say it is at least some sort of irritating having to install another debugger - which never has been so since I use fpc and lazarus -, but I understand that this might be the version responsible developers used because it was just there on their systems.

Will the systems GDB in FreeBSD 9.0 be supported later or is the minimal version of gdb a fact that shoulf be mentioned in some README or the wiki or so?

Thanks,
Marc

Marc Santhoff

Reply by email

Martin
to Marc Santhoff
Marc Santhoff wrote 18 lines
Am Donnerstag, den 09.08.2012, 17:35 -0500 schrieb Alonso C?rdenas M?rquez: > Please, could you install devel/gdb from ports? It could work with > newest version of gdb (7.4.1) > > Don't forget change gdb path to /usr/local/bin/gdb on lazarus > Environment/Options That did the trick, I actually can run programs again, thanks. Purists may say it is at least some sort of irritating having to install another debugger - which never has been so since I use fpc and lazarus -, but I understand that this might be the version responsible developers used because it was just there on their systems. Will the systems GDB in FreeBSD 9.0 be supported later or is the minimal version of gdb a fact that shoulf be mentioned in some README or the wiki or so?

I don't know what exactly is going wrong on the Freebsd gdb. And I havent used FreeBSD in a long time...

Where did he 6.1 debugger come from? Lazarus does not include GDB except on windows (afaik).

I am surprised that Freebsd 9 should by default have such an old GDB.

Also, there must be something different about that GDB, since on Windows GDB 5.2 does work....

Reply by email

Marc Santhoff
to Martin
Martin wrote 25 lines
On 11/08/2012 22:55, Marc Santhoff wrote: > Am Donnerstag, den 09.08.2012, 17:35 -0500 schrieb Alonso C?rdenas > M?rquez: >> Please, could you install devel/gdb from ports? It could work with >> newest version of gdb (7.4.1) >> >> Don't forget change gdb path to /usr/local/bin/gdb on lazarus >> Environment/Options > That did the trick, I actually can run programs again, thanks. > > Purists may say it is at least some sort of irritating having to install > another debugger - which never has been so since I use fpc and lazarus > -, but I understand that this might be the version responsible > developers used because it was just there on their systems. > > Will the systems GDB in FreeBSD 9.0 be supported later or is the minimal > version of gdb a fact that shoulf be mentioned in some README or the > wiki or so? > I don't know what exactly is going wrong on the Freebsd gdb. And I havent used FreeBSD in a long time... Where did he 6.1 debugger come from? Lazarus does not include GDB except on windows (afaik).

It's what comes with the system by default. Part of the OS.

I am surprised that Freebsd 9 should by default have such an old GDB.

I'm used to it. It has been some versions back ever since. Or the other way round, FreeBSD is a bit conservative and Linux adopts any new (and maybe buggy) version very early. ;)

Also, there must be something different about that GDB, since on Windows GDB 5.2 does work....

Running a program and triggering gdb on exception has worked for me all the time until now. All the time is since ... um, I think 2001 or so, with fpc 1.9.2. Real debugging - stepping through code, inspecting vars
- has worked only sometimes and partly. So that's no surprise regarding FreeBSD.

But since I avoid having to debug I primarily need to have a running program inside lazarus. I wonder if deleting the debugger from the options would have helped either, I'll test later.

Marc Santhoff

Reply by email

Martin
to Marc Santhoff
Marc Santhoff wrote 12 lines
Am Sonntag, den 12.08.2012, 00:51 +0100 schrieb Martin: > I don't know what exactly is going wrong on the Freebsd gdb. And I > havent used FreeBSD in a long time... > > Where did he 6.1 debugger come from? Lazarus does not include GDB except > on windows (afaik). It's what comes with the system by default. Part of the OS. > I am surprised that Freebsd 9 should by default have such an old GDB. I'm used to it. It has been some versions back ever since. Or the other way round, FreeBSD is a bit conservative and Linux adopts any new (and maybe buggy) version very early. ;)

"A bit conservative" 6.1 is years behind. Current is 7.4 (and 7.5 is due)

But that's not the point, there must be some other difference, maybe it's localized, maybe it has bsd specific patches. It does somehow behave different.

Show quoted text 7 lines
> Also, there must be something different about that GDB, since on Windows > GDB 5.2 does work.... Running a program and triggering gdb on exception has worked for me all the time until now. All the time is since ... um, I think 2001 or so, with fpc 1.9.2. Real debugging - stepping through code, inspecting vars - has worked only sometimes and partly. So that's no surprise regarding FreeBSD.

Well if you do not mind, you can still send me a full log

| --debug-log=/home/yourname/laz.log --debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO,DBG_WARNINGS

If it is trivial to fix ...
|

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

Reply by email