mirror of
https://github.com/QuasarApp/backward-cpp.git
synced 2025-05-01 12:29:33 +00:00
fix off-by-one when resolve goes up to ip==0 frame
This commit is contained in:
parent
f9f732ddeb
commit
dd552a10c8
11
backward.hpp
11
backward.hpp
@ -752,7 +752,16 @@ public:
|
||||
while (*funcname && *funcname != '(') {
|
||||
funcname += 1;
|
||||
}
|
||||
trace.object_filename.assign(filename, funcname++);
|
||||
trace.object_filename.assign(filename, funcname); // it is ok if funcname is the ending \0, then we select string till end
|
||||
|
||||
if ( ! (*funcname) ) { // we already hit end of string. This happens for the last address 0xffff for ip==0
|
||||
trace.object_function = "(none)";
|
||||
trace.source.function = "(none)";
|
||||
return trace;
|
||||
}
|
||||
|
||||
// else normal string, we are at the opening '(' now
|
||||
funcname++;
|
||||
char* funcname_end = funcname;
|
||||
while (*funcname_end && *funcname_end != ')' && *funcname_end != '+') {
|
||||
funcname_end += 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user