openMSX "software" breakpoint

Pagina 2/2
1 |

Van Grauw

Ascended (8457)

afbeelding van Grauw

29-09-2019, 12:35

akumajo wrote:

Sometimes something simple is more powerful, the way you debug is interesting and you have to get there, but what is asked in this topic is a simple principle of introducing a breakpoint by opcode.

Quote:

is there any (invalid) opcode sequence that triggers a breakpoint in openMSX debugger

So we understand that this is not currently possible with the openMSX debugger and that this solution will not be implemented to not "mimic" other emulators (in fact it is the debugger, not the emulator, that detects this opcode) but the solution is to use a "in a,(2eh)" opcode.

I find it less convenient and as I said, it does not allow to use the debugging functions offered by ASMSX.

I really don’t understand what you find “less convenient” or “less simple”.

So you wish you could type “ld b,b” instead of “in a,(2eh)”, that’s it?

debug set_condition {[peek [reg pc]] == 0x40}

There. It’s slow though. I don’t understand why this would be better for you.

Van akumajo

Resident (34)

afbeelding van akumajo

29-09-2019, 13:25

Thank you Grauw for your answer. I've not tried yet.
When you say "It's slow though", it's the debug condition "peek" compared to debug "set_watchpoint read_io" ?

What I find less practical is having to set a breakpoint every time I re run the program. With BiFi's method you can set a message for the debugger too... But no matter, the important thing is to be able to discuss the topic of debugging and share the different techniques.

Van Grauw

Ascended (8457)

afbeelding van Grauw

29-09-2019, 19:08

The set_condition type of breakpoint evaluates after every instruction, while set_watchpoint evaluates only when the specified I/O port is accessed, that's why it's so very slow. This is also mentioned in the documentation.

You don't need to set the watchpoint every time you run the program, simply put it in an openmsx.tcl-file and pass that as a command line option to openMSX:

openmsx -script openmsx.tcl

I also recommend to add the following:

set throttle off
after time 10 "set throttle on"

This will speed up the boot process every time you do a test run.

Van akumajo

Resident (34)

afbeelding van akumajo

30-09-2019, 07:44

Thank you for all these explanations and for taking the time to answer with examples. Although I know that there is good documentation, sometimes some examples are better than a long speech.
I tried with "ld b,b" and with the "in port", it is very useful. Smile

Pagina 2/2
1 |