[Crash-utility] command dis fails to display name of function

qiaonuohan qiaonuohan at cn.fujitsu.com
Tue Dec 9 08:40:02 UTC 2014


On 12/09/2014 01:04 AM, Dave Anderson wrote:
> Good catch -- thanks!
>
> The "shifting" is due to the caching in symval_hash_search().  But since sp->name
> is guaranteed to exist, I think the pre-existing strstr_rightmost() function makes
> it a little easier to understand:

Yes, strstr_rightmost() will be better. And is it going to be merged into 7.1.0?

>
> --- crash-7.0.9/symbols.c.orig
> +++ crash-7.0.9/symbols.c
> @@ -4527,6 +4527,11 @@ value_search(ulong value, ulong *offset)
>   			    (spnext->value == value))
>   				sp = spnext;
>
> +			if (strstr_rightmost(sp->name, "_text_start")&&
> +			    ((spnext = sp+1)<  st->symend)&&
> +			    (spnext->value == value))
> +				sp = spnext;
> +
>                           return((struct syment *)sp);
>                   }
>                   if (sp->value>  value) {
>
> and I'll add a comment above it.


-- 
Regards
Qiao Nuohan




More information about the Crash-utility mailing list