Bug 25101 - Assertion `TYPE_NFIELDS (type) > 0' failed
Summary: Assertion `TYPE_NFIELDS (type) > 0' failed
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 8.3.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-14 23:03 UTC by Martin
Modified: 2019-10-14 23:14 UTC (History)
0 users

See Also:
Host:
Target:
Build: win 64
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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