From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id D18453851C0F for ; Wed, 13 May 2020 19:15:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D18453851C0F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=floehr.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=eric@floehr.com Received: by mail-lj1-x236.google.com with SMTP id u15so850657ljd.3 for ; Wed, 13 May 2020 12:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=floehr-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Ii1LEYC/cs//MobEYoEla/j6r58fN0ojsVIcl8hJids=; b=lmIRpeof1Tx63Qubd2Bhqw21/Qs/fE32KHOUWiXFEBKXMNFhB1Re5irnPwvU5JZAz5 3mWHnLs6Y0TBgIbkiOE48ojEmJt6rhqevkY4RTLVN+jc8WW6EILB8MAro3C4XGKj5QAF rm9VY1rPIRm+qJBLaC+n9A4Ed14Q+Sbx+gY1Z7HG1g8lX5BMktQZdZhhYfWpsi+GI4BM eVY42zw9MXEo1Wg5dSrL5g7f+DIyffufeyeHSEUahqEZRLCfiWTRHPVu9+HJsUvs6BVP hsZVXt6ZtvPsmkn6Gw7oisGk5X095JEzY1pER+h2ia3Bt34+QgD5ifojJEDmmPyAZOyS FZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Ii1LEYC/cs//MobEYoEla/j6r58fN0ojsVIcl8hJids=; b=kwy21eMCgSOq+N4059E5y9mBNMlVv/sD6e78386hEXRJ628fr2snubHj8Aj+ka9PxY 8uaieVoq1yGTjmH9OCvJANDivrYuMigsBSH5juIQBv9s153bROGIYJK03kDGdkjcbKpg pCt1WxtR16yZQ35gfuVwpAkSn7/hbJq7E9vw6LFCJfzul+pBFBfZZR2zMCeZ5KpGJsKX 4N87Tb0GwrH2PbNU0Qywsu8p1BWWcLrMeuggySWeO+OfIR12hehcX3aClT3GoU4f5CMW N+HAPUmR8fGxENsNjly8LdqahI5Y4PfZ9YDiN+C7YvhUDeok6+fxZy1YPoA1RMwc6XyD uPyA== X-Gm-Message-State: AOAM533uQsOjmbumez3tUX0Z6klicCWUhDGuMRPeq2CdddQTxHxfYgKl PIHsbJlDkEQTRAhJPeVRHG/P0cdfK3aDloPzaX5pCjYSb1Y= X-Google-Smtp-Source: ABdhPJz3wZccjWT54lwrV1ug59dFmeTAe/sAO4LAc+7uOAxKYHhjvsHo6Scc2NfL7yYDrLHmisdayR2wMAeFeN/RZkg= X-Received: by 2002:a2e:994a:: with SMTP id r10mr347861ljj.105.1589397355100; Wed, 13 May 2020 12:15:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Floehr Date: Wed, 13 May 2020 15:15:43 -0400 Message-ID: Subject: Re: Wrong register names when remote debugging To: gdb@sourceware.org X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 19:15:58 -0000 Well that was silly :-) The problem was I was still running the non-multiarch "gdb" versus "gdb-multiarch" command. Changing to running "gdb-multiarch" solved the problem. Cheers, Eric On Wed, May 13, 2020 at 11:41 AM Eric Floehr wrote: > Hi, > > Running Ubuntu 20.04 with st-util and gdb-multiarch. I am new to remote > debugging with gdb, but examples show correct register names. When I > connect remotely I see the correct register values, but with x86 register > names: > > st-util output: > st-util 1.6.0 > 2020-05-13T11:28:43 INFO common.c: Loading device parameters.... > 2020-05-13T11:28:43 INFO common.c: Device connected is: F303 high density > device, id 0x10036446 > 2020-05-13T11:28:43 INFO common.c: SRAM size: 0x10000 bytes (64 KiB), > Flash: 0x80000 bytes (512 KiB) in pages of 2048 bytes > 2020-05-13T11:28:43 INFO gdb-server.c: Chip ID is 00000446, Core ID is > 2ba01477. > 2020-05-13T11:28:43 INFO gdb-server.c: Listening at *:4242... > 2020-05-13T11:28:59 INFO gdb-server.c: Found 6 hw breakpoint registers > 2020-05-13T11:28:59 INFO gdb-server.c: GDB connected. > 2020-05-13T11:30:06 ERROR gdb-server.c: cannot recv: -2 > 2020-05-13T11:30:06 INFO gdb-server.c: Listening at *:4242... > > gdb connection: > GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1 > Copyright (C) 2020 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > . > Find the GDB manual and other documentation resources online at: > . > > For help, type "help". > Type "apropos word" to search for commands related to "word". > (gdb) target extended-remote :4242 > Remote debugging using :4242 > warning: No executable has been specified and target does not support > determining executable automatically. Try using the "file" command. > 0x00000000 in ?? () > (gdb) load main.elf > Loading section .text, size 0x1c lma 0x8000000 > Start address 0x08000000, load size 28 > Transfer rate: 208 bytes/sec, 28 bytes/write. > (gdb) continue > Continuing. > ^C > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x00000000 in ?? () > (gdb) info registers > eax 0x1cb5d1 1881553 > ecx 0x0 0 > edx 0x0 0 > ebx 0x0 0 > esp 0x0 0x0 > ebp 0x0 0x0 > esi 0x0 0 > edi 0xdeadbeef -559038737 > eip 0x0 0x0 > eflags 0x0 [ ] > cs 0x0 0 > ss 0x0 0 > ds 0x0 0 > es 0x20080000 537395200 > fs 0xffffffff -1 > gs 0x8000010 134217744 > (gdb) > > Any thoughts on what is going on? > > Thanks! > Eric > > > >