Skip to content

select which function, out of several with the same name, to get information about #51

Description

@rikvanriel

Right now semcode will index code that contains multiple functions with the same name, for example every architecture in the Linux kernel seems to have a do_page_fault() function.

Asking for information about the function returns all of them:

semcode> func do_page_fault

However, asking for call chain information results in semcode picking one:

semcode> callchain do_page_fault
Building call chain for: do_page_fault
Git SHA: 0f23d56f17fdfc7db69d51f64c8b91bbab947aa9
Configuration: up_levels=2, down_levels=3, calls_limit=15

=== Function Information ===
Function: do_page_fault (arch/openrisc/mm/fault.c:46)
Return Type: asmlinkage
Parameters:

  • struct pt_regs * regs
  • unsigned long address
  • unsigned long vector
  • int write_acc

=== Reverse Chain (Callers) === (2 levels)

  1. write_protection_fault
    └─ void (arch/hexagon/mm/vm_fault.c:165)
    └─ do_genex
  2. access_error060
    └─ void (arch/m68k/kernel/traps.c:133)
    └─ buserr_c
  3. access_errorcf
    └─ void (arch/m68k/kernel/traps.c:698)
    └─ buserr_c
    ...

I plan to add functionality to the semcode commandline, lsp, and mcp to allow the user (human or agent) to select which function to get things like calls, callers, callchain, etc information about.

This is a preexisting issue, and something to fix after the enormous pending PR has been all fixed up and merged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions