Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
422e2fc0
Commit
422e2fc0
authored
Jan 31, 2013
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: Don't allocate when doing a backtrace.
From-SVN: r195615
parent
b5fbde92
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
libgo/runtime/go-callers.c
+8
-2
No files found.
libgo/runtime/go-callers.c
View file @
422e2fc0
...
...
@@ -43,8 +43,14 @@ callback (void *data, uintptr_t pc, const char *filename, int lineno,
loc
=
&
arg
->
locbuf
[
arg
->
index
];
loc
->
pc
=
pc
;
loc
->
filename
=
runtime_gostring
((
const
byte
*
)
filename
);
loc
->
function
=
runtime_gostring
((
const
byte
*
)
function
);
/* The libbacktrace library says that these strings might disappear,
but with the current implementation they won't. We can't easily
allocate memory here, so for now assume that we can save a
pointer to the strings. */
loc
->
filename
=
runtime_gostringnocopy
((
const
byte
*
)
filename
);
loc
->
function
=
runtime_gostringnocopy
((
const
byte
*
)
function
);
loc
->
lineno
=
lineno
;
++
arg
->
index
;
return
arg
->
index
>=
arg
->
max
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment