tiny bit faster and neater

This commit is contained in:
albert 2005-01-11 02:02:37 +00:00
parent 7514c4e4a0
commit 0908258da6

6
pmap.c
View File

@ -108,6 +108,12 @@ static const char *mapping_name(proc_t *p, unsigned KLONG addr, unsigned KLONG l
return cp[1] ? cp+1 : cp;
}
cp = strchr(mapbuf,'/');
if(cp){
if(showpath) return cp;
return strrchr(cp,'/') + 1; // it WILL succeed
}
cp = " [ anon ]";
if( (p->start_stack >= addr) && (p->start_stack <= addr+len) ) cp = " [ stack ]";
return cp;