Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Peeter Joot <peeter.joot@lzlabs.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: review request: implementing DW_AT_endianity
Date: Fri, 06 Oct 2017 21:18:00 -0000	[thread overview]
Message-ID: <VI1PR0501MB2861AC93979CE9FF3FB57AF99C710@VI1PR0501MB2861.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <VI1PR0501MB28618180080787DD22117A459C710@VI1PR0501MB2861.eurprd05.prod.outlook.com>

It looks like any talk of contribution (and perhaps review) is premature.  My initial test only had a big-endian structure, and the one I wrote describing what I wanted to address doesn't work (which I noticed only after sending my review request email).  The big-endian tagged structure does show up properly, but what I have done messes up the display of any little endian integers.  It appears that I end up setting my new big-endian flag inappropriately:


Breakpoint 1, print_scalar_formatted (valaddr=0x1e25260 "\003", type=0x1ce2670, options=0x7ffe20ac7490, size=0, stream=0x1c95a40)

    at ../../binutils-gdb/gdb/printcmd.c:355

355       struct gdbarch *gdbarch = get_type_arch (type);

(gdb) p *type->main_type

$1 = {code = TYPE_CODE_INT, flag_unsigned = 0, flag_nosign = 0, flag_stub = 0, flag_target_stub = 0, flag_static = 0,

  flag_prototyped = 0, flag_incomplete = 0, flag_varargs = 0, flag_vector = 0, flag_stub_supported = 0, flag_gnu_ifunc = 0,

  flag_fixed_instance = 0, flag_objfile_owned = 1, flag_endianity_big = 1, flag_endianity_little = 0, flag_declared_class = 0,

  flag_flag_enum = 0, type_specific_field = TYPE_SPECIFIC_NONE, nfields = 0, name = 0x1caacbc "int", tag_name = 0x0, owner = {

    objfile = 0x1c98620, gdbarch = 0x1c98620}, target_type = 0x0, flds_bnds = {fields = 0x0, bounds = 0x0}, type_specific = {

    cplus_stuff = 0x0, gnat_stuff = 0x0, floatformat = 0x0, func_stuff = 0x0, self_type = 0x0}, dyn_prop_list = 0x0}


This is when I'm printing a native endian integer, so do not want to have flag_endianity_big set.


I'm guessing that main_type is not the place for this flag, but it has to be in struct type instead.  Is that guess on the right track?


Peeter



  reply	other threads:[~2017-10-06 21:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 15:06 Peeter Joot
2017-10-06 21:18 ` Peeter Joot [this message]
2017-10-08 18:41 ` Simon Marchi
2017-10-09  9:11   ` Peeter Joot
2017-10-09 12:12     ` Simon Marchi
2017-10-10 18:16       ` Peeter Joot
2017-10-10 18:33         ` Simon Marchi
2017-10-10 18:38           ` Peeter Joot
2017-10-10 18:48             ` Simon Marchi
2017-10-10 19:38               ` Peeter Joot
2017-10-10 23:30         ` [PATCH] " Peeter Joot
2017-10-11  2:29           ` Peeter Joot
2017-10-12 20:23           ` Simon Marchi
2018-02-22 17:20           ` Tom Tromey
2018-02-22 17:39             ` Peeter Joot
2019-02-13 13:12               ` Tom Tromey
2019-02-13 14:11                 ` Peeter Joot
2019-02-13 14:47                   ` Pedro Alves
2019-02-13 16:19                     ` Pedro Alves

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=VI1PR0501MB2861AC93979CE9FF3FB57AF99C710@VI1PR0501MB2861.eurprd05.prod.outlook.com \
    --to=peeter.joot@lzlabs.com \
    --cc=gdb-patches@sourceware.org \
    /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