facebookexperimental / facebookexperimental/semcode

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

Offen
#51 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
171
Forks
40
Ø Merge
4 Std. 24 Min.
Gemergte PRs (30 T.)
24

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.