Bug 25101

Summary: Assertion `TYPE_NFIELDS (type) > 0' failed
Product: gdb Reporter: Martin <gdb.bugs>
Component: gdbAssignee: Not yet assigned to anyone <unassigned>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: P2    
Version: 8.3.1   
Target Milestone: ---   
Host: Target:
Build: win 64 Last reconfirmed:

Description Martin 2019-10-14 23:03:29 UTC
"&"gdbtypes.c:2160: internal-error: type* resolve_dynamic_struct(type*, property_addr_info*): Assertion `TYPE_NFIELDS (type) > 0' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\n"
&"\nThis is a bug, please report it."

To reproduce compile the below with fpc 3.0.4
using command-line options -gw3 for dwarf 3

Presumingly gdb does dislike the fact that the structure has no members?
However there is nothing in the DWARF spec (not that I have found) that prohibits this.


program Project1;
var
  a: IUnknown;

begin
  a:= nil;
end.
Comment 1 Martin 2019-10-14 23:14:05 UTC
To get the error do a
ptype a

or 
p a