Skip to content

Add full function signature extraction for function pointers within structures#34

Merged
lacraig2 merged 8 commits intomainfrom
fix-struct-function-pointers-1064982705633731633
Apr 7, 2026
Merged

Add full function signature extraction for function pointers within structures#34
lacraig2 merged 8 commits intomainfrom
fix-struct-function-pointers-1064982705633731633

Conversation

@lacraig2
Copy link
Copy Markdown
Contributor

@lacraig2 lacraig2 commented Apr 7, 2026

Extracted and exposed full function signatures from function pointers within ISF structures. Added signature property to Ptr and updated points_to_type_name. Handled backwards compatibility with legacy ISF files and included new test coverage.


PR created automatically by Jules for task 1064982705633731633 started by @lacraig2

…ers within ISF structures

This commit introduces functionality to parse the `return_type` and `parameters` from the ISF type definitions of function pointers (e.g. `proc_open` inside struct jump tables).

Changes:
- Added `.signature` property to `Ptr` returning a `VtypeFunction` object to expose function signatures natively.
- Updated `points_to_type_name` to return `"function"` rather than `"void"` for clearer debugging and introspection.
- Implemented full backwards compatibility to gracefully support older ISFs (defaulting missing function details to a `void` return type and empty parameters).
- Added comprehensive unit tests targeting structure-bound function pointers.
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

lacraig2 and others added 5 commits April 7, 2026 18:33
…ers within ISF structures

This commit introduces functionality to parse the `return_type` and `parameters` from the ISF type definitions of function pointers (e.g. `proc_open` inside struct jump tables).

Changes:
- Added `.signature` property to `Ptr` returning a `VtypeFunction` object to expose function signatures natively.
- Updated `points_to_type_name` to return `"function"` rather than `"void"` for clearer debugging and introspection.
- Implemented full backwards compatibility to gracefully support older ISFs (defaulting missing function details to a `void` return type and empty parameters).
- Added comprehensive unit tests targeting structure-bound function pointers, including E2E C compilation validation.
…ers within ISF structures

This commit introduces functionality to parse the `return_type` and `parameters` from the ISF type definitions of function pointers (e.g. `proc_open` inside struct jump tables).

Changes:
- Added `.signature` property to `Ptr` returning a `VtypeFunction` object to expose function signatures natively.
- Updated `points_to_type_name` to return `"function"` rather than `"void"` for clearer debugging and introspection.
- Implemented full backwards compatibility to gracefully support older ISFs (defaulting missing function details to a `void` return type and empty parameters).
- Added comprehensive unit tests targeting structure-bound function pointers, including E2E C compilation validation.
- Fixed E2E test assertions to accurately query `type_info` and `return_type_info` dicts instead of relying on the un-resolved `name` attribute of a potential dictionary returned by `.type` or `.return_type`.
…ers within ISF structures

This commit introduces functionality to parse the `return_type` and `parameters` from the ISF type definitions of function pointers (e.g. `proc_open` inside struct jump tables).

Changes:
- Added `.signature` property to `Ptr` returning a `VtypeFunction` object to expose function signatures natively.
- Updated `points_to_type_name` to return `"function"` rather than `"void"` for clearer debugging and introspection.
- Implemented full backwards compatibility to gracefully support older ISFs (defaulting missing function details to a `void` return type and empty parameters).
- Added comprehensive unit tests targeting structure-bound function pointers, including E2E C compilation validation.
- Fixed E2E test assertions to accurately query `type_info` and `return_type_info` dicts instead of relying on the un-resolved `name` attribute of a potential dictionary returned by `.type` or `.return_type`.
- Added skip condition in E2E tests for older `dwarf2json` executables that omit signature extraction.
… typedef resolution

- Updated assertions in `test_e2e_struct_function_pointer_member` to accept base types (`long long int`, `long int`, `long unsigned int`) in addition to their typedef aliases (`loff_t`, `long`, `unsigned long`), resolving test failures across different versions of GCC/Clang and architectures.
@lacraig2 lacraig2 force-pushed the fix-struct-function-pointers-1064982705633731633 branch from 16834ac to 65e32f3 Compare April 7, 2026 19:04
@lacraig2 lacraig2 merged commit ed3341d into main Apr 7, 2026
3 checks passed
@lacraig2 lacraig2 deleted the fix-struct-function-pointers-1064982705633731633 branch April 7, 2026 19:11
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.

1 participant