[so] Test? + Other things

Octavian Purdila so@cursuri.cs.pub.ro
Tue, 23 Nov 2004 21:12:43 +0200


On Tuesday 23 November 2004 19:51, you wrote:
> Da. Faceam si dlclose.
> Acum daca dau "cat README" , nu mai da segmentation Fault ci un fel de
> buffer underrun care afiseaza garbage plus ceva de prin environment
> (varibile de mediu si altele). In functia de initializare definesc
> read/write original (prin dlopen+dlsym). apoi le folosesc in suprascrierea
> functiei. si dlclose fac doar la iesirea din librarie pe partea de
> destructor.
>
> Chestia cu sleepul o faceam deja.
> Am dat gdb --pid=PID :D. Insa ma depaseste modul de lucru.
> Am facut sleep intr-un apel de write pentru "cat README" exact inainte de
> apelul write_original. am dat bt, am selectat frame-ul respectiv da nu stiu
> cum sa afisez varibilele acolo . orice as da imi da symbol not found. Am
> incercat cu info frame :
> (gdb) info frame
> Stack level 2, frame at 0xbffff4c0:
>  eip = 0x400168cf in write; saved eip 0x804a820
>  called by frame at 0xbffff4c4, caller of frame at 0xbffff430
>  Arglist at 0xbffff4b8, args:
>  Locals at 0xbffff4b8, Previous frame's sp is 0xbffff4c0
>  Saved registers:
>   ebx at 0xbffff41c, ebp at 0xbffff4b8, esi at 0xbffff420, edi at
> 0xbffff424, eip at 0xbffff4bc
>

Incearca gdb ./libtip.so --pid=xxx (si compileaza libtip.so cu -g pentru 
informatii de debug)

tavi