mirror of
https://gitlab.com/procps-ng/procps.git
synced 2024-11-27 20:14:05 +08:00
tiny bit faster and neater
This commit is contained in:
parent
7514c4e4a0
commit
0908258da6
6
pmap.c
6
pmap.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user