LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 814|回复: 4

高手帮我分析用户堆栈

[复制链接]
发表于 2004-12-14 12:44:48 | 显示全部楼层 |阅读模式
打印变量a以上的栈内容。
main()
{
        int a;
        printf("%p\n",&a);
        dump(&a,(int)(0xc0000000-(int)&a));
}

请高手看一下,bffff9dc到bffff20c和bffffa90到bffffb10.
打印的结果如下:


0xbffff9c4
                     变量a     bp      返回值
0xbffff9c4          14faffbf e8f9ffbf a6ad0340         .d..............
             agc       agv     envp
0xbffff9d0 01000000 14faffbf 1cfaffbf 806c0140         .   .........l..
0xbffff9e0 01000000 80820408 00000000 a1820408         .   ....    ....
0xbffff9f0 a0830408 01000000 14faffbf 70850408         .....   ....p...
0xbffffa00 d0850408 80c20040 0cfaffbf 00000000         ...... .....
0xbffffa10 01000000 32fbffbf 00000000 37fbffbf         .   2...    7...
0xbffffa20 4bfbffbf 5dfbffbf 68fbffbf 78fbffbf         K.......h...x...
0xbffffa30 b0fbffbf c2fbffbf 0dfcffbf 57fcffbf         ............W...
0xbffffa40 7dfcffbf 8ffcffbf a3fcffbf b0fcffbf         ................
0xbffffa50 dafcffbf 07fdffbf 31fdffbf affdffbf         ........1.......
0xbffffa60 b9fdffbf edfdffbf 05feffbf 2bfeffbf         ................
0xbffffa70 40feffbf 52feffbf 68feffbf 7bfeffbf         ....R...h.......
0xbffffa80 83feffbf 96feffbf a6feffbf c0ffffbf         ................
0xbffffa90 d6ffffbf e1ffffbf ecffffbf 00000000         ............
0xbffffaa0 10000000 fffbeb3f 06000000 00100000         .   .....    .
0xbffffab0 11000000 64000000 03000000 34800408         .   d   .   4...
0xbffffac0 04000000 20000000 05000000 06000000         .   .   .   .
0xbffffad0 07000000 00000040 08000000 00000000         .      ..
0xbffffae0 09000000 80820408 0b000000 e8030000         .   .....   ..
0xbffffaf0 0c000000 e8030000 0d000000 e8030000         .   ..  .   ..
0xbffffb00 0e000000 e8030000 0f000000 2dfbffbf         .   ..  .   ....
0xbffffb10 00000000 00000000 00000000 00000000
0xbffffb20 00000000 00000000 00000000 00693638                      i68
0xbffffb30 36006869 6768004b 44455f4d 554c5449         6 high KDE.MULTI
0xbffffb40 48454144 3d66616c 73650053 53485f41         HEAD.false SSH.A
0xbffffb50 47454e54 5f504944 3d333839 00544552         GENT.PID.389 TER
0xbffffb60 4d3d7874 65726d00 5348454c 4c3d2f62         M.xterm SHELL..b
0xbffffb70 696e2f62 61736800 58444d5f 4d414e41         in.bash XDM.MANA
0xbffffb80 4745443d 2f766172 2f72756e 2f78646d         GED..var.run.xdm
0xbffffb90 63746c2f 78646d63 746c2d3a 302c6d61         ctl.xdmctl..0.ma
0xbffffba0 7973642c 6d617966 6e2c7363 68656400         ysd.mayfn.sched
0xbffffbb0 58554e5f 50524f47 52414d3d 66636974         XUN.PROGRAM.fcit
0xbffffbc0 78004450 4154483d 2f686f6d 652f6b6e         x DPATH..home.kn
0xbffffbd0 6f707069 782f6563 6c697073 652f706c         oppix.eclipse.pl
0xbffffbe0 7567696e 732f6f72 672e6563 6c697073         ugins.org.eclips
0xbffffbf0 652e7377 742e6774 6b5f332e 312e302f         e.swt.gtk.3.1.0.
0xbffffc00 6f732f6c 696e7578 2f783836 0047544b         os.linux.x86 GTK
0xbffffc10 5f52435f 46494c45 533d2f65 74632f67         .RC.FILES..etc.g
0xbffffc20 746b2f67 746b7263 3a2f686f 6d652f6b         tk.gtkrc..home.k
0xbffffc30 6e6f7070 69782f2e 67746b72 633a2f68         noppix..gtkrc..h
0xbffffc40 6f6d652f 6b6e6f70 7069782f 2e67746b         ome.knoppix..gtk
0xbffffc50 72632d6b 64650047 535f4c49 423d2f68         rc.kde GS.LIB..h
0xbffffc60 6f6d652f 6b6e6f70 7069782f 2e6b6465         ome.knoppix..kde
0xbffffc70 2f736861 72652f66 6f6e7473 0058494d         .share.fonts XIM
0xbffffc80 5f50524f 4752414d 3d666369 7478004c         .PROGRAM.fcitx L
0xbffffc90 435f414c 4c3d7a68 5f434e2e 47423233         C.ALL.zh.CN.GB23
0xbffffca0 31320055 5345523d 6b6e6f70 70697800         12 USER.knoppix
0xbffffcb0 5353485f 41555448 5f534f43 4b3d2f74         SSH.AUTH.SOCK..t
0xbffffcc0 6d702f73 73682d75 5969746d 3336342f         mp.ssh.uYitm364.
0xbffffcd0 6167656e 742e3336 34005345 5353494f         agent.364 SESSIO
0xbffffce0 4e5f4d41 4e414745 523d6c6f 63616c2f         N.MANAGER.local.
0xbffffcf0 47756f3a 2f746d70 2f2e4943 452d756e         Guo..tmp..ICE.un
0xbffffd00 69782f34 3238004b 4f4e534f 4c455f44         ix.428 KONSOLE.D
0xbffffd10 434f503d 44434f50 52656628 6b6f6e73         COP.DCOPRef.kons
0xbffffd20 6f6c652d 3435382c 6b6f6e73 6f6c6529         ole.458.konsole.
0xbffffd30 00504154 483d2e3a 2f686f6d 652f6b6e          PATH....home.kn
0xbffffd40 6f707069 782f6a32 73646b31 2e342e32         oppix.j2sdk1.4.2
0xbffffd50 5f30352f 62696e3a 2f736269 6e3a2f62         .05.bin..sbin..b
0xbffffd60 696e3a2f 7573722f 7362696e 3a2f7573         in..usr.sbin..us
0xbffffd70 722f6269 6e3a2f75 73722f58 31315236         r.bin..usr.X11R6
0xbffffd80 2f62696e 3a2f7573 722f6c6f 63616c2f         .bin..usr.local.
0xbffffd90 7362696e 3a2f7573 722f6c6f 63616c2f         sbin..usr.local.
0xbffffda0 62696e3a 2f757372 2f67616d 65730058         bin..usr.games X
0xbffffdb0 494d3d66 63697478 004b4f4e 534f4c45         IM.fcitx KONSOLE
0xbffffdc0 5f44434f 505f5345 5353494f 4e3d4443         .DCOP.SESSION.DC
0xbffffdd0 4f505265 66286b6f 6e736f6c 652d3435         OPRef.konsole.45
0xbffffde0 382c7365 7373696f 6e2d3629 00505744         8.session.6. PWD
0xbffffdf0 3d2f686f 6d652f6b 6e6f7070 69782f77         ..home.knoppix.w
0xbffffe00 6f726b73 004a4156 415f484f 4d453d2f         orks JAVA.HOME..
0xbffffe10 686f6d65 2f6b6e6f 70706978 2f6a3273         home.knoppix.j2s
0xbffffe20 646b312e 342e325f 30350058 4d4f4449         dk1.4.2.05 XMODI
0xbffffe30 46494552 533d4069 6d3d6663 69747800         FIERS..im.fcitx
0xbffffe40 4c414e47 3d7a685f 434e2e47 42323331         LANG.zh.CN.GB231
0xbffffe50 32004b45 445f4c41 4e473d7a 685f434e         2 KED.LANG.zh.CN
0xbffffe60 2e474232 33313200 484f4d45 3d2f686f         .GB2312 HOME..ho
0xbffffe70 6d652f6b 6e6f7070 69780053 484c564c         me.knoppix SHLVL
0xbffffe80 3d32004c 414e4755 4147453d 7a685f43         .2 LANGUAGE.zh.C
0xbffffe90 4e2e4742 4b004c4f 474e414d 453d6b6e         N.GBK LOGNAME.kn
0xbffffea0 6f707069 7800434c 41535350 4154483d         oppix CLASSPATH.
0xbffffeb0 2e3a2f68 6f6d652f 6b6e6f70 7069782f         ...home.knoppix.
0xbffffec0 6a327364 6b312e34 2e325f30 352f6c69         j2sdk1.4.2.05.li
0xbffffed0 622f746f 6f6c732e 6a61723a 2f686f6d         b.tools.jar..hom
0xbffffee0 652f6b6e 6f707069 782f6563 6c697073         e.knoppix.eclips
0xbffffef0 652f706c 7567696e 732f6f72 672e6563         e.plugins.org.ec
0xbfffff00 6c697073 652e7377 742e6774 6b5f332e         lipse.swt.gtk.3.
0xbfffff10 312e302f 77732f67 746b2f73 77742e6a         1.0.ws.gtk.swt.j
0xbfffff20 61722f3a 2f686f6d 652f6b6e 6f707069         ar...home.knoppi
0xbfffff30 782f6563 6c697073 652f706c 7567696e         x.eclipse.plugin
0xbfffff40 732f6f72 672e6563 6c697073 652e7377         s.org.eclipse.sw
0xbfffff50 742e6774 6b5f332e 312e302f 77732f67         t.gtk.3.1.0.ws.g
0xbfffff60 746b2f73 77742d6d 6f7a696c 6c612e6a         tk.swt.mozilla.j
0xbfffff70 61722f3a 2f686f6d 652f6b6e 6f707069         ar...home.knoppi
0xbfffff80 782f6563 6c697073 652f706c 7567696e         x.eclipse.plugin
0xbfffff90 732f6f72 672e6563 6c697073 652e7377         s.org.eclipse.sw
0xbfffffa0 742e6774 6b5f332e 312e302f 77732f67         t.gtk.3.1.0.ws.g
0xbfffffb0 746b2f73 77742d70 692e6a61 722f3a00         tk.swt.pi.jar..
0xbfffffc0 4c435f43 54595045 3d7a685f 434e2e47         LC.CTYPE.zh.CN.G
0xbfffffd0 42323331 32004449 53504c41 593d3a30         B2312 DISPLAY..0
0xbfffffe0 00434f4c 4f525445 524d3d00 5f3d2e2f          COLORTERM. ....
0xbffffff0 68696768 002e2f68 69676800 00000000         high ..high
0xc0000000
 楼主| 发表于 2004-12-14 12:45:36 | 显示全部楼层
怎么样才能对齐呢?
发表于 2004-12-14 16:05:30 | 显示全部楼层
问题是什么?
 楼主| 发表于 2004-12-14 16:14:12 | 显示全部楼层
对我打印的内容做分析啊。。。。。
发表于 2004-12-14 16:23:29 | 显示全部楼层
楼猪用的knoppix吧,好象使用的eclips+CDT,偶喜欢eclipse
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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