[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] internt backtrace igen :)



Brian Bjerre Graversen <sslug@sslug> writes:

> ex. paa en linie i et backtrace ville vaere
> 
> a.out(init_argument+0x289) [0x809f021]
> 
> Her er binaer filen a.out, og funktionen er init_argument(),
> men argumentet gives til funktionen er bare en adresse,
> 
> Nogen ideer til hvordan man let faar argumentet i laeselig tekst ?

Er det blot en pointer til memory lokation du har? Så kan du ikke
rigtig vide om den peger på en int, en char* eler hvad.

Du kunne prøve se om *(int*)adresse ligner en gyldigt adresse (jeg ved
ikke lige om der er en anden måde at finde ud af det på end at faktisk
læse fra lokationen, og fange SIGSEGV).

Hvis det er en gyldig adresse, se så om der der ligger på den ligner
en streng (X bytes indenfor 0x20 ... 0x7F som er afsluttet er et 0).

Ellers er det nok en pointer... til et eller andet.

Er du rigtigt desparat kunne du vha en tags tabel finde definitionen
for funktionen og vha denne parse argumenterne :)


-- 
===============================================================
<sslug@sslug>     Herlev, Denmark     Software Designer
<URL:http://www.andreasen.org/>   <*>   Eicon Networks Research
===============================================================



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *