|Re: [hatari-devel] Debugger features ideas/wishes|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: hatari-devel <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] Debugger features ideas/wishes
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Fri, 10 Sep 2021 09:32:53 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=7eT3n2MATUEgpm0xrWPqsUwAfFnxBQBJZSEDfnvJjNA=; b=IzWaV5qT/uV/d7iKWguKm7wchOCsVTHlTW5mH1H8L9r2rVJ1Xw2JUY8oC8XPZHAVWl TDOtP8o2WloE0kqaYGy7+3tSNUtuDEZpxvrj+0sKPM+OGw0PjsLmEftWaQ6Z5IJ1E/zy 0XAXduXdX0Ue/uYZ6a8GyxoLhHR2LZDR+gERRvnPW0hvvSFG6xw9xEGPvigoqpjgG9Ec Hh8WEGQIV2t2KJgGU3mVssxgtf+vFr3S2Y7mC1TQg3BpfNg4vMNkAUzaV8tua2G+nPUt 7aN0O1hdeZTiLhg/jxa3jcNGqoWlDngXcLFcT10Q12QisY/JUFZoirEpzFXfDlXcXjTa JXeg==
On Thu, Sep 9, 2021 at 10:45 PM Miro Kropáček <miro.kropacek@xxxxxxxxx> wrote:
> On Thu, 9 Sept 2021 at 20:00, Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:
>> > * debugger config option for disassembly offset
>> When using fixed offset from PC (say "pc-16"),
>> instruction at PC was incorrect in disassembly
>> more often than not.
>> (This was easy to test with my patch in the other
>> mail that allows setting breakpoint for every
>> debug symbol address.)
>> Therefore Miro, this is definitely not a feature
>> to be enabled by default, although it has worked
>> well enough for you. I'm not sure it's even
>> worth pushing to Hatari repo. :-(
> I'm sorry, I still haven't gotten into testing this. If the results are less than encouraging, perhaps this can't be solved by a simple patch. If I were implementing this, I would certainly try to cheat a little -- for instance, there's a pretty big probability that the past N instructions are located "above" current PC. So I would take the closest one to the top of the screen border and go with disassembly from there (naturally, showing only the portion which fits into the screen).
> If it was a long jump directly onto the breakpoint then this wont work but maybe the approach above will flip the statistics from "more often than not". :) I'm sure there are other heuristics to take into account, this was just the first thing which came into my mind.
I think what Eero says about labels and highlighting is a powerful concept.
I mentioned scrolling the disassembly back and forth (realtime). Your eyes
are an extreme quantum supercomputer for catching things. All you need is
a 'C=64 simple' and convenient disassembler/monitor. Bcc and Jmp instructions
with simple addressing modes usually point to good opcodes. Also, one does
come across data (variables, modified code, etc) between opcodes. A little
practice with scrolling and you will be a wizzard at disassembly.