View Issue Details

IDProjectCategoryView StatusLast Update
0026209LazarusDebuggerpublic2015-02-01 09:14
ReporterJuha ManninenAssigned ToMartin Friebe 
Status closedResolutionfixed 
PlatformOSWindowsOS Version7
Product Version1.2.2Product Build 
Target Version1.6Fixed in Version1.5 (SVN) 
Summary0026209: Debugger error when running a program with an unused function just before main "begin"
DescriptionLazarus is installed from the official 1.2.2 download package for Windows.
The error is:
The GDB command:
"-break-delete 7"
did not return any result.

A demo program is attached. It is my testbed for code snippets and does not do anything sensible.
See Steps To Reproduce for details.
Steps To ReproduceRun the attached program. Debugger gives an error at once.
However you can prevent the error by doing either of the following:

1. Uncomment the line
  //nodrv := StripFileDrive(s);
 so that StripFileDrive function is used.

2. Move StripFileDrive function above the CalcNextUpdTime function. CalcNextUpdTime is already used.

This means the error happens only when a function just above the main program body is not used.
TagsNo tags attached.
Fixed in Revision47567
Attached Files


related to 0015281 assignedFlorian FPC Internal linker writes DW_AT_low_pc = 0 and DW_AT_high_pc = 0 for unused methods. This info must be striped. 
has duplicate 0026470 resolvedMartin Friebe Lazarus Debugger cannot set breakpoint when running 


Juha Manninen

2014-05-22 13:32

developer (1,837 bytes)

Martin Friebe

2014-05-25 14:13

manager   ~0075228

It appears to be a mix of 2 issues

1) The actual issue seems with the build in linker of fpc (windows).
Compile with -Xe and the error does not happen.
probably 0015281

2) I will look into the possibility of smarten up the IDE dbg startup code (it re-uses a breakpoint, that already failed, this is no problem, unless the above bug is happening at the same time)

As a workaround compile with -Xe

Martin Friebe

2015-01-31 00:17

manager   ~0080694

Please test and close if ok

Juha Manninen

2015-02-01 09:14

developer   ~0080707

Thanks Martin.

Issue History

Date Modified Username Field Change
2014-05-22 13:30 Juha Manninen New Issue
2014-05-22 13:30 Juha Manninen Status new => assigned
2014-05-22 13:30 Juha Manninen Assigned To => Martin Friebe
2014-05-22 13:32 Juha Manninen File Added:
2014-05-25 14:13 Martin Friebe Note Added: 0075228
2014-05-25 14:13 Martin Friebe Relationship added related to 0015281
2015-01-26 01:26 Martin Friebe Relationship added related to 0026470
2015-01-27 02:30 Martin Friebe Relationship replaced has duplicate 0026470
2015-01-31 00:17 Martin Friebe Fixed in Revision => 47567
2015-01-31 00:17 Martin Friebe LazTarget - => 1.6
2015-01-31 00:17 Martin Friebe Note Added: 0080694
2015-01-31 00:17 Martin Friebe Status assigned => resolved
2015-01-31 00:17 Martin Friebe Fixed in Version => 1.5 (SVN)
2015-01-31 00:17 Martin Friebe Resolution open => fixed
2015-01-31 00:17 Martin Friebe Target Version => 1.6
2015-02-01 09:14 Juha Manninen Note Added: 0080707
2015-02-01 09:14 Juha Manninen Status resolved => closed