16 May 2010 19:04
Re: Patch for pascal-dynamic arrays
On Sun, 2010-05-16 at 14:04 +0200, Jonas Maebe wrote: > On 15 May 2010, at 23:44, Jan Kratochvil wrote: > > > But if the "allocation" is just an internal > > compiler issue which should be hidden by the same compiler at the DWARF level. > > Therefore I would guess to use some: > > drop DW_TAG_array_type -> DW_AT_allocated > > DW_TAG_subrange_type -> DW_AT_upper_bound: > > DW_OP_push_object_address > > DW_OP_deref > > DW_OP_dup > > DW_OP_bra allocated > > DW_OP_lit0 > > DW_OP_skip end > > allocated: > > DW_OP_lit8 > > DW_OP_minus > > DW_OP_deref > > end: > > I agree. Joost, I've attached a patch for FPC's DWARF writer to fix it. I can't test whether it works (the dumped DWARF info looks ok though), because I can't get gdb/F-13 to build: It doesn't work. That's because type_length_get() (gdbtypes.c) does not return 0 when the high and low-bound are equal to each other. Instead it returns the element-size. Then allocate_value_lazy tries to read element-size bytes from the base-address (being 0x0) -> av.(Continue reading)
RSS Feed