Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-11-10 15:22:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4d4e840209ddf1c86faf5381a38c7448ec6d355b
4d4e8402
1 parent
683b01a6
research st, add jmp_flow.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
29 行增加
和
1 行删除
trunk/research/arm/jmp_flow.cpp
trunk/research/arm/jmp_sp.cpp
trunk/research/arm/jmp_flow.cpp
0 → 100644
查看文件 @
4d4e840
/*
# for all supports setjmp and longjmp:
g++ -g -O0 -o jmp_flow jmp_flow.cpp
*/
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf
context_level_0
;
void
func_level_0
()
{
const
char
*
level_0_0
=
"stack variables for func_level_0"
;
int
ret
=
setjmp
(
context_level_0
);
printf
(
"func_level_0 ret=%d
\n
"
,
ret
);
if
(
ret
!=
0
)
{
printf
(
"call by longjmp.
\n
"
);
exit
(
0
);
}
}
int
main
(
int
argc
,
char
**
argv
)
{
func_level_0
();
longjmp
(
context_level_0
,
1
);
return
0
;
}
...
...
trunk/research/arm/jmp_sp.cpp
查看文件 @
4d4e840
...
...
@@ -133,7 +133,8 @@ void func0()
#endif
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
#if defined(__amd64__) || defined(__x86_64__)
printf
(
"x86_64 sizeof(long int)=%d, sizeof(long)=%d, "
"sizeof(int)=%d, __WORDSIZE=%d, __GLIBC__=%d, __GLIBC_MINOR__=%d
\n
"
,
...
...
请
注册
或
登录
后发表评论