Main Menu

Glitches

References/Resources

Affiliates

Technical

Search Wiki

Toolbox

Difference between revisions of "Breakpoint"
 Page | Discussion | View source | History

From Glitch City Laboratories

Jump to: navigation, search
[checked revision][checked revision]
Line 1: Line 1:
A '''breakpoint''' is a state in the flow of program code at which a specific address is read, written to, or run. For a Game Boy system, it is an allocation of anywhere within the [http://gameboy.mongenel.com/dmg/asmmemmap.html Game Boy memory areas] ($0000-FFFF) referred to as a two byte pointer. Sometimes, these pointers are banked and referred to as a three byte pointer (meaning that the same pointer can represent a different location in memory); so the breakpoint may be represented in form (Bank):(Pointer).
+
A '''breakpoint''' is a state in the flow of program code at which a specific address is read, written to, jumped to, or run. For a Game Boy system, it is an allocation of anywhere within the [http://gameboy.mongenel.com/dmg/asmmemmap.html Game Boy memory areas] ($0000-FFFF) referred to as a two byte pointer. Sometimes, these pointers are banked and referred to as a three byte pointer (meaning that the same pointer can represent a different location in memory); so the breakpoint may be represented in form (Bank):(Pointer).
  
 
When debugging, it can be useful to set a breakpoint to analyse a specific part of the programming code (known as a subroutine); like the hardware registers at that point, what the code reads, and to find out what the code does in terms of the memory.
 
When debugging, it can be useful to set a breakpoint to analyse a specific part of the programming code (known as a subroutine); like the hardware registers at that point, what the code reads, and to find out what the code does in terms of the memory.

Revision as of 10:13, 10 September 2019

A breakpoint is a state in the flow of program code at which a specific address is read, written to, jumped to, or run. For a Game Boy system, it is an allocation of anywhere within the Game Boy memory areas ($0000-FFFF) referred to as a two byte pointer. Sometimes, these pointers are banked and referred to as a three byte pointer (meaning that the same pointer can represent a different location in memory); so the breakpoint may be represented in form (Bank):(Pointer).

When debugging, it can be useful to set a breakpoint to analyse a specific part of the programming code (known as a subroutine); like the hardware registers at that point, what the code reads, and to find out what the code does in terms of the memory.

Setting breakpoints on BGB

Breakpoints1.png

In the context of arbitrary code execution, this method may allow new instances of arbitrary code execution to be discovered if the address range is specified within RAM (e.g. 8000-FEFF).

In the below image, the debugger has automatically highlighted WRA1:D163 following the use of glitch item 8F (0x5D). This means (because "on execute" was checked), the game is running D163, which classes as arbitrary code execution as D163 is a RAM address; specifically the values here are the party Pokémon data, but in this case they are interpreted as GBZ80 programming language instructions. Which each value (00-FF) corresponds with can be found on The Big HEX List.

Breakpoints2.png