mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 07:49:12 +02:00
* ensure that the dwarf file table contains an entry if the current unit
contains any code, even if we cannot generate any debug info for that code (because the default file is file number 1, and if that table is empty some gdb versions crash) git-svn-id: trunk@31335 -
This commit is contained in:
parent
6c9f7b25a9
commit
add015f808
@ -3347,6 +3347,12 @@ implementation
|
||||
begin
|
||||
{ this function will always terminate the lineinfo block }
|
||||
generated_lineinfo := true;
|
||||
{ if this unit only contains code without debug info (implicit init
|
||||
or final etc), make sure the file table contains at least one entry
|
||||
(the main source of the unit), because normally this table gets
|
||||
populated via calls to get_file_index and that won't happen in this
|
||||
case }
|
||||
get_file_index(current_module.sourcefiles.get_file(1));
|
||||
FillChar(lastfileinfo,sizeof(lastfileinfo),0);
|
||||
currfuncname:=nil;
|
||||
currsectype:=sec_code;
|
||||
|
Loading…
Reference in New Issue
Block a user