Skip to content

Commit

Permalink
Fix C++ function names cut too early
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarno Malmari committed Oct 19, 2024
1 parent 21285f8 commit 2f3570e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Src/symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ static enum LineType _getLineType( char *sourceLine, char *p1, char *p2, char *p
/* If it has something with <xxx> in it, it's a proc label (function) */
if ( 2 == sscanf( sourceLine, "%[0-9a-fA-F] <%[^>]>", p1, p2 ) )
{
/* Demangled C++ names may have multiple ">" characters. Expand until last one. */
const char *const beg = strchr(sourceLine, '<') + 1;
const char *const end = strrchr(beg, '>');
(void)memcpy(p2, beg, end - beg);
p2[end - beg] = '\0';
return LT_PROC_LABEL;
}

Expand Down

0 comments on commit 2f3570e

Please sign in to comment.