Stored Procedure References

Last week, I did a little work to track down unused stored procedures in a large-ish SQL Server database.  Searching for references in source code was interesting all by itself, but I also wanted to see which procs were referenced by other procedures.  This is what I came up with:

select 'referencing proc', 'referenced proc'
	sysdepends d,
	sys.objects o1,
	sys.objects o2
where = o1.object_id
	d.depid = o2.object_id
	and o2.type = 'P'