QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: tenthplanet

skyeye1.3.2 gdb远程调试:段错误

[复制链接]
 楼主| 发表于 2011-8-10 08:50:24 | 显示全部楼层
殷切期盼问题解决中...
回复

使用道具 举报

发表于 2011-8-10 11:28:31 | 显示全部楼层
您尝试打上这个patch看看。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

 楼主| 发表于 2011-8-10 12:54:49 | 显示全部楼层
谢谢您的指导,不过看起来好像
还是不行啊,调试错误如下:(跟以前提示的错误一样)

(skyeye)remote-gdb
[New Thread 0xac439b90 (LWP 2910)]
(skyeye)Remote debugging using host:12345
getpkt ("qSupported");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
[getpkt: discarding char '+']
getpkt ("?");  [sending ack]
[sent ack]
putpkt ("$S05#b8"); [looking for ack]
[received '+' (0x2b)]
getpkt ("Hc-1");  [sending ack]
[sent ack]
�(��ǵ4�ǵ4�ǵ4�ǵ4�ǵ4�ǵ4�ǵ4�ȵ4�putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("qC");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("qOffsets");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("Hg0");  [sending ack]
[sent ack]
�(��ǵ4�ǵ4�ǵ4�ǵ4�ǵ4�ǵ4�ǵ4�ȵ4�putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("g");  [sending ack]
[sent ack]
putpkt ("$00000000c100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#38"); [looking for ack]
[received '+' (0x2b)]
getpkt ("m0,8");  [sending ack]
[sent ack]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xac439b90 (LWP 2910)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb57c825e in sim_debug () at debugger/gdbserver.c:1243
#2  0xb737b4c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#3  0xb72d484e in clone () from /lib/i686/cmov/libc.so.6
(gdb) l
491        }
492       
493       
494        /**
495         *  The main function of skyeye
496         */
497       
498        int
499        main (int argc, char **argv)
500        {

[ 本帖最后由 tenthplanet 于 2011-8-10 12:57 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2011-8-15 09:15:25 | 显示全部楼层
这是个棘手的问题,非常感谢你们!
回复

使用道具 举报

发表于 2011-8-15 10:57:22 | 显示全部楼层
你把你的二进制的测试用例和skyeye.conf发过来,好吗?调一下,呵呵
回复

使用道具 举报

发表于 2011-8-15 11:10:09 | 显示全部楼层
您如果急于解决这个问题,权宜之计,您可以在  utils/debugger/gdbserver.c中添加如下5行:

13 diff --git a/utils/debugger/gdbserver.c b/utils/debugger/gdbserver.c
14 index 0f9f541..2a3d973 100644
15 --- a/utils/debugger/gdbserver.c
16 +++ b/utils/debugger/gdbserver.c
17 @@ -1049,6 +1049,11 @@ sim_debug ()
18                 write_ok (own_buf);
19                 break;
20             case 'm':
21 +                if (own_buf[1] == '0')
22 +                {
23 +                    own_buf[0] = '\0';
24 +                    break;
25 +                }
26                 decode_m_packet (&own_buf[1], &mem_addr,
27                          &len);
28                 if ((get_trace_status() == TRACE_FOCUSING) && (is_in_ro_region(mem_addr,len) == 0))

(同样期待您的测试用例和skyeye.conf,我们想调一下,找出真正的bug所在)
回复

使用道具 举报

 楼主| 发表于 2011-8-15 13:41:24 | 显示全部楼层
例子和skyeye.conf已经附上,谢谢您的帮助,殷切期待问题解决!

依照您第2种方法,
似乎还是有问题

终端1:
(skyeye)remote-gdb
[New Thread 0xac36db90 (LWP 799)]
(skyeye)Remote debugging using host:12345
getpkt ("qSupported");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
[getpkt: discarding char '+']
getpkt ("?");  [sending ack]
[sent ack]
putpkt ("$S05#b8"); [looking for ack]
[received '+' (0x2b)]
getpkt ("Hc-1");  [sending ack]
[sent ack]
�(����'���'���'���'���'���'���'���'�putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("qC");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("qOffsets");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("Hg0");  [sending ack]
[sent ack]
�(����'���'���'���'���'���'���'���'�putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("g");  [sending ack]
[sent ack]
putpkt ("$00000000c100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#38"); [looking for ack]
[received '+' (0x2b)]
getpkt ("m0,8");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("m0,7");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
getpkt ("qSymbol::");  [sending ack]
[sent ack]
putpkt ("$#00"); [looking for ack]
[received '+' (0x2b)]
屏幕停住

终端2:
(gdb) target remote 10.0.0.1:12345
Remote debugging using 10.0.0.1:12345
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()

[ 本帖最后由 tenthplanet 于 2011-8-15 13:48 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

发表于 2011-8-15 14:08:13 | 显示全部楼层
附件下载不了阿,这是我的邮箱:
[email protected]
回复

使用道具 举报

发表于 2011-8-16 20:21:54 | 显示全部楼层
您发的二进制文件和skyeye.conf下不下来,您能不能发到我的邮箱里去?
[email protected]
回复

使用道具 举报

 楼主| 发表于 2011-8-17 15:05:01 | 显示全部楼层
不好意思让您久等,这2天我人在外面。
明天我一到家就给您发,真是麻烦您了。
回复

使用道具 举报

 楼主| 发表于 2011-8-18 08:10:57 | 显示全部楼层
我已经发给您了,谢谢您的热情解答和帮助。
回复

使用道具 举报

发表于 2011-8-21 16:49:02 | 显示全部楼层
我在ubuntu1004上测了一下你的测试用例,没有重现你的错误:

lee@localhost:~/test/test_hello$ ~/gdb/gdb-7.1-realse/bin/arm-linux-gdb hello
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/lee/test/test_hello/hello...done.
(gdb) target remote :12345
Remote debugging using :12345
begin () at start.S:21
21                mov     r0, #I_BIT|MODE_SVC
(gdb) b hello
Breakpoint 1 at 0x31000024: file hello.c, line 27.
(gdb) c
Continuing.

Breakpoint 1, hello () at hello.c:27
27                                * paddr=hellostr;
(gdb) n
25                        for(i=0;i<10;i++)


Breakpoint 1, hello () at hello.c:27
27                                * paddr=hellostr;
(gdb)


skyeye官方只支持ubuntu和windows,您要不换一下ubuntu吧?
回复

使用道具 举报

 楼主| 发表于 2011-8-24 13:50:36 | 显示全部楼层
谢谢您的帮助,我想再去试下。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-12-4 01:33 , Processed in 0.038891 second(s), 13 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表