Sign in Join

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

Mailing lists / lazarus / 2016-01

Debugging in Libraries.

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Donald Ziesig

Hi All:

I have encountered a problem doing things that used to work. (Using Lazarus 1.4.4 on Linux and 1.4.2 on Raspbian)

Specifically, I can no longer step into subprograms in library units, and when I set a breakpoint in the library code it is colored dull green as opposed to bright red in the main program. Some, but not all, of the library code is implemented using generics.

I can't see anything I am doing differently than before (except that I copied the entire source for the program and library from a Raspberry PI, including the configurations. The PI also had this problem).

Can anyone give me a hint as to where I should start looking to fix this?

Thanks,

Don Ziesig

Reply by email

Martin Frb
to Donald Ziesig
Donald Ziesig wrote 13 lines
Hi All: I have encountered a problem doing things that used to work. (Using Lazarus 1.4.4 on Linux and 1.4.2 on Raspbian) Specifically, I can no longer step into subprograms in library units, and when I set a breakpoint in the library code it is colored dull green as opposed to bright red in the main program. Some, but not all, of the library code is implemented using generics. I can't see anything I am doing differently than before (except that I copied the entire source for the program and library from a Raspberry PI, including the configurations. The PI also had this problem).

Dull green, usually (check debug output window) means that gdb returned, that there is on code on the requested line/number.

With generics, usually the oposite is the case, there are several blocks of code containing the location (and on windows, I have seen gdb handling that, at least in some cases).

The question then is, if fpc did generate sufficient debug info or if gdb has an issue. (try stabs and dwarf)

ensure you disable "inlining"

Reply by email

Donald Ziesig
to Martin Frb
Martin Frb wrote 18 lines
On 18/01/2016 18:34, Donald Ziesig wrote: > Hi All: > > I have encountered a problem doing things that used to work. (Using > Lazarus 1.4.4 on Linux and 1.4.2 on Raspbian) > > Specifically, I can no longer step into subprograms in library units, > and when I set a breakpoint in the library code it is colored dull > green as opposed to bright red in the main program. Some, but not > all, of the library code is implemented using generics. > > I can't see anything I am doing differently than before (except that > I copied the entire source for the program and library from a > Raspberry PI, including the configurations. The PI also had this > problem). Dull green, usually (check debug output window) means that gdb returned, that there is on code on the requested line/number.

will do.

With generics, usually the oposite is the case, there are several blocks of code containing the location (and on windows, I have seen gdb handling that, at least in some cases).

come to think of it, IIRC gdb handled generics in windows, but that was back on Lazarus 1.0. I have been working exclusively on Linux and Raspbian for the past 2 years.

The question then is, if fpc did generate sufficient debug info or if gdb has an issue. (try stabs and dwarf)

will do.
Forgot to mention that gdb itself occasionally crashes when working around this code!

ensure you disable "inlining"

where?

Show quoted text 8 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Martin,

Thanks for the pointers.

I discovered something since I wrote the last email: gdb works (except for occasional failures in generics) if I compile the whole thing (Run | Cleanup and Build ...) in Linux. Lazarus itself is protected so I have to skip the errors. (I just upgraded this laptop to an SSD so the Cleanup and Build runs faster than just-plain Compile on the original HDD ... Yippy!!!). I haven't tried it on Raspbian yet.

Don

Reply by email