Skip to content

Teach debugger scripts about variable number of domains - #13686

Merged
gasche merged 1 commit into
ocaml:trunkfrom
NickBarnes:nick-debug-param-domains
Dec 19, 2024
Merged

gasche merged 1 commit into
ocaml:trunkfrom
NickBarnes:nick-debug-param-domains

Conversation

@NickBarnes

Copy link
Copy Markdown
Contributor

The Python scripts for GDB and LLDB to interpret OCaml values and search the OCaml heap have not kept up with recent runtime improvements, in particular #13272, so the ocaml find command would crash. This fixes that regression.

As part of this I added a pointer_index method to the value class for both LLDB and GDB (as the distinction between a[n] for an array a and p[n] for a pointer p is meaningful in LLDB internals). Both pointer_index and the existing sub method would be better as __getitem__ methods, but that's more work than was justified here.

@NickBarnes
NickBarnes force-pushed the nick-debug-param-domains branch from 5da14bf to fbf48e0 Compare December 17, 2024 15:11
@NickBarnes
NickBarnes force-pushed the nick-debug-param-domains branch from fbf48e0 to 0de4054 Compare December 17, 2024 15:13

@gasche gasche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me from a distance, thanks!

@tmcgilchrist tmcgilchrist left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

A small suggestion would be to add a real world usage example here or in the docstring of the Python.

@gasche
gasche merged commit f8a9d65 into ocaml:trunk Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants