Skip to content

Commit

Permalink
STABS emitter: Emit correct type for array descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
dkl committed May 5, 2014
1 parent 335d479 commit cb47a5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Version 0.91.0:
- C backend: A gcc warning was triggered when initializing a global variable with an @addressof expression, taking the address of another global.
- #614: When copying (copy-constructing or assigning) objects of classes extending OBJECT, the lhs' vptr could be overwritten incorrectly, causing the object to have a wrong run-time type.
- 0.90 regression: -g could produce bad stabs info when #includes were used (after closing an #include block, the wrong directive was used to return to the main file), preventing gdb from determining variable types sometimes
- -g will now produce correct stabs info for dynamic array descriptors


Version 0.90.1:
Expand Down
19 changes: 4 additions & 15 deletions src/compiler/edbg_stab.bas
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,11 @@ private function hGetDataType _
select case as const dtype
'' UDT?
case FB_DATATYPE_STRUCT
if( symbIsDescriptor( sym ) = FALSE ) then
if( subtype->udt.dbg.typenum = INVALID ) then
hDeclUDT( subtype )
end if
if( subtype->udt.dbg.typenum = INVALID ) then
hDeclUDT( subtype )
end if

desc += str( subtype->udt.dbg.typenum )
end if
desc += str( subtype->udt.dbg.typenum )

'' ENUM?
case FB_DATATYPE_ENUM
Expand Down Expand Up @@ -992,15 +990,6 @@ sub edbgEmitGlobalVar _
'' data type
desc += hGetDataType( sym )

'' hack to fix the stabs data for global redim-arrays
'' see: http://www.freebasic.net/forum/viewtopic.php?p=117584#117584
#if 1 ''SARG BEGIN
'' workaround in case redim shared : use of back link !!!
if( right(desc, 2) = ":S" ) then
desc = *symbGetDBGName( sym->var_.desc.array ) + ":S" + hGetDataType( sym->var_.desc.array )
end if
#endif ''SARG END

hEmitSTABS( t, desc, 0, 0, *symbGetMangledName( sym ) )

end sub
Expand Down

0 comments on commit cb47a5a

Please sign in to comment.