From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15338 invoked by alias); 6 Oct 2017 21:18:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15327 invoked by uid 89); 6 Oct 2017 21:18:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.1 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=H*c:alternative, H*c:HHH X-HELO: EUR02-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr00100.outbound.protection.outlook.com (HELO EUR02-AM5-obe.outbound.protection.outlook.com) (40.107.0.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Oct 2017 21:18:43 +0000 Received: from VI1PR0501MB2861.eurprd05.prod.outlook.com (10.172.11.151) by VI1PR0501MB2864.eurprd05.prod.outlook.com (10.172.12.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 6 Oct 2017 21:18:39 +0000 Received: from VI1PR0501MB2861.eurprd05.prod.outlook.com ([fe80::1105:ec3d:d331:ab8e]) by VI1PR0501MB2861.eurprd05.prod.outlook.com ([fe80::1105:ec3d:d331:ab8e%16]) with mapi id 15.20.0077.016; Fri, 6 Oct 2017 21:18:39 +0000 From: Peeter Joot To: "gdb-patches@sourceware.org" Subject: Re: review request: implementing DW_AT_endianity Date: Fri, 06 Oct 2017 21:18:00 -0000 Message-ID: References: In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=peeter.joot@lzlabs.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR0501MB2864;6:HfBqi2Z/+f3n8IhJN1dH2SOnajzlWukoBEF7WWzxoRoZqB2ZBob3/9hHZECkKWnw+WufucW2p6qGxULEPQbuEXGhIItqyBDdM005ScyIUi3JHkza/g7yVr01jmPqjaR/eJfyaGSARF/Le0CKQuqxttrHnptUMF3GZtfUGsktc8T3nCzBfQJbyETYagu35LNlhLz/9XvVX0Vj3c5GN1cxg1J8HWEmxifIYqSZb95jUyF90rrb3kvycIsgPyGo9NE8bQwEvbGn8X+DRY6TPGXvXkzE86IA68bzhfiDsspqPgoBILg8HRfubthW8TVX0UaDe6UHDs7knGdgKOC5RYP6lw==;5:5381cC+a37AIZraFtEFosqCv+h7k0fJgCjYee3/g/CiIgo97Xt4vzn7TfaspWYXqgjOQhNKsRw22FHBEFHTXjZxYi+r+VR6Mo6sKsaqudwF1OT2JD8haZp3PuP2K4+EEvDo38y3RObCDiLuJqYMOBg==;24:aP/XPn+13TWe/YASvnUoZ2y06wB36l9CYU0I6ihelfOu91uiP0GdVa4C2muYR3z24g1cSr1pGsinsIsEOKFLA2hQiu/MwmdGPqOcaPSfSko=;7:MoXm0garPtmHjzbkrqs9oWSkEIHOhyxMz01Uc+MIV/4Hqnk4zq9xOucIHz86MaUxRlTlGCxgiwt31iR9VCZvnbJi1eGymNnL9q+QszQQc9DCF2JvsXP755G9ZAcWuwU9cgB9DBfJh8Xdm5sFaF7sk/O+JUgIuEB+DgwKXVkZE3JWTJYNa22OlXciWqRaVi2TvrdH40ZZiIS0wFQO7B/Ke/yCbv/eR5Txd1E20Pup4u4= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 85bf8aef-c408-4b2c-fa3b-08d50cffd0a0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:VI1PR0501MB2864; x-ms-traffictypediagnostic: VI1PR0501MB2864: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:VI1PR0501MB2864;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:VI1PR0501MB2864; x-forefront-prvs: 0452022BE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(376002)(346002)(39830400002)(189002)(199003)(2351001)(14454004)(2900100001)(68736007)(101416001)(316002)(105586002)(76176999)(6506006)(81156014)(19627405001)(106356001)(6916009)(3280700002)(8676002)(9686003)(5660300001)(33656002)(5640700003)(478600001)(229853002)(86362001)(8936002)(3660700001)(2906002)(6606003)(50986999)(97736004)(99286003)(81166006)(66066001)(74316002)(2501003)(54896002)(2950100002)(6246003)(25786009)(3846002)(6436002)(189998001)(6116002)(102836003)(54356999)(7696004)(5250100002)(53936002)(55016002)(2940100002)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0501MB2864;H:VI1PR0501MB2861.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: lzlabs.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: lzlabs.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2017 21:18:39.7947 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be5a2f53-aa84-427c-8fbd-c2d71558a7a8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2864 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-10/txt/msg00146.txt.bz2 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 descri= bing what I wanted to address doesn't work (which I noticed only after send= ing 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 inapprop= riately: Breakpoint 1, print_scalar_formatted (valaddr=3D0x1e25260 "\003", type=3D0x= 1ce2670, options=3D0x7ffe20ac7490, size=3D0, stream=3D0x1c95a40) at ../../binutils-gdb/gdb/printcmd.c:355 355 struct gdbarch *gdbarch =3D get_type_arch (type); (gdb) p *type->main_type $1 =3D {code =3D TYPE_CODE_INT, flag_unsigned =3D 0, flag_nosign =3D 0, fla= g_stub =3D 0, flag_target_stub =3D 0, flag_static =3D 0, flag_prototyped =3D 0, flag_incomplete =3D 0, flag_varargs =3D 0, flag_ve= ctor =3D 0, flag_stub_supported =3D 0, flag_gnu_ifunc =3D 0, flag_fixed_instance =3D 0, flag_objfile_owned =3D 1, flag_endianity_big = =3D 1, flag_endianity_little =3D 0, flag_declared_class =3D 0, flag_flag_enum =3D 0, type_specific_field =3D TYPE_SPECIFIC_NONE, nfields= =3D 0, name =3D 0x1caacbc "int", tag_name =3D 0x0, owner =3D { objfile =3D 0x1c98620, gdbarch =3D 0x1c98620}, target_type =3D 0x0, fld= s_bnds =3D {fields =3D 0x0, bounds =3D 0x0}, type_specific =3D { cplus_stuff =3D 0x0, gnat_stuff =3D 0x0, floatformat =3D 0x0, func_stuf= f =3D 0x0, self_type =3D 0x0}, dyn_prop_list =3D 0x0} This is when I'm printing a native endian integer, so do not want to have f= lag_endianity_big set. I'm guessing that main_type is not the place for this flag, but it has to b= e in struct type instead. Is that guess on the right track? Peeter