From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67569 invoked by alias); 16 Jan 2020 14:52:14 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 67560 invoked by uid 89); 16 Jan 2020 14:52:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_50,SPF_SOFTFAIL autolearn=no version=3.3.1 spammy=HTo:U*gdb, HX-Spam-Relays-External:2607, HX-Spam-Relays-External:f8b0, H*RU:2607 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Jan 2020 14:52:03 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1is6V8-00030q-0W for gdb@sourceware.org; Thu, 16 Jan 2020 09:52:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53976) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1is6V6-0003Bs-Vy for gdb@gnu.org; Thu, 16 Jan 2020 09:52:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is6V6-0002yT-12 for gdb@gnu.org; Thu, 16 Jan 2020 09:52:00 -0500 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:43969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1is6V5-0002xc-Qq for gdb@gnu.org; Thu, 16 Jan 2020 09:51:59 -0500 Received: by mail-qt1-x82f.google.com with SMTP id d18so19042709qtj.10 for ; Thu, 16 Jan 2020 06:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=ENZC+RGe7FGmJ1V+UU8Pu+0mYPygUQ861ELuYOZjs3o=; b=nrVD3tYriZ8pOD7bjV1OuISQE/9WUCq+E+pUpif89DvgM28gJCVhZvW7/H5FV5V9PC VUckUAZh5UrQxW3qQ2aBkqFEwBoN3fSRQqE1ozlw5bblANw3xF0TlDJy7Hr6y8Vi7Vs8 Gg3HfRt+wRK7ak3/c2IMUI0RXX2y6HXUL8BnC458zqc7uwutjM5AEjYFuR8r5FX04VKD z5LCoPMWYjaP4+PFu1Y6n5kJBDz6MCPggdZNToTmQFExxeWGUB0LM12+A1eR/OcWqHYY I6KOSRq0EfOo+BD9aMB0ODwFOv70OyBbSqx1jLSP3TnXcPzHJpxxzAsr97zJkLz1wDJe HBeQ== Received: from [192.168.0.185] ([191.34.153.145]) by smtp.gmail.com with ESMTPSA id r205sm10229481qke.34.2020.01.16.06.51.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jan 2020 06:51:57 -0800 (PST) Subject: Re: mode processor mode switch To: =?UTF-8?Q?Jirka_Koutn=c3=bd?= , gdb@gnu.org References: From: Luis Machado Message-ID: <763defc1-90ae-ceda-61db-493ec81ca36d@linaro.org> Date: Thu, 16 Jan 2020 14:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00020.txt.bz2 Hi, On 1/14/20 8:58 AM, Jirka Koutný wrote: > Hello, > > I have a 32-bit elf executable which at some point switches to long mode > (kernel is 64-bit). Is there a way to tell gdb about the .code32/64 > directives? Because expectedly the switch messes up disassembly and > stepping. > > Thank you > Jirka > Unfortunately i don't think there is a good way to achieve this with the current implementation. You could teach GDB about the quirks in the architecture, but it sounds better to have a more general solution. I'm working on making this more flexible though, since i have a need to make the architecture information per-thread, at least the target description with the registers and types. But no ETA yet.