cvs commit: src/usr.bin/kdump kdump.c

John Baldwin jhb at freebsd.org
Fri Jan 5 13:07:45 PST 2007


On Friday 05 January 2007 16:04, John Baldwin wrote:
> jhb         2007-01-05 21:04:37 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     usr.bin/kdump        kdump.c 
>   Log:
>   Add code to parse the utrace(2) entries generated by malloc(3) in a more
>   human-readable format.  Note that we report 'realloc(p, 0)' as 'free(p)'
>   since both cases are encoded the same way and 'free()' is more common
>   than a realloc() to 0.
>   
>   MFC after:      1 week

Sample before and after from a trivial case:

old:
  9320 kdump    USER  12  00 00 00 00 00 00 00 00 00 00 00 00
  9320 kdump    USER  12  00 00 00 00 01 04 00 00 00 08 21 08

new:
  9320 kdump    USER  malloc_init()
  9320 kdump    USER  0x8210800 = malloc(1025)

I also have patches I use at work that allow kdump to recognize a 32-bit 
malloc utrace on an amd64 machine (for when you run an i386 binary) if folks 
are interested.  I'm not sure how many i386 on amd64 hacks we want in the 
official CVS tree. :)

I also have another set of patches to add various utrace(2) events to the 
runtime linker as well as logic in kdump to parse them that I hope to commit 
in the near future.

-- 
John Baldwin


More information about the cvs-src mailing list