From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Michael Haupt <michael.haupt@oracle.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: debugging custom array types
Date: Wed, 13 Feb 2013 17:59:00 -0000 [thread overview]
Message-ID: <20130213175858.GA7244@host2.jankratochvil.net> (raw)
In-Reply-To: <F0A8CF7E-F138-4644-895D-FB8D4FAB7DD5@oracle.com>
On Wed, 13 Feb 2013 11:50:34 +0100, Michael Haupt wrote:
> Is there documentation somewhere that explicates which pieces of DWARF gdb
> supports out of the box?
No, read the source.
> <1><5320>: Abbrev Number: 16 (DW_TAG_structure_type)
> <5321> DW_AT_name : (indirect string, offset: 0x177): char_array
> <5325> DW_AT_byte_size : 10 byte block: 97 23 8 94 4 8 2 1e 23 c
> <5330> DW_AT_sibling : <0x5359>
> <2><5334>: Abbrev Number: 10 (DW_TAG_member)
> <5335> DW_AT_name : (indirect string, offset: 0xdc): __hub_reference__
> <5339> DW_AT_type : <0x5c6f>
> <533d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0)
> <2><5340>: Abbrev Number: 10 (DW_TAG_member)
> <5341> DW_AT_name : (indirect string, offset: 0x185): __length__
> <5345> DW_AT_type : <0x2d>
> <5349> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8)
> <2><534c>: Abbrev Number: 10 (DW_TAG_member)
> <534d> DW_AT_name : (indirect string, offset: 0x195): __array__
> <5351> DW_AT_type : <0x5a6c>
> <5355> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
> ...
> <1><5a6c>: Abbrev Number: 11 (DW_TAG_array_type)
> <5a6d> DW_AT_type : <0x4f11>
> <5a71> DW_AT_byte_size : 8 byte block: 97 23 8 94 4 8 2 1e
> <5a7a> DW_AT_data_location: 3 byte block: 97 23 c (DW_OP_push_object_address; DW_OP_plus_uconst: 12)
> <5a7e> DW_AT_sibling : <0x5a91>
> <2><5a82>: Abbrev Number: 14 (DW_TAG_subrange_type)
> <5a83> DW_AT_type : <0x2d>
> <5a87> DW_AT_upper_bound : 8 byte block: 97 23 8 94 4 8 1 1c (DW_OP_push_object_address; DW_OP_plus_uconst: 8; DW_OP_deref_size: 4; DW_OP_const1u: 1; DW_OP_minus)
Even archer-jankratochvil-vla branch does not support dynamic structures:
dwarf2read.c:
read_structure_type:
attr = dwarf2_attr (die, DW_AT_byte_size, cu);
if (attr)
{
TYPE_LENGTH (type) = DW_UNSND (attr);
}
That DW_TAG_array_type/DW_TAG_subrange_type with dynamic DW_AT_upper_bound
should be supported but not as a directly embedded part of struct.
BTW archer-jankratochvil-vla is generally wrong, its reimplementation was
discussed in:
plan: VLA (Variable Length Arrays) and Fortran dynamic types
http://sourceware.org/ml/gdb/2012-11/msg00094.html
Regards,
Jan
next prev parent reply other threads:[~2013-02-13 17:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 16:51 Michael Haupt
2013-02-11 17:02 ` Jan Kratochvil
2013-02-13 10:50 ` Michael Haupt
2013-02-13 17:52 ` Tom Tromey
2013-02-14 13:27 ` Michael Haupt
2013-02-14 16:51 ` Tom Tromey
2013-02-13 17:59 ` Jan Kratochvil [this message]
2013-02-14 13:37 ` Michael Haupt
2013-02-14 13:44 ` Jan Kratochvil
2013-02-12 19:28 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130213175858.GA7244@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=michael.haupt@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox