Sign in Join

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

Mailing lists / lazarus / 2002-02

gdb/step

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Liebrecht Venter: I downloaded the latest Lazarus. Somehow Step and breakpoints still dont work. Lazarus…
BTW, what does the view - Debugger output dialog show ?

<attach 3717>
$0819ca1a in HEAP ()
<cont>

Program received signal SIGTRAP, Trace/breakpoint trap. $08048080 in _start ()
<tbreak main>
Breakpoint 1 at $8075286: file pcx2lilo.pas, line 780. <cont>
main () at pcx2lilo.pas:780
780 begin
<info frame>
Stack level 0, frame at $bffff9d8:
eip = $8075286 in main (pcx2lilo.pas:780); saved eip $80480b0 source language pascal.
Arglist at $bffff9d8, args:
Locals at $bffff9d8, Previous frame's sp is $0
Saved registers:
ebp at $bffff9d8, eip at $bffff9dc
<info program>
Using the running image of attached process 3717.
Program stopped at $8075286.
It stopped at a breakpoint that has since been deleted. Type "info stack" or "info registers" for more information. <cont>

Program exited normally.
<info frame>
No stack.
<info program>
The program being debugged is not being run.
<info program>
The program being debugged is not being run.
<info frame>
No stack.
<break /somewhere/pcx2lilo/pcx2lilo.pas:783>
No source file named /somewhere/pcx2lilo/pcx2lilo.pas.

Mattias

Reply by email

Marc Weustink
to Marc Weustink: ^^^^^^ Huh, what version are you running ? Mine doesn't understand pascal. Seems OK to me.
Mattias Gaertner wrote 11 lines
On Fri, 22 Feb 2002 22:45:45 +0100 Marc Weustink wrote: > > source language pascal. > ^^^^^^ > > Huh, what version are you running ? Mine doesn't understand pascal. AFAIK gdb can understand pascal since 5.1. See fpc-pascal list. Mine is: GNU gdb Red Hat Linux (5.1-1) gdb-5.1-1

AH, I installed that version yesterday eve. I was only interested in the MI interface, so I didn't look closer. I was also surprised, since the docs (with 5.2 examples) didn't mention anything about supporting pascal.

Show quoted text 6 lines
> > No problem at this point. The program is stopped. The file does excist ? of course. It is a single file program, without any special settings. I can send you the source.

Ah, those kind of files work (that are the ones I use for testing)

Since I attach to a proces (to avoid screen output to clutter the debug output) dynamic libs aren't loaded, resulting in a segfault most of the time (I haven't been succcesful to load the dynamic libs in gdb) And since most Lazarus apps will have some GTK (and thus dynamic libs) in them, it won't be a workable solution.

I'm planning to base the debugger on the MI interface which seems do-able to me. In that case, I don't have to load the libs manually and it should work more reliable. More updates on it soon.

Marc

Reply by email

Mattias Gaertner
to Marc Weustink: + From: Behalf + Of Liebrecht Venter + + I downloaded the latest Lazarus. Somehow Step…
Show quoted text 24 lines
At 19:17 22/02/2002 +0100, Mattias Gaertner wrote: >On Fri, 22 Feb 2002 17:20:52 +0100 >"Marc Weustink" wrote: > > > BTW, what does the view - Debugger output dialog show ? > ><attach 3717> >$0819ca1a in HEAP () ><cont> > >Program received signal SIGTRAP, Trace/breakpoint trap. >$08048080 in _start () ><tbreak main> >Breakpoint 1 at $8075286: file pcx2lilo.pas, line 780. ><cont> >main () at pcx2lilo.pas:780 >780 begin ><info frame> >Stack level 0, frame at $bffff9d8: > eip = $8075286 in main (pcx2lilo.pas:780); saved eip $80480b0 > source language pascal. ^^^^^^ Huh, what version are you running ? Mine doesn't understand pascal.

AFAIK gdb can understand pascal since 5.1. See fpc-pascal list. Mine is: GNU gdb Red Hat Linux (5.1-1)
gdb-5.1-1

Show quoted text 7 lines
>It stopped at a breakpoint that has since been deleted. >Type "info stack" or "info registers" for more information. ><cont> > >Program exited normally. Seems OK to me.

yep. Me too.

Show quoted text 12 lines
><info frame> >No stack. ><info program> >The program being debugged is not being run. ><info program> >The program being debugged is not being run. ><info frame> >No stack. ><break /somewhere/pcx2lilo/pcx2lilo.pas:783> >No source file named /somewhere/pcx2lilo/pcx2lilo.pas. No problem at this point. The program is stopped. The file does excist ?

of course.
It is a single file program, without any special settings. I can send you the source.

Mattias

Reply by email

Marc Weustink
to Liebrecht Venter: I downloaded the latest Lazarus. Somehow Step and breakpoints still dont work. Lazarus…

+ From: Behalf
+ Of Liebrecht Venter
+
+ I downloaded the latest Lazarus. Somehow Step and breakpoints
+ still dont work.
+ Lazarus just does absolutely nothing...no response.
+ I checked that GDB works as can be seen below.

I'm afraid that the current implementation of the debugger doesn't work well with shared libs. Im working on another solution, which should work better. In the mean time, the only thing I can think og is to link staticly.

Marc

BTW, what does the view - Debugger output dialog show ?

Reply by email

Marc Weustink
to Marc Weustink
Mattias Gaertner wrote 20 lines
On Fri, 22 Feb 2002 17:20:52 +0100 "Marc Weustink" wrote: > BTW, what does the view - Debugger output dialog show ? <attach 3717> $0819ca1a in HEAP () <cont> Program received signal SIGTRAP, Trace/breakpoint trap. $08048080 in _start () <tbreak main> Breakpoint 1 at $8075286: file pcx2lilo.pas, line 780. <cont> main () at pcx2lilo.pas:780 780 begin <info frame> Stack level 0, frame at $bffff9d8: eip = $8075286 in main (pcx2lilo.pas:780); saved eip $80480b0 source language pascal.

^^^^^^

Huh, what version are you running ? Mine doesn't understand pascal.

Show quoted text 12 lines
Arglist at $bffff9d8, args: Locals at $bffff9d8, Previous frame's sp is $0 Saved registers: ebp at $bffff9d8, eip at $bffff9dc <info program> Using the running image of attached process 3717. Program stopped at $8075286. It stopped at a breakpoint that has since been deleted. Type "info stack" or "info registers" for more information. <cont> Program exited normally.

Seems OK to me.

Show quoted text 10 lines
<info frame> No stack. <info program> The program being debugged is not being run. <info program> The program being debugged is not being run. <info frame> No stack. <break /somewhere/pcx2lilo/pcx2lilo.pas:783> No source file named /somewhere/pcx2lilo/pcx2lilo.pas.

No problem at this point. The program is stopped. The file does excist ?

Marc

Reply by email

Liebrecht Venter

I downloaded the latest Lazarus. Somehow Step and breakpoints still dont work.
Lazarus just does absolutely nothing...no response. I checked that GDB works as can be seen below.

Liebrecht]$ gdb
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux".
(gdb)

Are there maybe any options I should pass to the compiler to make gdb and Lazarus speak to each other? I see no other misconfiguration possible.

Reply by email