From: Eric Floehr <eric@floehr.com>
To: gdb@sourceware.org
Subject: Wrong register names when remote debugging
Date: Wed, 13 May 2020 11:41:26 -0400 [thread overview]
Message-ID: <CAJ8AS_ueLiCQGRC7sYXhPL_eVv0pMnX0U32pfOVOnOU0ij4hKg@mail.gmail.com> (raw)
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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
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
next reply other threads:[~2020-05-13 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 15:41 Eric Floehr [this message]
2020-05-13 19:15 ` Eric Floehr
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=CAJ8AS_ueLiCQGRC7sYXhPL_eVv0pMnX0U32pfOVOnOU0ij4hKg@mail.gmail.com \
--to=eric@floehr.com \
--cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).