modus
Menu
On this page

The entry debugger_window

The source src/modules/system/debugger_window built with the setting DRAWING_THROUGH_MODULE=true. The text after this paragraph is the comment of that source.

The window of the debugger: the threads, the stack, the variables, the source lines and the memory of a process, with no line to type in the console.

What it is for. The service debugger holds the debug access to one process and serves its exports. The console reaches them by commands. This process reaches the same exports through a connection of its own, and shows their rows in one window: a developer follows a thread with a key or a click for each act.

Start: the start menu, or start("debugger_window"). Type the name of a process and press Enter: the window attaches to it.

Grants: Connect, for a connection to the service debugger and to no other service; Image, to read the description of the exports of that service in the boot image; Acts_For_Principal, because the service debugs a process only for a caller that acts for the principal. It holds no right over a process: the service does, and the root service decides which process a caller can debug.

What a reader sees. A window that the principal resizes, laid out by the layout tree of modus:layout. In the top band: the name field, or, with a process attached, a state label with the process and the state of its chosen thread, the debug place field and its three buttons. Under it two panes, with a divider that a drag moves: at the left the threads and the breakpoints; at the right the source line of the chosen frame, the memory view, the stack of the chosen thread and the variables of the chosen frame, in columns. Then the status band: what the last act did, and how the debug place field reads its text. The action bar at the bottom names the keys; a press on an item does what its key does, and the items that do not fit are behind its button "more".

Keys, with a process attached and no focus in the field:

  • up, down: the thread. page up, page down: the frame.
  • h: hold the thread. r: let it run. c: let each thread run.
  • s: one instruction. l: one line. o: one line, over each call.
  • b: a breakpoint at the source line of the chosen frame. 0 to 3: remove the breakpoint with that number.
  • g: the registers of the chosen thread, or its variables again.
  • d: detach. escape: the keys leave the debug place field.

The debug place field: break at, watch and memory take its text, as break_at, watch and memory take it in the console. A click on a row does what a key does: a thread or a frame is chosen, a source line gets a breakpoint, a breakpoint is removed.

See: Developer tools: The window of the debugger, The layout tree in the repository

debugger_window module with an entry

Hash
9e9f04f8cf720a97bf8d6fbb933eda7fa6d68d88510656aaa842bf07d7a67df4
Size
279171 bytes
Exports
0
Imports
1
Imported by
0
License
MIT

The window of the debugger: the threads, the stack, the variables, the source lines and the memory of a process, with no line to type in the console

FactValue
KindModules with an entry
Sourcesrc/modules/system/debugger_window
Boot imageyes: in the boot image, 279171 bytes in this build
Build settings
  • DRAWING_THROUGH_MODULE=true
Imports
Imported bynone

Neighbours

What it imports, at its left, and what imports it, at its right: the part of the module graph that touches it.

debugger_window drawing

Exports

ExportWhat it does
entry()

entry

entry()
Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/system/debugger_window/main.odin:1437

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

What the root service gives it

WhatValueAs the root service says
GrantsThe window of the debugger: a connection to the service debugger and to no other service, the boot image for the description of the exports of that service, and the grant to act for the principal, which the service asks of each caller. It holds no right over a process. See: Developer tools: The window of the debugger
Other terms of its start grant setcallable = {0 = "debugger"}
Budget that it asks for
  • working memory pages 2890
  • pages of its threads 72
  • pages of the pictures of its window 10800
  • pages of the module and its imports from the files of the build
  • processes 1
  • threads 1
The draw tables of the interface, and the tables of the rows: 2536 pages. And the glyph memory of the copy of the text rendering of the drawing module, which draws its text: 354 pages (display.TEXT_MEMORY_PAGES). 2536 + 354 = 2890. The layout tree and the states of its boxes are in the memory of the module, which the tool counts; it counts the window at its largest size.

The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).

Error_Record struct

A struct of the package errors: 56 bytes, aligned on 8 bytes, 0 bytes of padding. The error record: what a call that failed says about why, as seven integers.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes

break_at procedure of the package debugger

break_at :: proc "c" (place: ^string, result: ^[]Break_Row, error: ^errors.) -> i64

break_at sets an execute breakpoint at a procedure or at a source line, and gives one row for each breakpoint of the debugger.

src/modules/system/debugger/exports.odin:1037