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-09 11:56:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a27c3dca2d97066b469dd4ac55f72f14f2c0ba0f
a27c3dca
1 parent
4b24ee9d
research st, add gdb info for setjmp.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
18 行增加
和
2 行删除
trunk/research/arm/jmp_sp.cpp
trunk/research/st/Makefile
trunk/research/arm/jmp_sp.cpp
查看文件 @
a27c3dc
...
...
@@ -46,7 +46,23 @@ void func0()
* functions as a setjmp/longjmp replacement wherever they are available
* unless USE_LIBC_SETJMP is defined.
*/
// for glibc 2.4+, it's not possible to get and set the sp in jmp_buf
// for glibc 2.4+, it's not possible to get and set the sp in jmp_buf
/**
for example, the following is show the jmp_buf when setjmp:
(gdb) x /64xb env_func1[0].__jmpbuf
0x600ca0 <env_func1>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x600ca8 <env_func1+8>: 0xf8 0xc1 0x71 0xe5 0xa8 0x88 0xb4 0x15
0x600cb0 <env_func1+16>: 0xa0 0x05 0x40 0x00 0x00 0x00 0x00 0x00
0x600cb8 <env_func1+24>: 0x90 0xe4 0xff 0xff 0xff 0x7f 0x00 0x00
0x600cc0 <env_func1+32>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x600cc8 <env_func1+40>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x600cd0 <env_func1+48>: 0xf8 0xc1 0x51 0xe5 0xa8 0x88 0xb4 0x15
0x600cd8 <env_func1+56>: 0xf8 0xc1 0xd9 0x2f 0xd7 0x77 0x4b 0xea
(gdb) p /x $sp
$4 = 0x7fffffffe380
we cannot finger the sp out.
where the glibc is 2.12.
*/
register
long
int
rsp0
asm
(
"rsp"
);
int
ret
=
setjmp
(
env_func1
);
...
...
trunk/research/st/Makefile
查看文件 @
a27c3dc
...
...
@@ -124,7 +124,7 @@ $(SRS): $(OBJS)
$(TARGETDIR)/md.o
:
md.S
$(CC)
$(CFLAGS)
-c
$<
-o
$@
$(TARGETDIR)/%.o
:
%.c common.h md.h
$(TARGETDIR)/%.o
:
%.c common.h md.h
Makefile
$(CC)
$(CFLAGS)
-c
$<
-o
$@
clean
:
...
...
请
注册
或
登录
后发表评论