Recent

Author Topic: Debugging console project  (Read 10066 times)

Anonymous

  • Guest
Debugging console project
« on: June 11, 2004, 09:34:45 pm »
I need to debug a simple pascal (not delphi) project.
I've configured the debugging option on my linux machine, but i don't know how add breakpoints, how add watches and how i can see output (function write) and how i can do input (function read).

It's urgent, please.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2680
Debugging console project
« Reply #1 on: June 14, 2004, 11:56:59 am »
Breakpoints:
1) Configure a dbugger in debugger options
2) goto the line you want a breakpoint on, press F5 or klick the left margin of the editor.

There is no console output window yet (it isn't fully implemented in the gdb-MI interface yet)

Getting passing imput is not possible. Before this will happen, the debugger interface has to become more stable. The reason for this is that there is no separate stream to pass usr input to. Both your app as gdb receive the chars you type. So it might be a gdb command, or just user input.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
Debugging console project
« Reply #2 on: March 09, 2005, 10:41:26 am »
acutally, even I have set gdb & breakpoint, but why program will run not debug? Do i need more configuration, I remember I can do this on windows without any configuration. THANKS.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2680
Debugging console project
« Reply #3 on: March 09, 2005, 11:10:15 am »
enable debug info and don't use strip/upx/etc
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
Debugging console project
« Reply #4 on: January 05, 2006, 11:32:51 pm »
//Getting passing imput is not possible. Before this will happen, the debugger
//interface has to become more stable. The reason for this is that there is no
//separate stream to pass usr input to. Both your app as gdb receive the chars
//you type. So it might be a gdb command, or just user input.

Hi Marc I am also trying to debug a simple console application in Lazarus and Linux. I can do that successfully with everything but readln, readkey and other commands that read input from console.
Did you say that It can't be done right now in Linux?
I tried debugging with readln in Windows and it worked.
If this is the case please tell me because I am searching everywhere to find the proper configurations!
Thanks in advance!

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2680
Debugging console project
« Reply #5 on: January 30, 2006, 06:40:40 pm »
Console handling on windows and linux differ.
On windows, the os creates a console window for you if the app is a console type. This means that even if you run a debugger you will get a console.
On Linux you need to "create" your own console. for a console app, gdb is the console of this app. So on Linux there is only one stdin to write to (both your input and the input I send to gdb)
At this moment I've no way of splitting them.
Imaging you pass several chars and the app breaks after reading the first char, the other chars will get send to gdb.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018