From: "S. Champailler" <schampailler@skynet.be>
To: gdb@sourceware.org
Subject: 6502 support in GDB
Date: Fri, 7 Jan 2022 10:36:39 +0100 (CET) [thread overview]
Message-ID: <34b35bd0.606c.17e33e5b812.Webtop.188@skynet.be> (raw)
Hello,
I was wondering if it is "easy" to add support for a CPU in GDB.
Specifically the 6502.
I'm mostly interested in debugging some assembly code I have written.
My use case
is : I write some assembly, compile it, run it in an emulator and use
GDB to remote
connect to that emulator and do remote debugging.
Before posting this I've checked the mailing list archives and the git
history and it seems
it has never been done before. I've read the documentation a bit and swa
one talks about
adding an architecture (wiki page of the "internals" manual). Is that
the right place to start ?
I had a few questions:
- how big an effort is it ? Are we talking about weeks, months ? I bet
months. This will
be a hobby project, so it has some chances of failing if it proves too
hard to do.
- I understand I have to write a disassembler at the very least, is that
correct ?
- I understand I have to modify the emulator to provide a GDB remote
access, correct ?
- I've checked DWARF but I still don't get how to connect my ASM source
to the actual disassembly,
does GDB provide help here ? (that is, when I'm pointing at my
assembly source code line,
I'd like to know to which instruction it corresponds in the 6502 code;
same stuff with symbols)
Best regards,
Stéphane.
next reply other threads:[~2022-01-07 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 9:36 S. Champailler [this message]
2022-01-07 10:43 ` Andrew Burgess
2022-01-07 10:58 ` S. Champailler
2022-01-07 16:53 ` Martin Simmons
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=34b35bd0.606c.17e33e5b812.Webtop.188@skynet.be \
--to=schampailler@skynet.be \
--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).