flds
命令は値を register に格納する必要がありますst0
。コードがない共有ライブラリをデバッグしています。場合によっては、flds
命令が に影響を与えないことがありますst0
。以下はgdb
、動作した場合と失敗した場合の出力です。壊れたケースでは、fstat
レジスタは 0x2061 ではなく 0x2261 です。0x200 フラグは何を示していますか?
作業バージョン:
0x6d9b4f : flds -0x4(%ebp) 0x6d9b52 : 離れる 0x6d9b53 : 戻る (gdb) 情報レジスタ fstat st0 st1 st2 st3 st4 st5 st6 st7 fstat 0x2061 8289 st0 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st1 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st2 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st3 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st4 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st5 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st6 780250362506194 (生の 0x4030b1688c6c5af48000) st7 1 (生の 0x3fff8000000000000000) (gdb)に 起動時の 0x006d9b52 () 1: x/3i $pc 0x6d9b52 : 離れる 0x6d9b53 : 戻る 0x6d9b54 : %ebp をプッシュ (gdb) 情報レジスタ fstat st0 st1 st2 st3 st4 st5 st6 st7 fstat 0x1861 6241 st0 -1584 (生の 0xc009c600000000000000) st1 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st2 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st3 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st4 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st5 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st6 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st7 780250362506194 (生の 0x4030b1688c6c5af48000)
壊れたバージョン:
0x6d9b4f : flds -0x4(%ebp) 0x6d9b52 : 離れる 0x6d9b53 : 戻る (gdb) 情報レジスタ fstat st0 st1 st2 st3 st4 st5 st6 st7 fstat 0x2261 8801 st0 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st1 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st2 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st3 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st4 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st5 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st6 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st7 -nan(0xc000000000000000) (raw 0xffffc000000000000000) (gdb)に 起動時の 0x006d9b52 () 1: x/3i $pc 0x6d9b52 : 離れる 0x6d9b53 : 戻る 0x6d9b54 : %ebp をプッシュ (gdb) 情報レジスタ fstat st0 st1 st2 st3 st4 st5 st6 st7 fstat 0x1a61 6753 st0 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st1 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st2 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st3 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st4 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st5 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st6 -nan(0xc000000000000000) (raw 0xffffc000000000000000) st7 -nan(0xc000000000000000) (raw 0xffffc000000000000000)