Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dwarf init #62

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

dwarf init #62

wants to merge 5 commits into from

Conversation

doug-q
Copy link
Collaborator

@doug-q doug-q commented Jul 26, 2024

very preliminary.

@hugrbot
Copy link
Collaborator

hugrbot commented Jul 26, 2024

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification
and it looks like your proposed title needs to be adjusted.

Your title should look like this. The scope field is optional.

<type>(<scope>): <description>

If the PR includes a breaking change, mark it with an exclamation mark:

<type>!: <description>

and include a "BREAKING CHANGE:" footer in the body of the pull request.

Details:

No release type found in pull request title "dwarf init". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat
 - fix
 - docs
 - style
 - refactor
 - perf
 - test
 - ci
 - chore
 - revert

src/emit/func.rs Outdated
di_builder.create_file("fn", "dir");
let di_subroutine_type = di_builder.create_subroutine_type(di_file, None, &[], 0);
let di_subprogram = di_builder.create_function(
scope,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

src/emit.rs Outdated
@@ -314,11 +318,29 @@ impl<'c, H: HugrView> EmitHugr<'c, H> {
/// emission of ops with static edges from them. So [FuncDefn] are the only
/// interesting children.
pub fn emit_module(mut self, node: FatNode<'c, hugr::ops::Module, H>) -> Result<Self> {
let (di_builder, di_compile_unit) = self.module().create_debug_info_builder(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

src/emit/ops.rs Outdated
@@ -130,6 +130,9 @@ where
let inputs_rmb = self.context.node_ins_rmb(node)?;
let inputs = inputs_rmb.read(self.builder(), [])?;
let outputs = self.context.node_outs_rmb(node)?.promise();

self.context.set_debug_location(0,0,None);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the per-dataflow-op information to provide: line, column, "scope" (defaults to function)

@doug-q doug-q force-pushed the doug/dwarf-init branch from adbf8ac to e59a5c4 Compare July 27, 2024 07:34
@doug-q doug-q linked an issue Jul 31, 2024 that may be closed by this pull request
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.

Prototype initial DWARF support
2 participants