public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* 6502  support in GDB
@ 2022-01-07  9:36 S. Champailler
  2022-01-07 10:43 ` Andrew Burgess
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: S. Champailler @ 2022-01-07  9:36 UTC (permalink / raw)
  To: gdb


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-07 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07  9:36 6502 support in GDB S. Champailler
2022-01-07 10:43 ` Andrew Burgess
2022-01-07 10:58 ` S. Champailler
2022-01-07 16:53 ` Martin Simmons

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).