From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121662 invoked by alias); 14 Nov 2017 14:12:55 -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 121100 invoked by uid 89); 14 Nov 2017 14:12:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1561, interrupt, HContent-Transfer-Encoding:8bit X-HELO: mail-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Nov 2017 14:12:52 +0000 Received: by mail-qk0-f179.google.com with SMTP id o6so24183988qkh.3 for ; Tue, 14 Nov 2017 06:12:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0+ziP7q3ZpRlO3wzH14zACNhhzcALizkLifdqLHfwpE=; b=Yf6Ny2GMMGz7zLglNSzY+b+FtpwRYaaBBHyqgGx/sRwmPXwiT8e+TPmzKDskGy55Sb dNYM2rQvwz/75wXMrugkqf/VcBP6vdh7McFthlMBSbFSc9syF9aliqcJubX90eIP6hl6 fxV4zjU6q0vQhHYNk9hPpqD1Ec2OdVrhVVrqrkVmLGnHjMtNQNOnyn+IA1zvXHAPO6b9 itRp3WiyKvKPuCEOfYjU4lZOhYqkAd5p258pQEoo9OWaqv/erw87hzw8utdbW9VJ7V3n ukkfihvhSZQPPfiCSthaxHz+J8foylR09lvhuAA0Zw0V2nQpB3+45VzHHdWw0xboxU3R dFpQ== X-Gm-Message-State: AJaThX4Lg7MUzAPF7dzhgda/kBr39im26uGtvlAxmc4VhcAp3KlVfCDx DVS6LFpK111oFA8ZJ72s0s9B1eNd2AU= X-Google-Smtp-Source: AGs4zMbErAVQLGI4D9T2ILdGNZ5NQVr9EAGivvma+NXNYO0YrkaExNbgbxmQBjPqJbzdDa810FwImg== X-Received: by 10.55.215.70 with SMTP id m67mr18711994qki.225.1510668770250; Tue, 14 Nov 2017 06:12:50 -0800 (PST) Received: from [192.168.1.105] ([179.154.140.131]) by smtp.gmail.com with ESMTPSA id t93sm12362728qtd.45.2017.11.14.06.12.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2017 06:12:49 -0800 (PST) Subject: Re: [PATCH] Modify Aarch64 prologue analyzer to accept 128-bit registers To: Paul Carroll , Andrew Pinski Cc: "gdb-patches@sourceware.org" References: <1816677702.1219332.1510594086497.ref@mail.yahoo.com> <1816677702.1219332.1510594086497@mail.yahoo.com> From: Luis Machado Message-ID: Date: Tue, 14 Nov 2017 14:12:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00252.txt.bz2 On 11/14/2017 11:41 AM, Paul Carroll wrote: > (Sending again, due to problems with the mailing list not liking my > previous post) > > On 11/13/2017 12:32 PM, Andrew Pinski wrote: >> Hmm,  The normal elf aarch64 ABI says only 64bits is saved.  Is there >> another ABI which says 128bits of the SIMD register is saved? > > Thanks for the comment, Andrew. > In this case, the code in question is an interrupt routine. > As such, it is not following the ABI, except when making calls itself. > When gdb processes the start of the interrupt routine, it finds the > 'stp' with the 128-bit register references and asserts. > That is a problem for debugging embedded applications, and is what this > patch is trying to avoid. > I take it this is RTOS-specific? If so, I can see a couple alternatives. One way would be to patch it in the RTOS-specific file in GDB, keeping the fix contained in the right context instead of in general code that will likely not benefit from it. The second alternative is to augment the code with CFI information so GDB doesn't have to use the prologue analyzers. There will always be a particular combination of instructions GDB won't recognize, especially for custom code that doesn't follow the ABI. The plus side of fixing this on the RTOS code itself is that GDB doesn't have to be patched every time an unknown prologue sequence is encountered. But attempting to debug binaries stripped of symbols and debug information will required GDB to be patched.